Class AwsSecretsManagerStore

java.lang.Object
com.atlassian.secrets.store.aws.AwsSecretsManagerStore
All Implemented Interfaces:
SecretStore

public class AwsSecretsManagerStore extends Object implements SecretStore
A SecretStore implementation for storing and retrieving secret data from AWS Secrets manager.
Since:
3.0.0
  • Constructor Details

    • AwsSecretsManagerStore

      public AwsSecretsManagerStore(SecretsManagerClientFactory clientFactory)
    • AwsSecretsManagerStore

      public AwsSecretsManagerStore()
  • Method Details

    • get

      public String get(String jsonParams)
      Fetches the secret from AWS Secrets Manager service. The configuration parameters are passed as a JSON string with expected structure. The following parameters are supported:
      • region (required)
      • secretId (required)
      • secretPointer
      • endpointOverride
      E.g.:
      {"region": "ap-southeast-2", "secretId": "mySecret/production", "secretPointer": "/password"}
      Note that in case the secret pointer is missing forward slash, it will be added automatically. This is due to easy misconfiguration.
      Specified by:
      get in interface SecretStore
      Parameters:
      jsonParams - data which has been stored by using store(String)
      Returns:
      secret value from the AWS Secrets Manager
    • store

      public String store(String plainTextData)
      This function is currently not implemented because the products are not using it to store secrets.
      Specified by:
      store in interface SecretStore
      Parameters:
      plainTextData - data in plain text which should be stored securely
      Returns:
      a string representing the stored secret to be saved in the configuration file