Class EncryptedSecret


  • public class EncryptedSecret
    extends java.lang.Object
    EncryptedSecrets contain an engineIdentifier and named parameters. EncryptedSecrets can be used by a SecretEngine implementation to get the decrypted secret.

    Format for Encrypted Secrets:

    encrypted:[engine-identifier]![param-name_1]:[param-value_1]!..![param-name_n]:[param-value_n]

    Note: Valid param-names match the regex: `[a-zA-Z0-9]+` Note: secret-params may contain ':' Note: `encrypted` cannot be a param-name Note: There must be at least one [param-name]:[param-value] pair Named parameters are used to allow for adding additional options in the future.

    • Field Detail

      • ENCRYPTED_STRING_PREFIX

        public static final java.lang.String ENCRYPTED_STRING_PREFIX
        See Also:
        Constant Field Values
      • ENCRYPTED_FILE_PREFIX

        public static final java.lang.String ENCRYPTED_FILE_PREFIX
        See Also:
        Constant Field Values
    • Method Detail

      • parse

        public static EncryptedSecret parse​(java.lang.String secretConfig)
        Parameters:
        secretConfig - Potentially encrypted secret value
        Returns:
        EncryptedSecret object
      • update

        protected void update​(java.lang.String secretConfig)
      • isEncryptedSecret

        public static boolean isEncryptedSecret​(java.lang.String secretConfig)
        Parameters:
        secretConfig - Potentially encrypted secret value
        Returns:
        boolean representing whether or not the secretConfig is formatted correctly
      • isEncryptedFile

        public static boolean isEncryptedFile​(java.lang.String secretConfig)