Polishing

Fix property names to spring.couchbase instead of spring.data.couchbase. Fix VaultConfigCouchbaseTests to make it work with Couchbase instead of using Cassandra.

Add CouchbaseSecretIntegrationTests to verify interaction through VaultConfigTemplate. Remove property overrides for username/password so that Vault PropertySources are used. Use unique role name to avoid clashes with other tests.

Enable VaultConfigCouchbaseDatabaseTests for ConfigData API by importing vault://. Update reference documentation.

Resolves gh-408.
This commit is contained in:
Mark Paluch
2020-09-21 13:53:26 +02:00
parent 7a2742cfbc
commit a60c51907c
13 changed files with 165 additions and 208 deletions

View File

@@ -6,3 +6,4 @@ This section briefly covers items that are new and noteworthy in the latest rele
=== New in Spring Cloud Vault 3.0
* Migration of `PropertySource` initialization from Spring Cloud's Bootstrap Context to Spring Boot's <<vault.configdata,ConfigData API>>.
* Support for the <<vault.config.backends.couchbase>> backend.

View File

@@ -344,8 +344,8 @@ Spring Cloud Vault can obtain credentials for Couchbase.
The integration can be enabled by setting
`spring.cloud.vault.couchbase.enabled=true` (default `false`) and providing the role name with `spring.cloud.vault.couchbase.role=…`.
Username and password are available from `spring.data.couchbase.username`
and `spring.data.couchbase.password` properties so using Spring Boot will pick up the generated credentials without further configuration.
Username and password are available from `spring.couchbase.username`
and `spring.couchbase.password` properties so using Spring Boot will pick up the generated credentials without further configuration.
You can configure the property names by setting
`spring.cloud.vault.couchbase.username-property` and
`spring.cloud.vault.couchbase.password-property`.
@@ -358,8 +358,8 @@ spring.cloud.vault:
enabled: true
role: readonly
backend: database
username-property: spring.data.couchbase.username
password-property: spring.data.couchbase.password
username-property: spring.couchbase.username
password-property: spring.couchbase.password
----
====
@@ -369,7 +369,7 @@ spring.cloud.vault:
* `username-property` sets the property name in which the Couchbase username is stored
* `password-property` sets the property name in which the Couchbase password is stored
See also: https://www.vaultproject.io/docs/secrets/couchbase/index.html[Vault Documentation: Setting up Couchbase with Vault]
See also: https://github.com/hashicorp/vault-plugin-database-couchbase[Couchbase Database Plugin Documentation]
[[vault.config.backends.elasticsearch]]
=== Elasticsearch