deprecate convenience methods to interact with "secret/" mount (#52)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
de17f48be2
commit
e578591a49
@ -1,8 +1,9 @@
|
|||||||
## 0.9.5 (unreleased)
|
## 0.9.5 (unreleased)
|
||||||
|
|
||||||
### Deprecations
|
### Deprecations
|
||||||
* Deprecated builder invocation `VaultConnectorBuilder.http()` in favor of `HTTPVaultConnector.builder()`.
|
* Deprecate ` {read,write,delete}Secret()` convenience methods. Use `{read,write,delete}("secret/...")` instead (#52)
|
||||||
* Deprecated `de.stklcode.jvault.connector.builder.HTTPVaultConnectorBuilder` in favor of `de.stklcode.jvault.connector.HTTPVaultConnectorBuilder` (only package changed).
|
* Deprecated builder invocation `VaultConnectorBuilder.http()` in favor of `HTTPVaultConnector.builder()` (#51)
|
||||||
|
* Deprecated `de.stklcode.jvault.connector.builder.HTTPVaultConnectorBuilder` in favor of `de.stklcode.jvault.connector.HTTPVaultConnectorBuilder` (only package changed) (#51)
|
||||||
|
|
||||||
Old builders will be removed in 1.0
|
Old builders will be removed in 1.0
|
||||||
|
|
||||||
|
@ -401,7 +401,9 @@ public interface VaultConnector extends AutoCloseable, Serializable {
|
|||||||
* @param key Secret identifier
|
* @param key Secret identifier
|
||||||
* @return Secret response
|
* @return Secret response
|
||||||
* @throws VaultConnectorException on error
|
* @throws VaultConnectorException on error
|
||||||
|
* @deprecated Convenience method will be removed in 1.0. Use {@link #read(String)} instead with key prefix "secret/".
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
default SecretResponse readSecret(final String key) throws VaultConnectorException {
|
default SecretResponse readSecret(final String key) throws VaultConnectorException {
|
||||||
return read(PATH_SECRET + "/" + key);
|
return read(PATH_SECRET + "/" + key);
|
||||||
}
|
}
|
||||||
@ -642,7 +644,9 @@ public interface VaultConnector extends AutoCloseable, Serializable {
|
|||||||
* @param key Secret path
|
* @param key Secret path
|
||||||
* @param value Secret value
|
* @param value Secret value
|
||||||
* @throws VaultConnectorException on error
|
* @throws VaultConnectorException on error
|
||||||
|
* @deprecated Convenience method will be removed in 1.0. Use {@link #write(String, String)} instead with key prefix "secret/".
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
default void writeSecret(final String key, final String value) throws VaultConnectorException {
|
default void writeSecret(final String key, final String value) throws VaultConnectorException {
|
||||||
writeSecret(key, Collections.singletonMap("value", value));
|
writeSecret(key, Collections.singletonMap("value", value));
|
||||||
}
|
}
|
||||||
@ -656,7 +660,9 @@ public interface VaultConnector extends AutoCloseable, Serializable {
|
|||||||
* @param data Secret content. Value must be be JSON serializable.
|
* @param data Secret content. Value must be be JSON serializable.
|
||||||
* @throws VaultConnectorException on error
|
* @throws VaultConnectorException on error
|
||||||
* @since 0.5.0
|
* @since 0.5.0
|
||||||
|
* @deprecated Convenience method will be removed in 1.0. Use {@link #write(String, Map)} instead with key prefix "secret/".
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
default void writeSecret(final String key, final Map<String, Object> data) throws VaultConnectorException {
|
default void writeSecret(final String key, final Map<String, Object> data) throws VaultConnectorException {
|
||||||
if (key == null || key.isEmpty()) {
|
if (key == null || key.isEmpty()) {
|
||||||
throw new InvalidRequestException("Secret path must not be empty.");
|
throw new InvalidRequestException("Secret path must not be empty.");
|
||||||
@ -680,7 +686,9 @@ public interface VaultConnector extends AutoCloseable, Serializable {
|
|||||||
*
|
*
|
||||||
* @param key Secret path
|
* @param key Secret path
|
||||||
* @throws VaultConnectorException on error
|
* @throws VaultConnectorException on error
|
||||||
|
* @deprecated Convenience method will be removed in 1.0. Use {@link #delete(String)} instead with key prefix "secret/".
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
default void deleteSecret(final String key) throws VaultConnectorException {
|
default void deleteSecret(final String key) throws VaultConnectorException {
|
||||||
delete(PATH_SECRET + "/" + key);
|
delete(PATH_SECRET + "/" + key);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user