Commit Graph

50 Commits

Author SHA1 Message Date
Mark Paluch
c26674bade [maven-release-plugin] prepare for next development iteration 2017-03-16 14:42:26 +01:00
Mark Paluch
d6596c1e56 [maven-release-plugin] prepare release 1.0.0.RC1 2017-03-16 14:42:26 +01:00
Mark Paluch
7bc05c721c Use RelaxedPropertyResolver for default configuration property lookup.
We now use RelaxedPropertyResolver to resolve configuration property defaults because `@Value` defaulting does not support relaxed binding. Previously configuration properties were annotated with of `@Value` specifying a cascade of property names.

Fixes gh-87.
2017-03-09 18:35:18 +02:00
Mark Paluch
754ae1eee7 Adopt Spring Vault's LeaseAwareVaultPropertySource.
We now use Spring Vault's LeaseAwareVaultPropertySource instead of the own `LeaseAwareVaultPropertySource`.

Closes gh-88.
2017-03-09 17:58:53 +02:00
Ryan Hoegg
bee9e716e2 Load secrets from several Vault paths
Load secrets from several Vault paths, according to the comma delimited application name.

fixes gh-74
2017-03-03 15:40:09 -05:00
Mark Paluch
5fcd5694a4 Use Apache Commons Logging instead of SLF4J.
Align logging API use with Spring Boot and Spring Cloud. Drop slf4j dependency from pom files.

Closes gh-84.
2017-02-24 16:51:57 -05:00
Mark Paluch
c15d1181ee Use create daemon threads in ThreadPoolTaskScheduler.
Use create daemon threads in ThreadPoolTaskScheduler to not prevent application shutdown if the ThreadPoolTaskScheduler is not shut down upon application exit. ThreadPoolTaskScheduler may stay active because the actual threads prevent a VM exit so the shutdown hook isn't called.

Fixes gh-81.
2017-02-24 14:17:43 -05:00
Mark Paluch
97645a29a6 Adopt Spring Vault's VaultClient removal.
Closes gh-78.
2017-02-16 15:02:22 +01:00
Spencer Gibb
3e63afc3f0 polish 2017-02-01 14:44:23 -07:00
Mark Paluch
74d8012b9f [maven-release-plugin] prepare for next development iteration 2017-01-27 09:08:04 +01:00
Mark Paluch
09a9afed60 [maven-release-plugin] prepare release 1.0.0.M2 2017-01-27 09:07:57 +01:00
Mark Paluch
19c99b2ca8 Flatten Vault JSON to Properties.
Fixes gh-61.
2016-12-15 11:22:43 +01:00
Mark Paluch
59541f0230 Add support for OkHttp3.
Fixes gh-63.
2016-12-14 11:36:25 +01:00
Mark Paluch
a7c4cff540 Fix HashiCorp lettercasing.
Fixes gh-54.
2016-10-28 17:00:05 +02:00
Mark Paluch
4df846bfd6 [maven-release-plugin] prepare for next development iteration 2016-10-28 14:07:33 +02:00
Mark Paluch
fb5bb7a2a1 [maven-release-plugin] prepare release 1.0.0.M1 2016-10-28 14:07:29 +02:00
Mark Paluch
a48bf92036 Assert Spring Boot 1.3/Spring 4.2 compatibility.
Fixes gh-48.
2016-10-18 09:00:26 +02:00
Mark Paluch
a738d38bc5 Use VaultTokenRequestBuilder in Vault preparation.
Fixes gh-46.
2016-10-13 19:12:41 +02:00
Mark Paluch
d099df8ab0 Polishing.
Improve documentation.
2016-10-12 19:38:35 +02:00
Mark Paluch
ad305e6625 Support AppRole authentication.
We now support AppRole authentication. This authentication method uses a provided RoleId and optionally SecretId to authenticate against Vault.

Fixes gh-39.
2016-10-12 19:38:22 +02: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
17e0412bf1 Polishing.
Provide readable artifact display names. Interit groupId from parent.
2016-10-10 08:24:29 +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
Gustavo Monarin de Sousa
3539000c9c Adopt refactoring from Spring Vault.
Use VaultInitializationRequest.create factory method and VaultInitializationResponse.getRootToken in PrepareVault.

Original pull request: gh-43.
2016-10-06 17:40:57 +02:00
Mark Paluch
cae61d63c2 Use LifecycleAwareSessionManager to revoke login token on application shutdown
See gh-40.
2016-10-06 16:45:45 +02:00
Mark Paluch
ea09b804b0 Polishing.
Adopt Vault 0.6.1 compatibility in tests (disabled generation of root tokens). Fix typos.
2016-09-25 19:37:49 +02:00
Mark Paluch
4cbd08ec94 Fix Content-Length handling using Netty.
VaultClient now uses a ClientHttpRequestInterceptor to force marshaling. Outgoing data is buffered and available as byte array. This allows setting a Content-Length header using netty. Previously, requests were streamed to the TCP channel without knowing the request body size in advance. Vault expects a Content-Length header and rejected requests with a body but without a Content-Length header.

