vault: secret/method -> secret/authentication-method

Signed-off-by: Emily Casey <ecasey@vmware.com>
This commit is contained in:
Emily Casey
2020-06-23 19:09:55 -04:00
parent 663c8095c2
commit 10ace42f07
3 changed files with 22 additions and 22 deletions

View File

@@ -275,11 +275,11 @@ Disable Property: `org.springframework.cloud.bindings.boot.vault.enable`
Any Provider:
| Property | Value
| -------- | ------------------
| `spring.cloud.vault.authentication` | `{secret/method}`
| `spring.cloud.vault.authentication` | `{secret/authentication-method}`
| `spring.cloud.vault.namespace` | `{secret/namespace}`
| `spring.cloud.vault.uri` | `{secret/uri}`
If `{secret/method}` is equal to `approle`:
If `{secret/authentication-method}` is equal to `approle`:
| Property | Value
| -------- | ------------------
| `spring.cloud.vault.app-role.app-role-path` | `{secret/app-role-path}`
@@ -287,7 +287,7 @@ If `{secret/method}` is equal to `approle`:
| `spring.cloud.vault.app-role.role` | `{secret/role}`
| `spring.cloud.vault.app-role.secret-id` | `{secret/secret-id}`
If `{secret/method}` is equal to `aws_ec2`:
If `{secret/authentication-method}` is equal to `aws_ec2`:
| Property | Value
| -------- | ------------------
| `spring.cloud.vault.aws-ec2.aws-ec2-path` | `{secret/aws-ec2-path}`
@@ -295,7 +295,7 @@ If `{secret/method}` is equal to `aws_ec2`:
| `spring.cloud.vault.aws-ec2.nonce` | `{secret/nonce}`
| `spring.cloud.vault.aws-ec2.role` | `{secret/role}`
If `{secret/method}` is equal to `aws_iam`:
If `{secret/authentication-method}` is equal to `aws_iam`:
| Property | Value
| -------- | ------------------
| `spring.cloud.vault.aws-iam.aws-path` | `{secret/aws-path}`
@@ -303,25 +303,25 @@ If `{secret/method}` is equal to `aws_iam`:
| `spring.cloud.vault.aws-iam.role` | `{secret/token}`
| `spring.cloud.vault.aws-iam.server-id` | `{secret/server-id}`
If `{secret/method}` is equal to `azure_msi`:
If `{secret/authentication-method}` is equal to `azure_msi`:
| Property | Value
| -------- | ------------------
| `spring.cloud.vault.azure-msi.azure-path` | `{secret/azure-path}`
| `spring.cloud.vault.azure-msi.role` | `{secret/role}`
If `{secret/method}` is equal to `cert`:
If `{secret/authentication-method}` is equal to `cert`:
| Property | Value
| -------- | ------------------
| `spring.cloud.vault.ssl.cert-auth-path` | `{secret/cert-auth-path}`
| `spring.cloud.vault.ssl.key-store-password` | `{secret/key-store-password}`
| `spring.cloud.vault.ssl.key-store` | `${CNB_BINDINGS}/{name}/secret/keystore.jks`
If `{secret/method}` is equal to `cubbyhole`:
If `{secret/authentication-method}` is equal to `cubbyhole`:
| Property | Value
| -------- | ------------------
| `spring.cloud.vault.token` | `{secret/token}`
If `{secret/method}` is equal to `gcp_gce`:
If `{secret/authentication-method}` is equal to `gcp_gce`:
| Property | Value
| -------- | ------------------
| `spring.cloud.vault.gcp-gce.gcp-path` | `{secret/gcp-path}`
@@ -329,7 +329,7 @@ If `{secret/method}` is equal to `gcp_gce`:
| `spring.cloud.vault.gcp-gce.service-account` | `{secret/service-account}`
If `{secret/method}` is equal to `gcp_iam`:
If `{secret/authentication-method}` is equal to `gcp_iam`:
| Property | Value
| -------- | ------------------
| `spring.cloud.vault.gcp-iam.credentials.encoded-key` | `{secret/encoded-key}`
@@ -340,13 +340,13 @@ If `{secret/method}` is equal to `gcp_iam`:
| `spring.cloud.vault.gcp-iam.role` | `{secret/role}`
| `spring.cloud.vault.gcp-iam.service-account-id` | `{secret/service-account-id}`
If `{secret/method}` is equal to `kubernetes`:
If `{secret/authentication-method}` is equal to `kubernetes`:
| Property | Value
| -------- | ------------------
| `spring.cloud.vault.kubernetes.kubernetes-path` | `{secret/kubernetes-path}`
| `spring.cloud.vault.kubernetes.role` | `{secret/role}`
If `{secret/method}` is equal to `token`:
If `{secret/authentication-method}` is equal to `token`:
| Property | Value
| -------- | ------------------
| `spring.cloud.vault.token` | `{secret/token}`

