Skip to content

Commit 8e8a924

Browse files
committed
Polishing.
Fix typos, update minimum Vault version to 0.9.6. Add since and author tags. Closes gh-686.
1 parent 78c26be commit 8e8a924

File tree

5 files changed

+68
-17
lines changed

5 files changed

+68
-17
lines changed

.travis.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ sudo: required
77

88
env:
99
matrix:
10-
- VAULT_VER=0.6.5
11-
- VAULT_VER=0.7.0
12-
- VAULT_VER=0.7.3
13-
- VAULT_VER=0.8.0
14-
- VAULT_VER=0.8.3
15-
- VAULT_VER=0.9.0
1610
- VAULT_VER=0.9.6
1711
- VAULT_VER=0.10.4
1812
- VAULT_VER=0.11.6

spring-vault-core/src/main/java/org/springframework/vault/core/VaultTransitTemplate.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
* @author Praveendra Singh
5858
* @author Luander Ribeiro
5959
* @author Mikko Koli
60+
* @author My-Lan Aragon
6061
*/
6162
public class VaultTransitTemplate implements VaultTransitOperations {
6263

spring-vault-core/src/main/java/org/springframework/vault/support/VaultSignRequest.java

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*
2424
* @author Luander Ribeiro
2525
* @author Mark Paluch
26+
* @author My-Lan Aragon
2627
* @since 2.0
2728
*/
2829
public class VaultSignRequest {
@@ -66,21 +67,34 @@ public Plaintext getPlaintext() {
6667
/**
6768
* @return hashAlgorithm used for creating the signature or {@literal null} to use the
6869
* default hash algorithm.
70+
* @since 2.4
6971
*/
7072
@Nullable
7173
public String getHashAlgorithm() {
7274
return this.hashAlgorithm;
7375
}
7476

7577
/**
76-
* @return signatureAlgorithm used for creating the signature when using a RSA key or
78+
* @return signatureAlgorithm used for creating the signature when using an RSA key or
7779
* {@literal null} to use the default signature algorithm.
80+
* @since 2.4
7881
*/
7982
@Nullable
8083
public String getSignatureAlgorithm() {
8184
return this.signatureAlgorithm;
8285
}
8386

87+
/**
88+
* @return algorithm used for creating the signature or {@literal null} to use the
89+
* default algorithm.
90+
* @deprecated since 2.4, use {@link #getSignatureAlgorithm()} instead.
91+
*/
92+
@Deprecated
93+
@Nullable
94+
public String getAlgorithm() {
95+
return getSignatureAlgorithm();
96+
}
97+
8498
/**
8599
* Builder to build a {@link VaultSignRequest}.
86100
*/
@@ -122,21 +136,34 @@ public VaultSignRequestBuilder hashAlgorithm(String hashAlgorithm) {
122136
}
123137

124138
/**
125-
* Configure the signature algorithm to be used for the operation when using a RSA
126-
* key.
139+
* Configure the signature algorithm to be used for the operation when using an
140+
* RSA key.
127141
* @param signatureAlgorithm Specify the signature algorithm to be used for the
128142
* operation. Supported algorithms are: {@literal pss}, {@literal pkcs1v15}.
129143
* Defaults to {@literal pss} if not set.
130144
* @return {@code this} {@link VaultSignRequestBuilder}.
131145
*/
132146
public VaultSignRequestBuilder signatureAlgorithm(String signatureAlgorithm) {
133147

134-
Assert.hasText(signatureAlgorithm, "Hash algorithm must not be null or empty");
148+
Assert.hasText(signatureAlgorithm, "Signature algorithm must not be null or empty");
135149

136150
this.signatureAlgorithm = signatureAlgorithm;
137151
return this;
138152
}
139153

154+
/**
155+
* Configure the algorithm to be used for the operation.
156+
* @param algorithm Specify the algorithm to be used for the operation. Supported
157+
* algorithms are: {@literal sha2-224}, {@literal sha2-256}, {@literal sha2-384},
158+
* {@literal sha2-512}. Defaults to {@literal sha2-256} if not set.
159+
* @return {@code this} {@link VaultSignRequestBuilder}.
160+
* @deprecated since 2.4, use {@link #signatureAlgorithm(String)} instead.
161+
*/
162+
@Deprecated
163+
public VaultSignRequestBuilder algorithm(String algorithm) {
164+
return signatureAlgorithm(algorithm);
165+
}
166+
140167
/**
141168
* Build a new {@link VaultSignRequest} instance. Requires
142169
* {@link #plaintext(Plaintext)} to be configured.

spring-vault-core/src/main/java/org/springframework/vault/support/VaultSignatureVerificationRequest.java

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*
2424
* @author Luander Ribeiro
2525
* @author Mark Paluch
26+
* @author My-Lan Aragon
2627
* @since 2.0
2728
*/
2829
public class VaultSignatureVerificationRequest {
@@ -106,21 +107,34 @@ public Hmac getHmac() {
106107
/**
107108
* @return hash algorithm used for verifying the signature or {@literal null} to use
108109
* the default algorithm.
110+
* @since 2.4
109111
*/
110112
@Nullable
111113
public String getHashAlgorithm() {
112114
return this.hashAlgorithm;
113115
}
114116

115117
/**
116-
* @return signature algorithm used for verifying the signature when using a RSA key
118+
* @return signature algorithm used for verifying the signature when using an RSA key
117119
* or {@literal null} to use the default algorithm.
120+
* @since 2.4
118121
*/
119122
@Nullable
120123
public String getSignatureAlgorithm() {
121124
return this.signatureAlgorithm;
122125
}
123126

127+
/**
128+
* @return algorithm used for verifying the signature or {@literal null} to use the
129+
* default algorithm.
130+
* @deprecated since 2.4, use {@link #getSignatureAlgorithm()} instead.
131+
*/
132+
@Nullable
133+
@Deprecated
134+
public String getAlgorithm() {
135+
return getSignatureAlgorithm();
136+
}
137+
124138
/**
125139
* Builder to build a {@link VaultSignatureVerificationRequest}.
126140
*/
@@ -188,6 +202,7 @@ public VaultSignatureVerificationRequestBuilder hmac(Hmac hmac) {
188202
* {@literal sha2-256}, {@literal sha2-384}, {@literal sha2-512}. Defaults to
189203
* {@literal sha2-256} if not set.
190204
* @return {@code this} {@link VaultSignatureVerificationRequestBuilder}.
205+
* @since 2.4
191206
*/
192207
public VaultSignatureVerificationRequestBuilder hashAlgorithm(String hashAlgorithm) {
193208

@@ -198,12 +213,13 @@ public VaultSignatureVerificationRequestBuilder hashAlgorithm(String hashAlgorit
198213
}
199214

200215
/**
201-
* Configure the signature algorithm to be used for the operation when using a RSA
202-
* key.
216+
* Configure the signature algorithm to be used for the operation when using an
217+
* RSA key.
203218
* @param signatureAlgorithm Specify the signature algorithm to be used for the
204219
* operation. Supported algorithms are: {@literal pss}, {@literal pkcs1v15}.
205220
* Defaults to {@literal pss} if not set.
206221
* @return {@code this} {@link VaultSignatureVerificationRequestBuilder}.
222+
* @since 2.4
207223
*/
208224
public VaultSignatureVerificationRequestBuilder signatureAlgorithm(String signatureAlgorithm) {
209225

@@ -213,6 +229,19 @@ public VaultSignatureVerificationRequestBuilder signatureAlgorithm(String signat
213229
return this;
214230
}
215231

232+
/**
233+
* Configure the algorithm to be used for the operation.
234+
* @param algorithm Specify the algorithm to be used for the operation. Supported
235+
* algorithms are: {@literal sha2-224}, {@literal sha2-256}, {@literal sha2-384},
236+
* {@literal sha2-512}. Defaults to {@literal sha2-256} if not set.
237+
* @return {@code this} {@link VaultSignatureVerificationRequestBuilder}.
238+
* @deprecated since 2.4, use {@link #signatureAlgorithm(String)} instead.
239+
*/
240+
@Deprecated
241+
public VaultSignatureVerificationRequestBuilder algorithm(String algorithm) {
242+
return signatureAlgorithm(algorithm);
243+
}
244+
216245
/**
217246
* Build a new {@link VaultSignatureVerificationRequest} instance. Requires
218247
* {@link #plaintext(Plaintext)} and one of {@link #hmac(Hmac)},

src/main/asciidoc/preface.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ The jumping off ground for learning about Vault is https://www.vaultproject.io[w
3939

4040
* The online shell provides a convenient way to interact with a Vault instance in combination with the online tutorial.
4141

42-
* https://www.vaultproject.io/intro/index.html[HashiCorp Vault Introduction]
42+
* https://learn.hashicorp.com/collections/vault/getting-started[Getting Started with Vault]
4343

44-
* https://www.vaultproject.io/docs/index.html[HashiCorp Vault Documentation]
44+
* https://www.vaultproject.io/docs[HashiCorp Vault Documentation]
4545

4646
Spring Vault provides client-side support for accessing, storing and revoking secrets.
4747
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
5555

5656
Spring Vault 2.x binaries requires JDK level 8.0 and above, and https://spring.io/docs[Spring Framework] {springVersion} and above.
5757

58-
In terms of Vault, https://www.vaultproject.io/[Vault] at least 0.6.
58+
In terms of Vault, https://www.vaultproject.io/[Vault] at least v0.9.6.
5959

6060
[[get-started:additional-help]]
6161
== Additional Help Resources
@@ -75,7 +75,7 @@ Post questions questions regarding Spring Vault on https://stackoverflow.com/que
7575
[[get-started:help:professional]]
7676
==== Professional Support
7777

78-
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.
78+
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.
7979

8080
[[get-started:up-to-date]]
8181
=== Following Development

0 commit comments

Comments
 (0)