57 Commits

Author SHA1 Message Date
Mark Paluch
43e89b2975 Polishing.
Introduce VaultSecretBackendDescriptorFactory as abstraction for descriptor factories that can produce multiple SecretBackendDescriptors. Consider VaultSecretBackendDescriptorFactory in Boostrap and Config Data API mechanisms. Add tests.

Original pull request: gh-587
See gh-459
2021-11-24 09:38:11 +01:00
Quintin Beukes
8b943a1c5a Added support for multiple database secrets
Original pull request: gh-587
Closes gh-459
2021-11-24 09:37:52 +01:00
Mark Paluch
fb8ad234d7 Hello 2021. 2021-03-11 11:42:09 +01:00
Mark Paluch
09727718cb Annotate API with Spring's @NonNullApi/@Nullable to indicate null/non-null rules
Closes gh-494.
2020-09-24 11:43:31 +02:00
Mark Paluch
a60c51907c 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.
2020-09-21 13:54:24 +02:00
fhitchen@gmail.com
7a2742cfbc Add support for Couchbase through vault-plugin-database-couchbase
Original pull request: gh-408.
2020-09-21 13:53:30 +02:00
Mark Paluch
9d15c5db0a Remove Bootstrap context marker class from classpath
See gh-483
2020-09-21 09:47:07 +02:00
Mark Paluch
451ccb0bb3 Add Vault implementation for ConfigDataResolver and ConfigDataLoader
Discover SecretBackendMetadataFactory and VaultSecretBackendDescriptor using spring.factories. Add instance suppliers for all imperative support classes.

Resolves gh-483.
2020-09-21 09:46:48 +02:00
Mark Paluch
477e8b9bb9 Polishing
Reformat code using new formatter Settings.

See gh-482.
2020-09-17 11:28:42 +02:00
Mark Paluch
701ad55632 Polishing
Fiy typos, improve wording.

See gh-392.
2020-05-20 14:53:38 +02:00
Mark Paluch
0ea68bad57 Database support for Elasticsearch
Spring Cloud Vault can now obtain credentials for Elasticsearch's HTTP API by enabling vault.config.backends.elasticsearch.enabled=true and providing a role name.

Closes gh-392.
2020-05-20 14:51:58 +02:00
Mark Paluch
0f7b9ec7fc Remove spring.cloud.vault.generic configuration properties.
Spring Cloud Vault uses now a single mechanism for key-value backend configuration. Properties at spring.cloud.vault.generic.* are no longer supported.

All associated functionality is now solely available by configuring the corresponding spring.cloud.vault.kv.* properties. The support classes GenericSecretBackendMetadata and VaultGenericBackendProperties were removed in favor of KeyValueSecretBackendMetadata respective VaultKeyValueBackendProperties. spring.cloud.vault.kv.enabled is now enabled by default to preserve spring.cloud.vault.generic.enabled behavior.

Closes gh-395
2020-05-20 10:57:33 +02:00
Mark Paluch
a9bacf2d2c Reinstate VaultConfigCassandraTests
Closes gh-380.
2020-03-19 11:34:23 +01:00
Ryan Baxter
6cdc91f71e fixing compile errors 2020-02-06 11:01:53 -05:00
Spencer Gibb
15257f2e87 Comments out old cassandra classes 2020-01-22 15:42:17 -05:00
Mark Paluch
0c45446882 Polishing
Use SpringRunner instead of SpringJUnit4ClassRunner.
2020-01-16 09:35:04 +01:00
Mark Paluch
4118d4a076 Update license headers to 2020
Closes gh-376.
2020-01-10 15:15:25 +01:00
Mark Paluch
8af88cca87 Reduce need for bean method proxying and disable where not needed.
Closes gh-360.
2019-10-21 10:21:44 +02:00
Mark Paluch
594a2c2d17 Polishing.
Disable static role support for deprecated mysql and postgres databases. Reorder properties. Add author tags. Update license headers.

Add unit test for static credential path.

Original pull request: gh-348.
Closes gh-347.
2019-08-16 10:05:52 +02:00
Sebastien Nahelou
5321602838 Add static role support for Vault 1.2.
Original pull request: gh-348.
See gh-347.
2019-08-16 10:05:27 +02:00
Mark Paluch
62bd0d540c Remove Lombok usage.
Closes gh-341.
2019-07-03 09:47:58 +02:00
Mark Paluch
175b5acf57 Polishing.
Closes gh-333.
Original pull request: gh-334.
2019-05-20 11:50:49 +02:00
Spring Operator
474da44c8e URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 2 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 111 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).

Original pull request: gh-305.
2019-03-21 21:17:02 +01:00
Spring Operator
c6045f29e8 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

Closes gh-297.
2019-03-21 22:14:53 +02:00
Mark Paluch
041857263a Fix Checkstyle violations.
Closes gh-290.
2019-03-14 10:24:22 +01:00
Mark Paluch
91c21abde5 Upgrade to Apache Cassandra 3.11.4
Closes gh-282
2019-02-13 15:12:54 +01:00
Mark Paluch
b712206e51 Disable JMX reporting in Cassandra tests.
Closes gh-281.
2019-02-13 14:55:39 +01:00
Marcin Grzejszczak
9d9776f5c8 Applied checkstyle rules 2019-02-07 11:25:07 +01:00
Mark Paluch
def779d239 Add Checkstyle integration.
Closes gh-276.
2019-02-07 10:47:14 +01:00
Mark Paluch
0a32f6a857 Disable Cassandra JMX reporting to prevent NoClassDefFoundError.
Closes gh-262.
2018-11-14 08:46:20 +01:00
Mark Paluch
6f0f75643b Allow bean override to pass tests.
See gh-235.
2018-08-02 17:02:37 +02:00
Mark Paluch
79b04f2dc8 Upgrade to Spring Vault 2.1 snapshots, Reactor Californium, Spring Boot 2.1.
Fix bean overrides caused by the reactive health indicator.

