Class KeyStoreTextEncryptorLocator
- java.lang.Object
-
- org.springframework.cloud.config.server.encryption.KeyStoreTextEncryptorLocator
-
- All Implemented Interfaces:
TextEncryptorLocator
public class KeyStoreTextEncryptorLocator extends Object implements TextEncryptorLocator
ATextEncryptorLocatorthat pulls RSA key pairs out of a keystore. The input map can contain entries for "key" or "secret" or both, or neither. The secret in the input map is not, in general, the secret in the keystore, but is dereferenced through aSecretLocator(so for example you can keep a table of encrypted secrets and update it separately to the keystore).- Author:
- Dave Syer
-
-
Constructor Summary
Constructors Constructor Description KeyStoreTextEncryptorLocator(org.springframework.security.rsa.crypto.KeyStoreKeyFactory keys, String defaultSecret, String defaultAlias)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.security.crypto.encrypt.TextEncryptorlocate(Map<String,String> keys)voidsetRsaAlgorithm(org.springframework.security.rsa.crypto.RsaAlgorithm rsaAlgorithm)voidsetSalt(String salt)voidsetSecretLocator(SecretLocator secretLocator)voidsetStrong(boolean strong)
-
-
-
Method Detail
-
setSecretLocator
public void setSecretLocator(SecretLocator secretLocator)
- Parameters:
secretLocator- the secretLocator to set
-
setRsaAlgorithm
public void setRsaAlgorithm(org.springframework.security.rsa.crypto.RsaAlgorithm rsaAlgorithm)
-
setStrong
public void setStrong(boolean strong)
-
setSalt
public void setSalt(String salt)
-
locate
public org.springframework.security.crypto.encrypt.TextEncryptor locate(Map<String,String> keys)
- Specified by:
locatein interfaceTextEncryptorLocator
-
-