Class SecretServiceFactory

java.lang.Object
com.atlassian.secrets.service.SecretServiceFactory

public class SecretServiceFactory extends Object
  • Field Details

    • SECRETS_CONFIG_LOCK_FILE_NAME

      public static final String SECRETS_CONFIG_LOCK_FILE_NAME
      See Also:
    • LOCK_TIMEOUT_SYS_PROP

      public static final String LOCK_TIMEOUT_SYS_PROP
      See Also:
    • LOCK_TIMEOUT_DEFAULT_IN_MS

      public static final Long LOCK_TIMEOUT_DEFAULT_IN_MS
  • Method Details

    • getSecretService

      public static SecretService getSecretService(SecretServiceParams params) throws SecretServiceException
      This function will read the configuration file (defaults to secrets-config.yaml) from the home directory and return a SecretService instance that is capable of routing requests to the appropriate backend.

      If the file does not exist, it will be generated with a default configuration that uses AESEncryptionBackend.

      For more detailed information, see SecretServiceParams and SecretConfigManager.maybeGenerateDefaultConfigFile(com.atlassian.secrets.service.SecretServiceParams).

      Parameters:
      params - The SecretService parameters. See SecretServiceParams
      Returns:
      SecretService which has been configured using the input parameters.
      Throws:
      SecretServiceException - If an error occurs while constructing the SecretService.