Interface SecretEngine
-
- All Known Implementing Classes:
AbstractStorageSecretEngine,NoopSecretEngine
public interface SecretEngineSecretEngines contain service specific functionality in order to decrypt EncryptedSecrets. Identifiers are used in order to identify which SecretEngine an EncryptedSecret refers to. SecretEngines are used by the SecretManager in order to decrypt a given secret.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidclearCache()byte[]decrypt(EncryptedSecret encryptedSecret)default EncryptedSecretencrypt(java.lang.String secretToEncrypt)java.lang.Stringidentifier()voidvalidate(EncryptedSecret encryptedSecret)In order for a secretEngine to decrypt an EncryptedSecret, it may require extra information (e.g.
-
-
-
Method Detail
-
identifier
java.lang.String identifier()
-
decrypt
byte[] decrypt(EncryptedSecret encryptedSecret)
-
validate
void validate(EncryptedSecret encryptedSecret)
In order for a secretEngine to decrypt an EncryptedSecret, it may require extra information (e.g. decryptionKey, location, encryptionMethod, etc). This method takes an EncryptedSecret and validates it contains the required information the service needs for decryption. Parameter names should not contain ':'- Parameters:
encryptedSecret- The encrypted secret- Throws:
InvalidSecretFormatException- If the encrypted secret is malformed
-
encrypt
default EncryptedSecret encrypt(java.lang.String secretToEncrypt)
-
clearCache
void clearCache()
-
-