Merge branch 'main' into develop
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:
commit
258a852f5c
10
CHANGELOG.md
10
CHANGELOG.md
@ -10,10 +10,18 @@
|
|||||||
* Use pre-sized map objects for fixed-size payloads
|
* Use pre-sized map objects for fixed-size payloads
|
||||||
* Remove Apache HTTP Client dependency in favor of Java 11 HTTP
|
* Remove Apache HTTP Client dependency in favor of Java 11 HTTP
|
||||||
|
|
||||||
|
|
||||||
|
## 0.9.4 (2021-06-06)
|
||||||
|
|
||||||
|
### Deprecations
|
||||||
|
* `AppRole.Builder#wit0hTokenPeriod()` is deprecated in favor of `#withTokenPeriod()` (#49)
|
||||||
|
|
||||||
|
### Improvements
|
||||||
|
* Minor dependency updates
|
||||||
|
|
||||||
### Test
|
### Test
|
||||||
* Tested against Vault 1.7.2
|
* Tested against Vault 1.7.2
|
||||||
|
|
||||||
|
|
||||||
## 0.9.3 (2021-04-02)
|
## 0.9.3 (2021-04-02)
|
||||||
|
|
||||||
### Improvements
|
### Improvements
|
||||||
|
@ -40,7 +40,7 @@ Java Vault Connector is a connector library for [Vault](https://www.vaultproject
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>de.stklcode.jvault</groupId>
|
<groupId>de.stklcode.jvault</groupId>
|
||||||
<artifactId>jvault-connector</artifactId>
|
<artifactId>jvault-connector</artifactId>
|
||||||
<version>0.9.3</version>
|
<version>0.9.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
2
pom.xml
2
pom.xml
@ -126,7 +126,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mockito</groupId>
|
<groupId>org.mockito</groupId>
|
||||||
<artifactId>mockito-core</artifactId>
|
<artifactId>mockito-core</artifactId>
|
||||||
<version>3.10.0</version>
|
<version>3.11.0</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -703,21 +703,34 @@ public final class AppRole {
|
|||||||
* @return self
|
* @return self
|
||||||
* @since 0.9
|
* @since 0.9
|
||||||
*/
|
*/
|
||||||
public Builder wit0hTokenPeriod(final Integer tokenPeriod) {
|
public Builder withTokenPeriod(final Integer tokenPeriod) {
|
||||||
this.tokenPeriod = tokenPeriod;
|
this.tokenPeriod = tokenPeriod;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set renewal period for generated token in seconds.
|
||||||
|
*
|
||||||
|
* @param tokenPeriod period in seconds
|
||||||
|
* @return self
|
||||||
|
* @since 0.9
|
||||||
|
* @deprecated Use {@link #withTokenPeriod(Integer)} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public Builder wit0hTokenPeriod(final Integer tokenPeriod) {
|
||||||
|
return withTokenPeriod(tokenPeriod);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set renewal period for generated token in seconds.
|
* Set renewal period for generated token in seconds.
|
||||||
*
|
*
|
||||||
* @param period period in seconds
|
* @param period period in seconds
|
||||||
* @return self
|
* @return self
|
||||||
* @deprecated Use {@link #wit0hTokenPeriod(Integer)} instead.
|
* @deprecated Use {@link #withTokenPeriod(Integer)} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Builder withPeriod(final Integer period) {
|
public Builder withPeriod(final Integer period) {
|
||||||
return wit0hTokenPeriod(period);
|
return withTokenPeriod(period);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -308,21 +308,34 @@ public final class AppRoleBuilder {
|
|||||||
* @return self
|
* @return self
|
||||||
* @since 0.9
|
* @since 0.9
|
||||||
*/
|
*/
|
||||||
public AppRoleBuilder wit0hTokenPeriod(final Integer tokenPeriod) {
|
public AppRoleBuilder withTokenPeriod(final Integer tokenPeriod) {
|
||||||
this.tokenPeriod = tokenPeriod;
|
this.tokenPeriod = tokenPeriod;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set renewal period for generated token in seconds.
|
||||||
|
*
|
||||||
|
* @param tokenPeriod period in seconds
|
||||||
|
* @return self
|
||||||
|
* @since 0.9
|
||||||
|
* @deprecated Use {@link #withTokenPeriod(Integer)} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public AppRoleBuilder wit0hTokenPeriod(final Integer tokenPeriod) {
|
||||||
|
return withTokenPeriod(tokenPeriod);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set renewal period for generated token in seconds.
|
* Set renewal period for generated token in seconds.
|
||||||
*
|
*
|
||||||
* @param period period in seconds
|
* @param period period in seconds
|
||||||
* @return self
|
* @return self
|
||||||
* @deprecated Use {@link #wit0hTokenPeriod(Integer)} instead.
|
* @deprecated Use {@link #withTokenPeriod(Integer)} instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public AppRoleBuilder withPeriod(final Integer period) {
|
public AppRoleBuilder withPeriod(final Integer period) {
|
||||||
return wit0hTokenPeriod(period);
|
return withTokenPeriod(period);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -771,7 +771,7 @@ class HTTPVaultConnectorTest {
|
|||||||
|
|
||||||
/* Update role model with custom flags */
|
/* Update role model with custom flags */
|
||||||
AppRole role2 = AppRole.builder(roleName)
|
AppRole role2 = AppRole.builder(roleName)
|
||||||
.wit0hTokenPeriod(321)
|
.withTokenPeriod(321)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
/* Create role */
|
/* Create role */
|
||||||
|
@ -138,7 +138,7 @@ class AppRoleBuilderTest {
|
|||||||
.withTokenExplicitMaxTtl(TOKEN_EXPLICIT_MAX_TTL)
|
.withTokenExplicitMaxTtl(TOKEN_EXPLICIT_MAX_TTL)
|
||||||
.withTokenNoDefaultPolicy(TOKEN_NO_DEFAULT_POLICY)
|
.withTokenNoDefaultPolicy(TOKEN_NO_DEFAULT_POLICY)
|
||||||
.withTokenNumUses(TOKEN_NUM_USES)
|
.withTokenNumUses(TOKEN_NUM_USES)
|
||||||
.wit0hTokenPeriod(TOKEN_PERIOD)
|
.withTokenPeriod(TOKEN_PERIOD)
|
||||||
.withTokenType(TOKEN_TYPE)
|
.withTokenType(TOKEN_TYPE)
|
||||||
.build();
|
.build();
|
||||||
assertThat(role.getName(), is(NAME));
|
assertThat(role.getName(), is(NAME));
|
||||||
@ -183,7 +183,7 @@ class AppRoleBuilderTest {
|
|||||||
.withTokenExplicitMaxTtl(TOKEN_EXPLICIT_MAX_TTL)
|
.withTokenExplicitMaxTtl(TOKEN_EXPLICIT_MAX_TTL)
|
||||||
.withTokenNoDefaultPolicy(TOKEN_NO_DEFAULT_POLICY)
|
.withTokenNoDefaultPolicy(TOKEN_NO_DEFAULT_POLICY)
|
||||||
.withTokenNumUses(TOKEN_NUM_USES)
|
.withTokenNumUses(TOKEN_NUM_USES)
|
||||||
.wit0hTokenPeriod(TOKEN_PERIOD)
|
.withTokenPeriod(TOKEN_PERIOD)
|
||||||
.withTokenType(TOKEN_TYPE)
|
.withTokenType(TOKEN_TYPE)
|
||||||
.build();
|
.build();
|
||||||
assertThat(role.getName(), is(NAME));
|
assertThat(role.getName(), is(NAME));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user