Interface SecretEncryptionService
- All Known Implementing Classes:
MockSecretEncryptionService,RemoteAgentSecretEncryptionService,SecretEncryptionServiceImpl
public interface SecretEncryptionService
Implementations of this class encrypt secrets (passphrases/passwords/keys/etc.) within Bamboo.
The format of the encoded secret includes Base64-encoded ciphertext with metadata detailing the algorithms used.
-
Method Summary
Modifier and TypeMethodDescription@NotNull StringDecrypts the supplied secret.@NotNull StringdecryptIfDecryptable(@NotNull String encryptedSecret) Decrypts secret if possible or returns original string if not.@NotNull StringEncrypts the supplied string.booleanisDecryptable(@NotNull String encryptedSecret) booleanisEncrypted(@NotNull String string) Whether the supplied string has been encrypted by this service.
-
Method Details
-
isEncrypted
Whether the supplied string has been encrypted by this service. -
isDecryptable
- Returns:
- true if Bamboo can decrypt given value.
-
decrypt
Decrypts the supplied secret.- Throws:
RuntimeException- if secret cannot be decrypted.
-
decryptIfDecryptable
Decrypts secret if possible or returns original string if not.- Since:
- 9.1
-
encrypt
Encrypts the supplied string.
-