Fixes gh-19.
2016-09-24 11:28:50 +02:00
Mark Paluch
90b8f15860 Add support for cubbyhole authentication.
We now support cubbyhole authentication to securely use tokens. Cubbyhole authentication uses Vault primitives to provide a secured authentication workflow. Cubbyhole authentication uses tokens as primary login method.
An ephemeral token is used to obtain a second, login VaultToken from Vault's Cubbyhole secret backend. The login token is usually longer-lived and used to interact with Vault. The login token will be retrieved from a wrapped response stored at `/cubbyhole/response`.

A wrapped token can be created with:
vault token-create -wrap-ttl="10m"

boostrap.yml:
spring.cloud.vault:
    authentication: CUBBYHOLE
    token: (the wrapping token)

Fixes gh-15.
2016-09-21 22:21:31 +02:00
Mark Paluch
b95e8d90eb Upgrade to Spring Boot 1.4 SR1.
Upgrade to 1.4.1.RELEASE. Migrate to SpringBootTest annotation usage.

Fixes gh-38.
2016-09-21 21:29:23 +02:00
Mark Paluch
ff1540e71c Reformat code.
Reformat code and reorganize import using the code formatter settings.
2016-09-21 20:57:10 +02:00
Mark Paluch
7a09c9875f Refactor code to use Spring Vault.
Extract VaultClient and configuration parts into Spring Vault and reimport using the spring-vault-core dependency.

Fixes gh-37
2016-09-21 20:54:29 +02:00
Mark Paluch
bfb0854e91 Polishing
Add author tag. Improve documentation. Regenerate readme.

Original pull request: gh-36
2016-09-21 19:13:24 +02:00
Jean-Philippe Bélanger
bc02b8d3ff Support priority ordering for VaultPropertySourceLocator.
We now support setting a priority for VaultPropertySourceLocator by configuring `spring.cloud.vault.config.order`. Lower values increase priority, higher values decrease priority. Applying a priority can be used to control VaultPropertySourceLocator precedence over other property sources.

Original pull request: gh-36.
2016-09-21 19:08:39 +02:00
Mark Paluch
d1e710bd7f Polishing
Reformat code. Use state key for health indicator details. Add health method declaration to VaultOperations. Switch actuator dependency to optional dependency. Add tests.

Original pull request: gh-29
Fixes gh-24
2016-08-27 07:51:05 +02:00
Stuart Ingram
a747663447 Added HealthIndicator functionality as well as health API support.
Resolves #24
2016-08-26 15:16:27 -04:00
Mark Paluch
33553bf051 Add support for TLS certificate authentication
We now support TLS client certificate authentication. The client needs to enable SSL and configure a keystore containing the client certificate/private key pair.

spring.cloud.vault:
    authentication: CERT
    ssl:
        key-store: classpath:keystore.jks
        key-store-password: changeit

Fixes gh-25
2016-07-21 17:21:49 +02:00
Mark Paluch
5e3eb5d047 Refactor ClientAuthentication to use VaultClient
See gh-23
2016-07-19 16:40:22 +02:00
Mark Paluch
d4f40a1f40 Provide a Vault client API for low-level and higer-order functions
Split functionality from VaultClient and refactor it into VaultConfigOperations/VaultConfigTemplate. The template now holds the authentication state and the property source just uses the template.

Fixes gh-23
2016-07-19 16:39:49 +02:00
Mark Paluch
5475f58bf1 Support AWS-EC2 authentication
We now support AWS-EC2 authentication for applications running on EC2 instances. This authentication method uses the PKCS7 identity document to authenticate against Vault. It provides support for nonce (enabled by default) and roles.

fixes gh-17
2016-07-05 21:31:33 +02:00
Mark Paluch
232aae9ba8 Refactor ClientAuthentication into own component
The authentication API can be provided into VaultClient by implementing a ClientAuthentication.
2016-07-04 22:45:47 +02:00
Mark Paluch
656c181178 Add possibility to disable generic backend #12 2016-06-23 08:58:58 +02:00
Mark Paluch
915df54325 Create BOM and starter #13
Create a Bill of Materials (spring-cloud-vault-dependencies) and refactor dependencies to the BOM. Create also a starter to simplify adoption.
2016-06-23 08:58:54 +02:00
Mark Paluch
c0da914b00 Split into modules #11
Split Spring Cloud Vault Config into multiple modules: Core, Config, Database/Consul/RabbitMQ integrations.
2016-06-23 00:13:58 +02:00
Mark Paluch
625e60174f Support RabbitMQ credential generation
fixes gh-10
2016-06-19 17:57:05 +02:00
Mark Paluch
ddf9d9de91 Support Consul credential generation
Fixes gh-5
2016-06-19 17:41:19 +02:00
Mark Paluch
69a4bd2092 Support Consul credential generation
Fixes gh-5
2016-06-19 10:34:28 +02:00
Mark Paluch
7a27b605f7 Upgrade to Vault 0.6.0.
fixes gh-9
2016-06-18 10:21:16 +02:00
Mark Paluch
8302e662eb Polishing.
Adopt changed relative paths. Move setup scripts back to src/test/bash.

Original pull request: #8.
2016-06-10 15:57:19 +02:00
Marcin Grzejszczak
62f5f865d5 Modularized the project 2016-06-10 15:02:22 +02:00