Commit Graph

210 Commits

Author SHA1 Message Date
Mark Paluch
006b5931a6 Update copyright years to 2020
Closes gh-518.
2020-01-10 13:20:00 +01:00
Mark Paluch
0120b07e84 Polishing
Add tests for write and delete.

Closes gh-503
Closes gh-511
2019-12-02 10:22:31 +01:00
Raoof Mohammed
dbddb741f2 Propagate not found exception for write and delete of absent paths
if 404, return Mono.empty -> read/list and Mono.error -> write/delete

Closes gh-503.
2019-12-02 09:20:00 +01:00
Mark Paluch
211cc61718 Fix AbstractVaultConfiguration javadoc.
Closes gh-486.
2019-10-21 12:34:00 +02:00
Mark Paluch
604846b05e Consistently use doWithSession(…) from within VaultTemplate.
Closes gh-481.
2019-09-30 13:43:15 +02:00
Mark Paluch
7116138728 Switch from GoogleApacheHttpTransport to NetHttpTransport.
GoogleApacheHttpTransport breaks with the current 4.5.x HttpClient dependency so we're switching to NetHttpTransport that uses HttpURLConnection.

Closes gh-463.
2019-09-02 11:01:55 +02:00
Pragalbh Garg
fad74ded47 Fixed incorrect assert fail message in KubernetesAuthentication.
Original pull request: gh-459.
2019-08-14 09:44:43 +02:00
Mark Paluch
58715e9e7c Polishing.
Fix generic usage to work with Java 12.

Original pull request: #454.
2019-08-01 16:33:51 +02:00
Mark Paluch
05686165b3 Upgrade TravisCI to use Java 12.
Original pull request: #454.
2019-08-01 09:46:06 +02:00
Mark Paluch
338f5cfb4c Consistently resolve property placeholders in VaultPropertySource path.
We now resolve property placeholders during configuration class parsing using Environment.resolveRequiredPlaceholders(…).

Previously, only placeholders in non-renewable property sources were resolved as they were part of BeanDefinition. Rotating/renewable property sources used a scalar RequestedSecret object which did not participate in bean definition.

Resolves gh-420.
2019-05-01 21:40:22 +02:00
Mark Paluch
69808a6ea9 Use unique bean names for VaultPropertySource registration.
We now make sure to register VaultPropertySourceRegistrar once and to use unique bean names for vaultPropertySource beans.

Resolves: gh-421.
2019-05-01 21:04:22 +02:00
Mark Paluch
320fe6404e Consider Vault base path in VaultClients
VaultClients.toBaseUri(…) now properly renders endpoints considering the path segment from VaultEndpoint.

