diff --git a/.travis.yml b/.travis.yml index 37a2ebc6..8a64115f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,12 +7,6 @@ sudo: required env: matrix: - - VAULT_VER=0.6.5 - - VAULT_VER=0.7.0 - - VAULT_VER=0.7.3 - - VAULT_VER=0.8.0 - - VAULT_VER=0.8.3 - - VAULT_VER=0.9.0 - VAULT_VER=0.9.6 - VAULT_VER=0.10.4 - VAULT_VER=0.11.6 diff --git a/spring-vault-core/src/main/java/org/springframework/vault/core/VaultTransitTemplate.java b/spring-vault-core/src/main/java/org/springframework/vault/core/VaultTransitTemplate.java index 7cb01d7b..01e96729 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/core/VaultTransitTemplate.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/core/VaultTransitTemplate.java @@ -57,6 +57,7 @@ import org.springframework.vault.support.VaultTransitKeyCreationRequest; * @author Praveendra Singh * @author Luander Ribeiro * @author Mikko Koli + * @author My-Lan Aragon */ public class VaultTransitTemplate implements VaultTransitOperations { diff --git a/spring-vault-core/src/main/java/org/springframework/vault/support/VaultSignRequest.java b/spring-vault-core/src/main/java/org/springframework/vault/support/VaultSignRequest.java index 436a9e15..544b8acd 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/support/VaultSignRequest.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/support/VaultSignRequest.java @@ -23,6 +23,7 @@ import org.springframework.util.Assert; * * @author Luander Ribeiro * @author Mark Paluch + * @author My-Lan Aragon * @since 2.0 */ public class VaultSignRequest { @@ -66,6 +67,7 @@ public class VaultSignRequest { /** * @return hashAlgorithm used for creating the signature or {@literal null} to use the * default hash algorithm. + * @since 2.4 */ @Nullable public String getHashAlgorithm() { @@ -73,14 +75,26 @@ public class VaultSignRequest { } /** - * @return signatureAlgorithm used for creating the signature when using a RSA key or + * @return signatureAlgorithm used for creating the signature when using an RSA key or * {@literal null} to use the default signature algorithm. + * @since 2.4 */ @Nullable public String getSignatureAlgorithm() { return this.signatureAlgorithm; } + /** + * @return algorithm used for creating the signature or {@literal null} to use the + * default algorithm. + * @deprecated since 2.4, use {@link #getSignatureAlgorithm()} instead. + */ + @Deprecated + @Nullable + public String getAlgorithm() { + return getSignatureAlgorithm(); + } + /** * Builder to build a {@link VaultSignRequest}. */ @@ -122,8 +136,8 @@ public class VaultSignRequest { } /** - * Configure the signature algorithm to be used for the operation when using a RSA - * key. + * Configure the signature algorithm to be used for the operation when using an + * RSA key. * @param signatureAlgorithm Specify the signature algorithm to be used for the * operation. Supported algorithms are: {@literal pss}, {@literal pkcs1v15}. * Defaults to {@literal pss} if not set. @@ -131,12 +145,25 @@ public class VaultSignRequest { */ public VaultSignRequestBuilder signatureAlgorithm(String signatureAlgorithm) { - Assert.hasText(signatureAlgorithm, "Hash algorithm must not be null or empty"); + Assert.hasText(signatureAlgorithm, "Signature algorithm must not be null or empty"); this.signatureAlgorithm = signatureAlgorithm; return this; } + /** + * Configure the algorithm to be used for the operation. + * @param algorithm Specify the algorithm to be used for the operation. Supported + * algorithms are: {@literal sha2-224}, {@literal sha2-256}, {@literal sha2-384}, + * {@literal sha2-512}. Defaults to {@literal sha2-256} if not set. + * @return {@code this} {@link VaultSignRequestBuilder}. + * @deprecated since 2.4, use {@link #signatureAlgorithm(String)} instead. + */ + @Deprecated + public VaultSignRequestBuilder algorithm(String algorithm) { + return signatureAlgorithm(algorithm); + } + /** * Build a new {@link VaultSignRequest} instance. Requires * {@link #plaintext(Plaintext)} to be configured. diff --git a/spring-vault-core/src/main/java/org/springframework/vault/support/VaultSignatureVerificationRequest.java b/spring-vault-core/src/main/java/org/springframework/vault/support/VaultSignatureVerificationRequest.java index 36867653..968ab1b5 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/support/VaultSignatureVerificationRequest.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/support/VaultSignatureVerificationRequest.java @@ -23,6 +23,7 @@ import org.springframework.util.Assert; * * @author Luander Ribeiro * @author Mark Paluch + * @author My-Lan Aragon * @since 2.0 */ public class VaultSignatureVerificationRequest { @@ -106,6 +107,7 @@ public class VaultSignatureVerificationRequest { /** * @return hash algorithm used for verifying the signature or {@literal null} to use * the default algorithm. + * @since 2.4 */ @Nullable public String getHashAlgorithm() { @@ -113,14 +115,26 @@ public class VaultSignatureVerificationRequest { } /** - * @return signature algorithm used for verifying the signature when using a RSA key + * @return signature algorithm used for verifying the signature when using an RSA key * or {@literal null} to use the default algorithm. + * @since 2.4 */ @Nullable public String getSignatureAlgorithm() { return this.signatureAlgorithm; } + /** + * @return algorithm used for verifying the signature or {@literal null} to use the + * default algorithm. + * @deprecated since 2.4, use {@link #getSignatureAlgorithm()} instead. + */ + @Nullable + @Deprecated + public String getAlgorithm() { + return getSignatureAlgorithm(); + } + /** * Builder to build a {@link VaultSignatureVerificationRequest}. */ @@ -188,6 +202,7 @@ public class VaultSignatureVerificationRequest { * {@literal sha2-256}, {@literal sha2-384}, {@literal sha2-512}. Defaults to * {@literal sha2-256} if not set. * @return {@code this} {@link VaultSignatureVerificationRequestBuilder}. + * @since 2.4 */ public VaultSignatureVerificationRequestBuilder hashAlgorithm(String hashAlgorithm) { @@ -198,12 +213,13 @@ public class VaultSignatureVerificationRequest { } /** - * Configure the signature algorithm to be used for the operation when using a RSA - * key. + * Configure the signature algorithm to be used for the operation when using an + * RSA key. * @param signatureAlgorithm Specify the signature algorithm to be used for the * operation. Supported algorithms are: {@literal pss}, {@literal pkcs1v15}. * Defaults to {@literal pss} if not set. * @return {@code this} {@link VaultSignatureVerificationRequestBuilder}. + * @since 2.4 */ public VaultSignatureVerificationRequestBuilder signatureAlgorithm(String signatureAlgorithm) { @@ -213,6 +229,19 @@ public class VaultSignatureVerificationRequest { return this; } + /** + * Configure the algorithm to be used for the operation. + * @param algorithm Specify the algorithm to be used for the operation. Supported + * algorithms are: {@literal sha2-224}, {@literal sha2-256}, {@literal sha2-384}, + * {@literal sha2-512}. Defaults to {@literal sha2-256} if not set. + * @return {@code this} {@link VaultSignatureVerificationRequestBuilder}. + * @deprecated since 2.4, use {@link #signatureAlgorithm(String)} instead. + */ + @Deprecated + public VaultSignatureVerificationRequestBuilder algorithm(String algorithm) { + return signatureAlgorithm(algorithm); + } + /** * Build a new {@link VaultSignatureVerificationRequest} instance. Requires * {@link #plaintext(Plaintext)} and one of {@link #hmac(Hmac)}, diff --git a/src/main/asciidoc/preface.adoc b/src/main/asciidoc/preface.adoc index 3c4f4528..00a0099f 100644 --- a/src/main/asciidoc/preface.adoc +++ b/src/main/asciidoc/preface.adoc @@ -39,9 +39,9 @@ The jumping off ground for learning about Vault is https://www.vaultproject.io[w * The online shell provides a convenient way to interact with a Vault instance in combination with the online tutorial. -* https://www.vaultproject.io/intro/index.html[HashiCorp Vault Introduction] +* https://learn.hashicorp.com/collections/vault/getting-started[Getting Started with Vault] -* https://www.vaultproject.io/docs/index.html[HashiCorp Vault Documentation] +* https://www.vaultproject.io/docs[HashiCorp Vault Documentation] Spring Vault provides client-side support for accessing, storing and revoking secrets. With https://www.vaultproject.io[HashiCorp's Vault] you have a central place to @@ -55,7 +55,7 @@ for external services such as MySQL, PostgreSQL, Apache Cassandra, Consul, AWS a Spring Vault 2.x binaries requires JDK level 8.0 and above, and https://spring.io/docs[Spring Framework] {springVersion} and above. -In terms of Vault, https://www.vaultproject.io/[Vault] at least 0.6. +In terms of Vault, https://www.vaultproject.io/[Vault] at least v0.9.6. [[get-started:additional-help]] == Additional Help Resources @@ -75,7 +75,7 @@ Post questions questions regarding Spring Vault on https://stackoverflow.com/que [[get-started:help:professional]] ==== Professional Support -Professional, from-the-source support, with guaranteed response time, is available from https://pivotal.io/[Pivotal Sofware, Inc.], the company behind Spring Vault and Spring. +Professional, from-the-source support, with guaranteed response time, is available from https://pivotal.io/[Pivotal Software, Inc.], the company behind Spring Vault and Spring. [[get-started:up-to-date]] === Following Development