Fix typo in method name listAppRoleSecrets (#14)
This commit is contained in:
parent
745ab7a24c
commit
23f98f190b
@ -1,3 +1,9 @@
|
||||
## 0.6.2 [work in progress]
|
||||
* [fix] Prevent potential NPE on SecretResponse getter
|
||||
* [fix] Fields of InvalidResposneException made final
|
||||
* [fix] Fix typo in method name `listAppRoleSecrets()` (#14)
|
||||
* [text] Tested against Vault 0.8.1, increased coverage
|
||||
|
||||
## 0.6.1 [2017-08-02]
|
||||
* [fix] `TokenModel.getPassword()` returned username instead of password
|
||||
* [fix] `TokenModel.getUsername()` and `getPassword()` could produce NPE in multithreaded environments
|
||||
|
@ -514,7 +514,7 @@ public class HTTPVaultConnector implements VaultConnector {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final List<String> listAppRoleSecretss(final String roleName) throws VaultConnectorException {
|
||||
public final List<String> listAppRoleSecrets(final String roleName) throws VaultConnectorException {
|
||||
if (!isAuthorized())
|
||||
throw new AuthorizationRequiredException();
|
||||
|
||||
|
@ -325,8 +325,21 @@ public interface VaultConnector extends AutoCloseable {
|
||||
* @param roleName The role name
|
||||
* @return List of roles
|
||||
* @throws VaultConnectorException on error
|
||||
* @deprecated Use {@link #listAppRoleSecrets(String)}}. Will be removed in 0.7.0!
|
||||
*/
|
||||
List<String> listAppRoleSecretss(final String roleName) throws VaultConnectorException;
|
||||
@Deprecated
|
||||
default List<String> listAppRoleSecretss(final String roleName) throws VaultConnectorException {
|
||||
return listAppRoleSecrets(roleName);
|
||||
}
|
||||
|
||||
/**
|
||||
* List existing (accessible) secret IDs for AppRole role.
|
||||
*
|
||||
* @param roleName The role name
|
||||
* @return List of roles
|
||||
* @throws VaultConnectorException on error
|
||||
*/
|
||||
List<String> listAppRoleSecrets(final String roleName) throws VaultConnectorException;
|
||||
|
||||
/**
|
||||
* Register User-ID with App-ID.
|
||||
|
@ -559,7 +559,7 @@ public class HTTPVaultConnectorTest {
|
||||
}
|
||||
|
||||
try {
|
||||
connector.listAppRoleSecretss("");
|
||||
connector.listAppRoleSecrets("");
|
||||
fail("Expected exception not thrown");
|
||||
} catch (Exception e) {
|
||||
assertThat("Unexpected exception class", e, is(instanceOf(AuthorizationRequiredException.class)));
|
||||
@ -580,7 +580,7 @@ public class HTTPVaultConnectorTest {
|
||||
|
||||
/* Check secret IDs */
|
||||
try {
|
||||
List<String> res = connector.listAppRoleSecretss(APPROLE_ROLE_NAME);
|
||||
List<String> res = connector.listAppRoleSecrets(APPROLE_ROLE_NAME);
|
||||
assertThat("Unexpected number of AppRole secrets", res, hasSize(1));
|
||||
assertThat("Pre-configured AppRole secret not listed", res, contains(APPROLE_SECRET_ACCESSOR));
|
||||
} catch (VaultConnectorException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user