f54ba38cf5
implement TokenRole metamodel and corresponding builder
2020-04-06 17:58:11 +02:00
8f10bbfed7
add missing fields to token data
...
* entity_id
* expire_time
* explicit_max_ttl
* issue_time
* renewable
* type
2020-03-29 14:29:06 +02:00
a4a0e13904
add missing fields to auth response
...
* token_policies
* entity_id
* token_type
* orphan
2020-03-29 14:29:06 +02:00
df696e9f17
add token type to model and builder classes
2020-03-29 14:29:06 +02:00
83a05fcd40
correctly map token policies on lookup ( close #35 )
...
Remove superfluous "role" flag and add "policies" list instead.
2020-03-29 13:59:06 +02:00
071eeda423
correclty map token meta in lookup response ( fix #34 )
2020-03-29 12:56:06 +02:00
596a097707
fix API endpoint for token lookup
2019-10-16 18:00:45 +02:00
efb0aba7cd
Clean up imports of factory class
2019-03-24 11:51:19 +01:00
d8b9c2b373
Add static builder() method to AppRole class
2019-03-23 21:18:23 +01:00
5bd6a90f25
Add static builder() method to Token class
2019-03-23 11:07:03 +01:00
d6f422e0ec
Back to future [skip ci]
...
Some source files have lived in a feature branch since 2018 and did not
receive the update to 2019...
2019-03-22 17:08:28 +01:00
42c2869675
Minor JavaDoc adjustments
2019-03-22 16:45:16 +01:00
eabc458176
Add missing parameters to JavaDoc [skip ci]
2019-03-22 15:01:21 +01:00
dee7ec0b23
Implement update of KV v2 metadata ( #16 )
2019-03-22 14:40:27 +01:00
ab33325b8e
Implement writing of KV v2 secret data ( #16 )
2019-03-22 14:27:30 +01:00
e4cf8a1dde
Move 204 empty checks into request helper and make Error class private
2019-03-22 10:19:06 +01:00
22a48d4a90
Move parsing of JSON response into RequestHelper
...
The pattern is always the same, issue request, parse String response
into target class and catch exceptions. Bundle these blocks in the
helper class for GET, POST and PUT methods to reduce overhead in the
actual connector.
2019-03-22 10:03:49 +01:00
51e54d9870
Extract request methods and error codes into separate classes.
...
To clean up the actual connector class all HTTP wrappers are now bundled
within the RequestHelper class.
2019-03-21 20:17:04 +01:00
b103d6e804
Bundle authorization check in method to reduce repetition
2019-03-21 20:13:50 +01:00
1aade2882b
Clean up imports and move common parameters into constants
2019-03-17 15:15:35 +01:00
068f961454
Introduce "mount" parameter for KV v2 methods ( #25 )
...
The backend can be mounted on an arbitrary path, so this path can now be
passed as an arugment along with the corresponding method call.
2019-03-17 15:15:35 +01:00
ad2986195d
Merge branch 'feature/16-kv_v2_support' into develop
2019-03-17 14:05:56 +01:00
e59073cf00
Update copyright notice to 2019 [skip ci]
...
Happy new year!
2019-01-08 19:11:18 +01:00
263669362f
Code style: add curly braces to all one-line if-else blocks
2018-11-20 14:36:29 +01:00
d1876c88aa
Add unit tests for secret metadata models and fixed JSON property name
2018-11-20 13:50:28 +01:00
493bed55f0
Add method to read specific secret version
2018-11-20 12:08:58 +01:00
e41a61f33b
Add methods to delete, undelete and destroy KV v2 secret versions
2018-11-20 11:59:15 +01:00
e3f2193df2
Add capability to pass options map when writing to Vault
...
This is required to create or update KV v2 secrets. The existing write
method delegates to the new one with null-value for the options map.
2018-11-20 11:26:02 +01:00
068a87d915
Add methods for reading KV v2 data and metadata
2018-11-20 11:09:58 +01:00
04e92626bd
Add response models for KV v2 API
...
Secret response is now split in data and metadata. Pure metadata queries
return the new SecretMetadata class.
2018-11-20 11:09:54 +01:00
9caeac4cba
Support secret_id_bound_cidrs replacing bound_cidr_list for AppRole ( #24 )
...
The latter parameter is deprecated in Vault. The connector now supports
both while the former one is deprecated and will be removed when it is
removed from Vault.
2018-11-19 15:21:19 +01:00
874341ddf7
Removed abstract methods defined in builder interface from factory
2018-10-06 14:28:58 +02:00
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