View File

@@ -50,7 +50,7 @@ public final class VaultBindingsPropertiesProcessor implements BindingsPropertie
map.from("uri").to("spring.cloud.vault.uri");
map.from("namespace").to("spring.cloud.vault.namespace"); // vault enterprise feature
String authenticationMethod = binding.getSecret().get("method");
String authenticationMethod = binding.getSecret().get("authentication-method");
if (authenticationMethod == null) {
LOG.warn(String.format("Key 'method' is missing from secret of binding '%s'", binding.getName()));
return;

View File

@@ -47,7 +47,7 @@ final class VaultPropertiesProcessorTest {
"test-name", Paths.get("test-path"),
metadata(),
baseSecret()
.withEntry("method", "token")
.withEntry("authentication-method", "token")
.withEntry("token", "test-token")
);
@@ -55,7 +55,7 @@ final class VaultPropertiesProcessorTest {
"test-name", Paths.get("test-path"),
metadata(),
baseSecret()
.withEntry("method", "approle")
.withEntry("authentication-method", "approle")
.withEntry("role-id", "test-role-id")
.withEntry("secret-id", "test-secret-id")
.withEntry("role", "test-role")
@@ -66,7 +66,7 @@ final class VaultPropertiesProcessorTest {
"test-name", Paths.get("test-path"),
metadata(),
baseSecret()
.withEntry("method", "cubbyhole")
.withEntry("authentication-method", "cubbyhole")
.withEntry("token", "test-token")
);
@@ -74,7 +74,7 @@ final class VaultPropertiesProcessorTest {
"test-name", Paths.get("test-path"),
metadata(),
baseSecret()
.withEntry("method", "cert")
.withEntry("authentication-method", "cert")
.withEntry("keystore.jks", "key store contents!")
.withEntry("key-store-password", "test-key-store-password")
.withEntry("cert-auth-path", "test-cert-auth-path")
@@ -84,7 +84,7 @@ final class VaultPropertiesProcessorTest {
"test-name", Paths.get("test-path"),
metadata(),
baseSecret()
.withEntry("method", "aws_ec2")
.withEntry("authentication-method", "aws_ec2")
.withEntry("role", "test-role")
.withEntry("aws-ec2-path", "test-aws-ec2-path")
.withEntry("identity-document", "test-identity-document")
@@ -95,7 +95,7 @@ final class VaultPropertiesProcessorTest {
"test-name", Paths.get("test-path"),
metadata(),
baseSecret()
.withEntry("method", "aws_iam")
.withEntry("authentication-method", "aws_iam")
.withEntry("role", "test-role")
.withEntry("aws-path", "test-aws-path")
.withEntry("server-id", "test-server-id")
@@ -106,7 +106,7 @@ final class VaultPropertiesProcessorTest {
"test-name", Paths.get("test-path"),
metadata(),
baseSecret()
.withEntry("method", "azure_msi")
.withEntry("authentication-method", "azure_msi")
.withEntry("role", "test-role")
.withEntry("azure-path", "test-azure-path")
);
@@ -115,7 +115,7 @@ final class VaultPropertiesProcessorTest {
"test-name", Paths.get("test-path"),
metadata(),
baseSecret()
.withEntry("method", "gcp_gce")
.withEntry("authentication-method", "gcp_gce")
.withEntry("role", "test-role")
.withEntry("gcp-path", "test-gcp-path")
.withEntry("service-account", "test-service-account")
@@ -125,7 +125,7 @@ final class VaultPropertiesProcessorTest {
"test-name", Paths.get("test-path"),
metadata(),
baseSecret()
.withEntry("method", "gcp_iam")
.withEntry("authentication-method", "gcp_iam")
.withEntry("credentials.json", "credentials JSON contents!")
.withEntry("encoded-key", "test-encoded-key")
.withEntry("gcp-path", "test-gcp-path")
@@ -139,7 +139,7 @@ final class VaultPropertiesProcessorTest {
"test-name", Paths.get("test-path"),
metadata(),
baseSecret()
.withEntry("method", "kubernetes")
.withEntry("authentication-method", "kubernetes")
.withEntry("role", "test-role")
.withEntry("kubernetes-path", "test-kubernetes-path")
);