shieldSecrets Management

The Secrets Management page allows you to securely store and manage sensitive configuration values for your project, such as API keys, passwords, database connection strings, and authentication tokens.

Overview

Access Secrets Management by opening your project settings and selecting "Secrets" from the Project section.

What Are Secrets?

Secrets are sensitive key-value pairs that your project needs to function but should never be exposed in your code. Common examples include:

  • API keys (e.g., OPENAI_API_KEY, STRIPE_API_KEY)

  • Database connection strings (e.g., DATABASE_URL)

  • Authentication tokens (e.g., SLACK_BOT_TOKEN)

  • Third-party service credentials (e.g., AWS_ACCESS_KEY_ID)

  • Password and encryption keys

Adding a New Secret

  1. Click the Add Secret button in the top-right corner

  2. Fill in the secret information:

    • Secret Key (Required): A unique identifier for your secret (e.g., DATABASE_URL)

    • Secret Value (Required): The actual secret value (displayed as password field)

    • Description (Optional): A note about what this secret is used for and extra relevant information for your team members (for example, how to get this value in case that's needed).

  3. Click Create Secret to save

Best Practices for Secret Keys

  • Use UPPERCASE with underscores (e.g., API_KEY_NAME)

  • Be descriptive but concise (e.g., STRIPE_API_KEY_FOR_PRODUCTION not just KEY)

  • Follow consistent naming conventions across your project

  • Avoid special characters other than underscores

Example Secrets

Viewing Secrets

The secrets table displays all your stored secrets with the following information:

Column
Description

Key

The unique identifier for the secret (shown in monospace font)

Description

Optional note about the secret's purpose

Type

The category or type of secret

Created

Date when the secret was created

Actions

Edit and Delete buttons

Security Note: Secret values are never displayed in the table for security reasons. They remain encrypted in storage.

Editing a Secret

  1. Click the Edit icon (pencil) next to the secret you want to modify

  2. The edit dialog shows:

    • Secret Key: Read-only (keys cannot be changed)

    • New Value (Optional): Enter a new value to update the secret

    • Description: Update the description

  3. Leave the value field empty to keep the current value unchanged

  4. Click Update Secret to save changes

Important Notes

  • Secret keys cannot be changed after creation. To use a different key, delete the old secret and create a new one

  • For security reasons, the current value is never shown when editing

  • You must provide either a new value or an updated description to save changes

  • Changes take effect immediately

Deleting a Secret

  1. Click the Delete icon (trash) next to the secret you want to remove

  2. Review the confirmation dialog carefully

  3. Confirm the secret key shown in the dialog matches what you intend to delete

  4. Click Delete to confirm, or Cancel to abort

Warning: Deleting a secret is permanent and cannot be undone. Make sure your project doesn't depend on this secret before deleting it, or your application may break.

Security Best Practices

  1. Never Commit Secrets to Code: Always use environment variables or secret management

  2. Rotate Regularly: Update secrets periodically, especially for production systems

  3. Minimum Privilege: Only store secrets that are absolutely necessary

  4. Descriptive Documentation: Use the description field to document what each secret is for

  5. Audit Access: Regularly review who has access to your project settings

  6. Remove Unused Secrets: Delete secrets that are no longer needed

  7. Use Strong Values: Generate strong, random values for passwords and keys

  8. Different Secrets per Environment: Use different secrets for development, staging, and production

Troubleshooting

"Secret key is required" Error

Ensure you've entered a value in the Secret Key field. Keys cannot be empty.

"Secret value is required" Error

When creating a new secret, you must provide a value. The value field cannot be empty.

"No changes to save" Error (Edit)

When editing, you must provide either a new value or an updated description. You can't save without making changes.

Secret Not Working

  1. Verify the secret key matches exactly what your AI Assistant/Channel expects (case-sensitive)

  2. Check that you saved the secret successfully

  3. If failing to publish, read carefully the error shown to the user.

Last updated