Disable TlsCert authentication tests because of Reactor's HttpClient interference with SSL configurations.

See gh-235.
2018-08-02 17:01:41 +02:00
Mark Paluch
c60979dbe9 Polishing.
Upgrade to newer language constructs (try-with-resources, lambdas, diamond syntax), remove redundant throws.

See gh-208.
2018-04-05 10:29:55 +02:00
Mark Paluch
962dbc8a55 Review deprecated code usage.
Suppress warnings for own deprecated code usage in tests as we provide types that are deprecated yet we want to cover these with tests.

Move off external deprecated API.

Closes gh-208.
2018-04-05 10:15:51 +02:00
Mark Paluch
847539afc9 Polishing.
Update copyright year range to 2018.
2018-01-17 16:05:33 +01:00
Mark Paluch
5dd65c8fcd Retain Vault JSON data type in property source.
Closes gh-189.
2018-01-17 16:05:33 +01:00
Mark Paluch
08d2a2e4c3 Polishing.
Convert spaces to tabs. Deprecate VaultPostgreSqlProperties and VaultMySqlProperties. Convert database integration test to use MySQL. Slightly reword reference documentation.

Upgrade lombok to 1.16.18 to use onMethod_ attributes.

Original pull request: gh-170.
Related ticket: gh-169.
2017-10-27 11:41:59 +02:00
Per Abich
9da5e83dc9 Add support for Vault's database backend.
We now support Vault's database backend directly. MySQL and PostgreSQL configuration properties are deprecated now in favor of spring.cloud.vault.database. Cassandra and MongoDB backends remain active and default to their deprecated backends to support multi-database configuration of multiple, various database types.

spring.cloud.vault:
    database:
        enabled: true
        role: readonly

Original pull request: gh-170.
Related ticket: gh-169.
2017-10-27 11:41:43 +02:00
Mark Paluch
cfe3f42e08 Use mysql-legacy-database-plugin for tests.
Use the legacy plugin to generate shorter user names (required for the MySQL version used on TravisCI).

See gh-169.
2017-10-27 10:10:29 +02:00
Mark Paluch
c7666ecdec Add integration test for Vault's database backend.
See gh-169.
2017-10-20 17:35:59 +02:00
Mark Paluch
1c116f5c5b Upgrade to Validation API 2.0.
Closes gh-159.
2017-09-21 15:22:07 +02:00
Mark Paluch
97bcf1ebe8 Allow overriding SecretBackendMetadataFactory beans.
We now allow overriding SecretBackendMetadataFactory by application-provided configuration to customize behavior of integrated secret backends.

Closes gh-118.
2017-06-06 15:09:51 +02:00
Mark Paluch
31c365c959 Introduce path to SecretBackendMetadata. 2017-05-20 17:17:14 +02:00
Mark Paluch
44f3c10b9b Use unique bean names for SecretBackendMetadataFactory beans.
We now use unique bean names for SecretBackendMetadataFactory beans for bean definition. Previously, we used the same bean name (secretBackendMetadataFactory) across all bean definitions which causes definition overrides. The overrides erased previously defined beans so only a single instance of SecretBackendMetadataFactory was defined and using multiple Spring Cloud Vault modules at the same time was not possible.

Closes gh-94.
2017-04-05 19:39:17 +02:00
Mark Paluch
0add1698d5 Annotate Vault…Properties with @Validated to enable property validation.
Closes gh-96.
2017-04-05 19:35:42 +02:00
Mark Paluch
97645a29a6 Adopt Spring Vault's VaultClient removal.
Closes gh-78.
2017-02-16 15:02:22 +01:00
Mark Paluch
6d0ef0e400 Use Spring Cloud Vault-specific users for integration tests.
Use springvault instead of spring for integration tests with databases to avoid naming conflicts. MySQL requires short (<16 chars) user names and PostgreSQL does not permit names with hypens.

Fixes gh-65.
2017-01-10 15:49:24 +01:00
Mark Paluch
80d38f46ff Upgrade to Vault 0.6.2.
Setup test run with Vault 0.5.3 to 0.6.2, guard tests accessing features available since specific versions.

Fixes gh-44.
2016-10-10 08:24:30 +02:00
Mark Paluch
0f0a6957e3 Polishing.
Rename SecureBackend to SecretBackend. Refactor SecureBackendAccessor to SecretBackendMetadata. Move Property Transformation into PropertyTransformer. Enhance JavaDoc. Remove Properties beans and use EnableProperties annotation.
2016-10-10 08:24:30 +02:00
Mark Paluch
b291e9c989 Support lease lifecycle (renewal and revocation).
Spring Cloud Vault now handles lifecycle of obtained secrets by property sources. Secrets associated with a renewable lease are renewed before they expire until terminal expiration. Application shutdown revokes leases so generated credentials can be disabled by Vault.

Fixes gh-40.
2016-10-10 08:24:26 +02:00