---
title: "Manage secrets"
description: "Guide to managing secrets in Aerospike Cloud for secure configurations like XDR authentication using Console or API."
---

# Manage secrets

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

With secrets management in Aerospike Cloud, you can store sensitive values, such as authentication passwords, separate from your database configuration. When you reference a secret in a configuration value, Aerospike Cloud securely retrieves the secret from an encrypted vault and makes it available to the cluster nodes.

This approach isolates secret management from other configurations, enabling dedicated security procedures for sensitive properties.

## Create a secret

-   [Console](#tab-panel-3670)
-   [API](#tab-panel-3671)

1.  Navigate to **Access manager** > **Secrets**.
    
2.  Click **Add secret**.
    
3.  Enter a name for the secret.
    
    The name is used as the reference in your configuration. Choose something clear and specific to its purpose.
    
4.  Enter the secret value.
    
5.  Click **Add secret**.
    

After creating the secret, it appears in the secrets list.

1.  Create a Cloud API key and retrieve a bearer token. See [Use Cloud APIs](https://aerospike.com/docs/cloud/manage-apis/cloud-api-use) for details.
    
2.  Make a POST request to create the secret.
    
    Terminal window
    
    ```bash
    curl -X POST "https://api.aerospike.com/v1/secrets" \
    
        -H "Authorization: Bearer BEARER_TOKEN" \
    
        -H "Content-Type: application/json" \
    
        --data '{"name":"SECRET_NAME","value":"SECRET_VALUE"}'
    ```
    
    Replace the following placeholders:
    
    -   _`BEARER_TOKEN`_: Your API bearer token
    -   _`SECRET_NAME`_: A name for the secret (must comply with RFC 1035)
    -   _`SECRET_VALUE`_: The sensitive value to store

To verify the secret was created, list secrets:

Terminal window

```bash
curl -X GET "https://api.aerospike.com/v1/secrets" \

    -H "Authorization: Bearer BEARER_TOKEN"
```

The response includes the secret metadata (name and creation date). The API does not return secret values in list responses.

## Use secrets in your Aerospike Cloud configuration

To use a secret, specify the secret name as the value for the `auth-password-file` parameter in your cross-datacenter replication (XDR) configuration. This parameter provides the password for XDR destination authentication. You do not need to include a file path. Aerospike Cloud automatically mounts the secret at the appropriate location on the database nodes.

For example, if you create a secret named `xdr-auth-password`, reference it directly by name in your XDR configuration:

```yaml
xdr:

  dcs:

    - name: dc1

      auth-password-file: xdr-auth-password
```

To apply configuration changes to your cluster, see [Modify a cluster](https://aerospike.com/docs/cloud/manage/modify#modify-the-database-cluster-configuration).

### XDR authentication example

The following configuration uses a secret named `xdr-auth-password` for cross-datacenter replication (XDR) authentication:

-   [YAML](#tab-panel-3666)
-   [JSON](#tab-panel-3667)

```yaml
xdr:

  dcs:

    - name: dc1

      auth-mode: internal

      auth-user: xdr-user

      auth-password-file: xdr-auth-password
```

```json
{

  "xdr": {

    "dcs": [

      {

        "name": "dc1",

        "auth-mode": "internal",

        "auth-user": "xdr-user",

        "auth-password-file": "xdr-auth-password"

      }

    ]

  }

}
```

## Delete a secret

-   [Console](#tab-panel-3668)
-   [API](#tab-panel-3669)

1.  Navigate to **Access manager** > **Secrets**.
    
2.  Find the secret you want to delete.
    
3.  Click the three-dot menu next to the secret and select **Delete secret**.
    
4.  Click **Delete** to confirm.
    

Terminal window

```bash
curl -X DELETE "https://api.aerospike.com/v1/secrets/SECRET_ID" \

    -H "Authorization: Bearer BEARER_TOKEN"
```

Replace _`SECRET_ID`_ with the UUID of the secret (returned when you list secrets).

## Related topics

-   [Modify a cluster](https://aerospike.com/docs/cloud/manage/modify) to apply configuration changes.
-   Configure [advanced settings](https://aerospike.com/docs/cloud/manage/advanced-config) for your cluster.
-   Review [security practices](https://aerospike.com/docs/cloud/security/security-practices) for Aerospike Cloud.