forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 8
Vault provider #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
vineet-garg
wants to merge
31
commits into
oracle:for/upstream/master/vault_provider
from
vineet-garg:vault-provider
Closed
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
2af9158
Add vault dependencies
f4f06d1
Vault as KMS service provider
0f85502
Add transit-path in vault configuration
3c0d04d
Update bazel build file for vault kms provider
b71835a
make auth backend path conigurable
a94c58a
Revert "make auth backend path conigurable"
4e61bc1
Automatically login to renew token for vault
c7c4b74
make auth path configurable
vineet-garg 144dcb3
fix format and headers
vineet-garg c4d44a3
linting code, no functional change
vineet-garg 141da5f
linting code, no functional change
vineet-garg 7e277ff
linting code, no functional change
vineet-garg d5b39f2
bazel build, no functional change
vineet-garg dad5911
temp change
vineet-garg c36d585
temp change
vineet-garg 56339f9
temp change
vineet-garg 154a4cb
temp change
vineet-garg ec45a52
temp change
vineet-garg 9885a79
Revert "temp change"
bbe5b93
Revert "temp change"
a9e46f7
Revert "temp change"
2144ea8
Revert "temp change"
22e62e6
Revert "temp change"
f9707ea
update bazel
vineet-garg a878fad
add vault provider in vendor
vineet-garg 2ad9ee2
update staging godep
vineet-garg c645efa
incorporate review comments
vineet-garg 9c89fb8
incorporate review comments
vineet-garg 4bb572a
incorporate review comments
vineet-garg 8a74ebd
used path.Join and fixed error messages
vineet-garg 00c8c70
use testing.T.Run for subtests
vineet-garg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/vault/BUILD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| package(default_visibility = ["//visibility:public"]) | ||
|
|
||
| licenses(["notice"]) | ||
|
|
||
| load( | ||
| "@io_bazel_rules_go//go:def.bzl", | ||
| "go_library", | ||
| "go_test", | ||
| ) | ||
|
|
||
| go_test( | ||
| name = "go_default_test", | ||
| srcs = [ | ||
| "client_test.go", | ||
| "vault_test.go", | ||
| ], | ||
| library = ":go_default_library", | ||
| tags = ["automanaged"], | ||
| deps = [ | ||
| "//vendor/github.com/hashicorp/vault/api:go_default_library", | ||
| "//vendor/github.com/pborman/uuid:go_default_library", | ||
| "//vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope:go_default_library", | ||
| ], | ||
| ) | ||
|
|
||
| go_library( | ||
| name = "go_default_library", | ||
| srcs = [ | ||
| "client.go", | ||
| "vault.go", | ||
| ], | ||
| tags = ["automanaged"], | ||
| deps = [ | ||
| "//vendor/github.com/ghodss/yaml:go_default_library", | ||
| "//vendor/github.com/hashicorp/vault/api:go_default_library", | ||
| "//vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope:go_default_library", | ||
| ], | ||
| ) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This constant should be a variable in the vault package and used as the key when stripping / adding it to data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stripping and adding of the provider name prefix to data stored is done in the core kmstransformer code which is not owned by us, It takes the provider name from here and use it for that particular provider.
Separate from this, there is also prefix processing in client.go, it just strips and adds the prefix used by vault itself.
Both prefixes can vary seperately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jhorwit2 Thanks for reviewing the code, it was very helpful, I have made most of the changes suggested by you. Does the PR look good to you? Once internal review is over, I will create a new branch which has only 2 commits (one for code changes, one for dependencies and build) sync with latest upstream master and run all local verify/test/integration-test again.