Resolves: gh-413.
2019-04-11 14:34:08 +02:00
Spring Operator
cfe357c888 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 306 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0.txt with 1 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0.txt ([https](https://www.apache.org/licenses/LICENSE-2.0.txt) result 200).

Original pull request: #398.
2019-03-25 10:14:59 +02:00
Spring Operator
fe6de53339 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).

Original pull request: gh-394.
2019-03-21 22:07:00 +02:00
Mark Paluch
122f1c72e7 Do not inject base URI components to absolute URIs.
PrefixAwareUriBuilderFactory now no longer injects components from a base URI into a URI that is considered an absolute one (URI starting with https: or http: protocol schemes).

Resolves gh-377.
2019-02-19 10:44:30 +01:00
Mark Paluch
7d64d28b8a Polishing.
Improve Javadoc.

See gh-109.
2019-02-13 15:18:53 +01:00
Mark Paluch
4c46549e77 Improve documentation on Token authentication, renewal and SessionManager use.
Closes gh-369.
2019-02-11 11:10:33 +01:00
Mark Paluch
c85a966017 Update copyright years to 2019.
Closes gh-348.
2019-01-02 12:28:05 +01:00
Mark Paluch
81f395cd03 Polishing.
Remove superfluous SuppressWarnings annotations.

See gh-345.
2018-12-09 16:47:12 +01:00
Mark Paluch
e0df032096 Remove code duplicates from VaultWrappingTemplate.
Resolves gh-345.
2018-12-09 16:46:39 +01:00
Mark Paluch
4fe639787d Polishing.
Remove final keywords from method arguments.

Resolves gh-344.
2018-12-09 16:30:10 +01:00
Mark Paluch
ae25e394ad Replace own Base64 class with Spring's Base64Utils.
Resolves gh-344.
2018-12-09 16:28:18 +01:00
Mark Paluch
90356746d1 Polishing
Pass token in auth/token/… within the POST body instead of using the URL.

See gh-336.
Original pull request: gh-337.
2018-11-22 20:57:30 +01:00
Mark Paluch
491aaa3318 Fix secret rotation on expired leases
Handling for expired leases now considers the appropriate exception type.

Closes gh-319.
2018-10-10 09:14:55 +02:00
Mark Paluch
2dbf06f4e5 Attach offending HttpStatusCodeException to VaultException
We now attach HttpStatusCodeException as cause when constructing VaultException for error handling purposes.

Previously, the cause was unset which required message parsing to detect the actual cause.

See gh-319.
2018-10-10 09:14:55 +02:00
Mark Paluch
605de0ab39 Rename threadPoolTaskScheduler bean to vaultThreadPoolTaskScheduler.
Prefix bean name with vault to indicate its relation to Vault's configuration.

Closes gh-318.
2018-10-05 10:56:06 +02:00
Nándor István Krácser
47172ab469 Fix typo in KubernetesAuthenticationOptionsBuilder.
Original pull request: gh-317.
2018-10-05 10:44:15 +02:00
Mark Paluch
4b5e73d760 Upgrade Maven plugins to enable builds on Java 11.
Closes gh-302.
2018-09-07 11:12:24 +02:00
Mark Paluch
4f6cac44b2 Configure OkHttp3 with a dedicated X509TrustManager.
Closes gh-301.
2018-09-07 10:55:48 +02:00
Mark Paluch
20692f843a Upgrade to Spring Data Lovelace RC2.
Closes gh-298.
2018-09-07 09:56:47 +02:00
Mark Paluch
481431593e Polishing.
Convert space to tab indentation. Rename Gcp…Provider to Gcp…Accessor. Merge default implementation of accessors into DefaultGcpCredentialAccessors enum. Reduce builder method visibility of accessor configuration methods to expose fewer public methods. Javadoc, formatting, extract methods.

Original pull request: gh-287.
See gh-261
2018-09-03 11:10:53 +02:00
Magnus Jungsbluth
41645f1034 Allow configuration of service account id and project id values GCP IAM Authentication.
Original pull request: gh-287.
Closes gh-261.
2018-09-03 11:09:08 +02:00
Mark Paluch
d7d9042191 Encapsulate Vault lease endpoint differences in LeaseEndpoints.
We now provide a LeaseEndpoints enum that reflects differences between Vault versions regarding their lease endpoints.

Related pull request: gh-282.
Closes gh-262.
2018-08-27 16:33:01 +02:00
Mark Paluch
1fde90afca Polishing.
Remove final keyword from local variables. Extract renewal body creation to method. Add author tag.

Original pull request: gh-282.
See gh-262.
2018-08-27 16:32:57 +02:00
Erik Lindblom
94153a5fcb Moving lease id into body of lease renewal request.
Original pull request: gh-282.
See gh-262.
2018-08-27 16:32:28 +02:00
Mark Paluch
3489d6ced6 Polishing.
Add missing assertions. Javadoc.

See gh-284.
2018-08-27 15:45:00 +02:00
Mark Paluch
23184fe415 Add support for Azure authentication.
We now support Azure as authentication backend allowing applications to authenticate that run on VM instances with a bound managed service identity.

Closes gh-284.
2018-08-27 15:45:00 +02:00
Mark Paluch
35da849467 Pretty-print JSON for policy creation.
We now use pretty-printed (formatted) JSON for policy creation/updating to avoid templating character clashes between compact JSON formatting and Vault 0.11's policy templating feature.

Closes gh-288.
2018-08-25 22:46:18 +02:00
Mark Paluch
6a4dd3e84f Adapt to rewritten Reactor Netty.
Adapt to changes in Reactor Netty and Spring Framework 5.1 RC1.

Disable ClientCertificateAuthenticationOperatorIntegrationTests as HttpClient (Reactor Netty) has issues with multiple SSL configurations.

Closes gh-281.
2018-08-02 16:02:42 +02:00
Mark Paluch
a79898c2b9 Support full pull mode in AppRole authentication through AuthenticationSteps.
We now support full pull mode (pull/wrapped) for roleId and secretId leveraging the newly introduced zipWith operator.

Closes gh-259.
2018-08-01 10:21:12 +02:00
Mark Paluch
109973079b Polishing.
See gh-275.
2018-08-01 10:01:38 +02:00
Mark Paluch
c544fc76fd Add zipWith step to AuthenticationSteps.
AuthenticationSteps now allow for combination of two node results.

Closes gh-275.
2018-08-01 10:00:10 +02:00
Mark Paluch
672962645f Make path in WrappedMetadata optional.
Path is provided as of Vault 0.8.0 and we want to support also older Vault versions.

See gh-208.
2018-07-31 18:13:54 +02:00
Mark Paluch
0342ef57c2 Polishing.
See gh-208.
2018-07-31 18:05:14 +02:00
Mark Paluch
5aaefececa Introduce VaultWrappingTemplate to abstract wrapping operations.
We now provide a Template API to interact with Vault wrapping endpoints introduced in Vault 0.6.2.

Object body = …;

WrappedMetadata metadata = wrappingOperations.wrap(body, Duration.ofSeconds(100));

VaultResponse response = wrappingOperations.read(metadata.getToken());

Closes gh-208.
2018-07-31 18:05:02 +02:00
Mark Paluch
93384d6425 Guard tests against unsupported Vault versions.
Closes gh-263.
2018-07-28 20:59:20 +02:00
Mark Paluch
e4e3e793ed Allow customization of Vault's context path.
We now support customization of the context path through VaultEndpoint.setPath(…). The path can also be part of an URI. Empty paths or a single slash are translated to the default context path of v1 denoting the supported API version.

Closes gh-260.
2018-07-27 15:48:46 +02:00
Mark Paluch
461dab9774 Fix TTL format for PKI Certificate Requests.
We now send TTL validity as seconds instead of attempting to serialize a Duration object.

Closes gh-263.
2018-07-27 15:33:22 +02:00
Mark Paluch
8abddfbb7d Polishing.
Extract methods. Make ReactiveLifecycleAwareSessionManager.isTokenRenewable(…) an instance method with protected visibilit to align with LifecycleAwareSessionManager.

See gh-257.
2018-06-25 14:56:35 +02:00
Mark Paluch
d28b81f27f Improve exception handling in session managers.
We now log the HTTP status text along the HTTP status itself and a potential error message. Client errors (HTTP status 4xx) are logged on WARN level as feedback to the application as client errors aren't considered fatal.

We also introduce VaultSessionManagerException and VaultTokenRenewalException to provide exceptions with a specific context.

Closes gh-257.
Related ticket: gh-203.
2018-06-25 14:46:38 +02:00