Class KeyStoreTextEncryptorLocator

java.lang.Object
org.springframework.cloud.config.server.encryption.KeyStoreTextEncryptorLocator
All Implemented Interfaces:
TextEncryptorLocator

public class KeyStoreTextEncryptorLocator extends Object implements TextEncryptorLocator
A TextEncryptorLocator that 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 a SecretLocator (so for example you can keep a table of encrypted secrets and update it separately to the keystore).
Author:
Dave Syer
  • Constructor Details

    • KeyStoreTextEncryptorLocator

      public KeyStoreTextEncryptorLocator(org.springframework.security.crypto.encrypt.KeyStoreKeyFactory keys, String defaultSecret, String defaultAlias)
  • Method Details

    • setSecretLocator

      public void setSecretLocator(SecretLocator secretLocator)
      Parameters:
      secretLocator - the secretLocator to set
    • setRsaAlgorithm

      public void setRsaAlgorithm(org.springframework.security.crypto.encrypt.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:
      locate in interface TextEncryptorLocator