Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2af9158
Add vault dependencies
Aug 3, 2017
f4f06d1
Vault as KMS service provider
Aug 3, 2017
0f85502
Add transit-path in vault configuration
Aug 9, 2017
3c0d04d
Update bazel build file for vault kms provider
Aug 9, 2017
b71835a
make auth backend path conigurable
Aug 16, 2017
a94c58a
Revert "make auth backend path conigurable"
Aug 16, 2017
4e61bc1
Automatically login to renew token for vault
Aug 11, 2017
c7c4b74
make auth path configurable
vineet-garg Aug 16, 2017
144dcb3
fix format and headers
vineet-garg Aug 17, 2017
c4d44a3
linting code, no functional change
vineet-garg Aug 18, 2017
141da5f
linting code, no functional change
vineet-garg Aug 18, 2017
7e277ff
linting code, no functional change
vineet-garg Aug 18, 2017
d5b39f2
bazel build, no functional change
vineet-garg Aug 18, 2017
dad5911
temp change
vineet-garg Aug 18, 2017
c36d585
temp change
vineet-garg Aug 18, 2017
56339f9
temp change
vineet-garg Aug 18, 2017
154a4cb
temp change
vineet-garg Aug 18, 2017
ec45a52
temp change
vineet-garg Aug 18, 2017
9885a79
Revert "temp change"
Aug 21, 2017
bbe5b93
Revert "temp change"
Aug 21, 2017
a9e46f7
Revert "temp change"
Aug 21, 2017
2144ea8
Revert "temp change"
Aug 21, 2017
22e62e6
Revert "temp change"
Aug 21, 2017
f9707ea
update bazel
vineet-garg Aug 21, 2017
a878fad
add vault provider in vendor
vineet-garg Aug 21, 2017
2ad9ee2
update staging godep
vineet-garg Aug 22, 2017
c645efa
incorporate review comments
vineet-garg Aug 23, 2017
9c89fb8
incorporate review comments
vineet-garg Aug 23, 2017
4bb572a
incorporate review comments
vineet-garg Aug 24, 2017
8a74ebd
used path.Join and fixed error messages
vineet-garg Aug 25, 2017
00c8c70
use testing.T.Run for subtests
vineet-garg Aug 28, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 119 additions & 64 deletions Godeps/Godeps.json

Large diffs are not rendered by default.

7,748 changes: 5,409 additions & 2,339 deletions Godeps/LICENSES

Large diffs are not rendered by default.

88 changes: 88 additions & 0 deletions staging/src/k8s.io/apiserver/Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ go_library(
"//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library",
"//vendor/k8s.io/apiserver/pkg/storage/value/encrypt/aes:go_default_library",
"//vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope:go_default_library",
"//vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/vault:go_default_library",
"//vendor/k8s.io/apiserver/pkg/storage/value/encrypt/identity:go_default_library",
"//vendor/k8s.io/apiserver/pkg/storage/value/encrypt/secretbox:go_default_library",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ import (
"github.com/golang/glog"

"k8s.io/apiserver/pkg/storage/value/encrypt/envelope"
"k8s.io/apiserver/pkg/storage/value/encrypt/envelope/vault"
)

func init() {
KMSPluginRegistry.Register("vault", vault.KMSFactory)
Copy link
Member

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.

Copy link
Author

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

Copy link
Author

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.

}

// Factory is a function that returns an envelope Service for encryption providers.
// The config parameter provides an io.Reader handler to the factory in
// order to load specific configurations. If no configuration is provided
Expand Down
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",
],
)
Loading