Package org.apache.synapse.securevault
Class SecretResolver
java.lang.Object
org.apache.synapse.securevault.SecretResolver
Responsible for resolving secrets such as password. The secrets this SecretResolver should be
resolved , can be given as protected Tokens and the use of this class can explicitly check
whether a token is protected.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProtectedToken(String token) Registers a token as a Protected Tokenvoidinit(SecretCallbackHandler secretCallbackHandler) Initializes by giving an instance ofSecretCallbackHandlerto be used to retrieve secretsbooleanChecks the state of the rule engine.booleanisTokenProtected(String token) Checks whether a token is a Protected TokenResolved given password using an instance of a PasswordProviderResolved given password using an instance of a PasswordProvidervoidshutDown()Shutdown the secret resolver
-
Constructor Details
-
SecretResolver
public SecretResolver()
-
-
Method Details
-
init
Initializes by giving an instance ofSecretCallbackHandlerto be used to retrieve secrets- Parameters:
secretCallbackHandler-SecretCallbackHandlerinstance
-
resolve
Resolved given password using an instance of a PasswordProvider- Parameters:
encryptedPassword- Encrypted password- Returns:
- resolved password
-
resolve
Resolved given password using an instance of a PasswordProvider- Parameters:
encryptedPassword- Encrypted passwordprompt- to be used to interact with user- Returns:
- resolved password
-
addProtectedToken
Registers a token as a Protected Token- Parameters:
token-Stringrepresentation of a token
-
isTokenProtected
Checks whether a token is a Protected Token- Parameters:
token-Stringrepresentation of a token- Returns:
trueif the token is a Protected Token
-
isInitialized
public boolean isInitialized()Checks the state of the rule engine. It is recommended to check state of the this component prior to access any methods of this- Returns:
trueif the rule engine has been initialized
-
shutDown
public void shutDown()Shutdown the secret resolver
-