120 Commits

Author SHA1 Message Date
c111a6aff0 Enforce TLS 1.2 by default with option to override (#22)
The TLS version can be explicitly set in builder or constructor. If not
given, the connector will only use 1.2 as Vault does by default, too.
2018-10-06 14:24:06 +02:00
13793dc9ce Add replication flags to HealthResponse (closes #21) 2018-10-06 10:58:43 +02:00
44858edb76 Add missing flags to SealResponse (closes #20) 2018-10-05 20:31:59 +02:00
d2aaea1938 Clean up after migration to Builder
* Corrected implementation of Builder interface instead of the abstract Factory class

* Removed withSslContext() which is already deprecated in the factory
2018-03-25 17:45:59 +02:00
065f662b95 Add package-info and overview.html for more Javadoc output 2018-03-25 14:57:07 +02:00
23fbc7a6d3 Replaced VaultConnectorFactory with VaultConnectorBuilder
The class is more a builder than a factory, so is has been renamed.
The factory delegates to the builder for now to ease migration, but will
be removed with the next major release.
2018-03-24 13:59:22 +01:00
1a18f9f6b7 Refactored custom trusted CA strategy
The connector no longer stores the final SSLContext, but the trusted
X509Certificate object and creates a SSLSocketFactory as required.
2018-03-24 13:43:27 +01:00
91fb012acc Update copyright notice to 2018 2018-01-01 17:22:02 +01:00
007b523295 Extracted nested try-blocks from response handling into new methods. 2017-10-03 17:29:11 +02:00
061c1e9743 Minor CleanUp
Reworked some JavaDoc comments and optimized imports.
2017-10-03 17:12:03 +02:00
1ed5d8d992 Added tests for unexpected 200 responses.
Some methods do expect code 204 (successful without result), those are now covered by tested.
2017-09-27 20:07:12 +02:00
f70fc084be Override toString() on ErrorResponse
Partially reverts last commit that added first error message to exception
without checking for presence of such.
2017-09-25 20:48:36 +02:00
29776f459e Fixed Exception class on invalid response during sealStatus() 2017-09-25 20:35:37 +02:00
4ca8aa56d2 Test constructors and exceptions on sealStatus 2017-09-24 13:23:13 +02:00
e002fc749a Adaptation to Vault 0.8 endpoints for renew and revoke leases (#11)
Breaking backwards compatibility with Vault 0.7 and below.
2017-09-24 11:08:00 +02:00
43511dc20b AppRole path generation with pre-formatted String 2017-08-29 09:04:04 +02:00
05b44759c0 Bundled common error messages in static inner class 2017-08-29 08:56:30 +02:00
51e505313a Removed deprecated method listAppRoleSecretss (#14)
Has been deprecated because of a typo in the method name in v0.6.2.
As of 0.7 it is now removed. Please use listAppRoleSecrets() instead.
2017-08-29 08:18:10 +02:00
a1784245a3 Refactored (un)seal methods to throw Exception instead of catching it (#12) 2017-08-28 19:24:52 +02:00
df7de5dd73 Health status query and response model implemented (#15) 2017-08-28 17:50:24 +02:00
5b34cfcc27 Refactored extraction of auth backends
Changed iteration over keys ot iteration over entries.
Implemented unit test as part of this process.
2017-08-19 12:16:57 +02:00
238ac8bd10 Do not print stacktrace in response models (#13) 2017-08-18 21:09:40 +02:00
c8a2e0784f Do not print stacktrace on PUT request (#13) 2017-08-18 20:58:57 +02:00
23f98f190b Fix typo in method name listAppRoleSecrets (#14) 2017-08-18 20:45:47 +02:00
52a1abfb87 Fields of InvalidResposneException made final
Deprecated pseudo-builder methods withStatusCode() and withResponse() in
favor of additional constructor arguments to enforce fixed state.
2017-08-18 17:47:55 +02:00
8ae4dccdd6 Throw more speaking Exception when parsing body failed
Removed the fall-through behavior in code 200 exception.
2017-08-18 17:01:30 +02:00
7ac550230f Prevent potential NPE on SecretResponse getter 2017-08-18 16:58:33 +02:00
42094101a3 Code style
A number of style corrections in main source files.
Trimmed lines to 120 characters, added some spaces and line breaks.
Removed unused imports
2017-08-02 17:46:56 +02:00
259747afae JavaDoc fixes
Added various JavaDoc blocks for public methods in model classes and some minor style corrections.
2017-08-02 17:46:56 +02:00
d7365dcaf1 Fix typo in TokenData.getCreationTtl()
The method getCreatinTtl() has been renamed to getCreatoinTtl(),
2017-08-02 17:46:56 +02:00
c24d1cae0b Fix CredentialsPassword model 2017-08-02 17:46:56 +02:00
af7b99587f Model classes and various method parameters declared final.
As the model classes are not designed for inheritance, they are now explicitly declared final.
Same for various input parameters, as thes should be immutable in most methods.
2017-08-02 17:46:55 +02:00
ed703f6e53 Implement AutoCloseable 2017-04-13 19:49:47 +02:00
e767c07a61 #8 Initialization from environment variables 2017-04-13 19:46:01 +02:00
c1f6ee891b #9 Number of retries and custom timeout 2017-04-10 13:22:54 +02:00
5d46e75068 Prevent SecretResponse from raising NPE in get() 2017-04-10 12:30:36 +02:00
7a67080aa0 TlsException cleanup 2017-04-07 15:47:13 +02:00
594b80f62b Typo fix 2017-03-19 12:13:52 +01:00
fca6e496d8 SecretResponse.getValue() deprecated 2017-03-18 14:28:48 +01:00
8129017ad0 #7 Convenience methods for SQL credentials 2017-03-18 14:19:40 +01:00
5f3e285a8a Added "local" attribute for AuthMethod response (0.7.0 compatibility) 2017-03-18 13:48:47 +01:00
107244cb81 Minor fixed and test coverage 2017-02-10 11:16:31 +01:00
ce2de2df81 TokenBuilder with policies as vararg 2017-01-09 12:42:12 +01:00
d7e4e7e5be Writing of complex data 2017-01-09 12:41:49 +01:00
2f312d3937 Read/write/list arbitrary keys 2017-01-08 12:45:07 +01:00
8ab9c23605 Copyright updated 2017-01-07 19:18:37 +01:00
17145e53be Minor JavaDoc corrections 2016-12-24 12:43:58 +01:00
ea3b6d50cb Fix #6 Factory Null-tolerant for trusted certificate 2016-12-21 20:30:28 +01:00
ca51fed145 Unimplemented initialization method removed 2016-12-04 10:18:31 +01:00
b98b7ab95c Dependencies updated 2016-12-04 09:52:04 +01:00