Anaconda strongly recommends using secrets as opposed to including credentials in your project, due to the security risk associated with storing them in version control.
Creating a secret
- Open the My account dropdown menu in the top navigation, then select Settings.
- Under Secrets, click Add.
-
Enter a name and value for the secret you want to store, then click Add.
Because secret names are file names, they can only contain alphanumeric characters and underscores.
/var/run/secrets/user_credentials/
directory.
Using secrets
To use a secret in a project, you must install theae5-tools
package in your project’s environment.
- The
ae5-tools
package is available from Workbench’s internal repository. - If you are using an external package repository, you can pull the
ae5-tools
package from anaconda.org. - If you are working in an air-gapped environment, you can download the package here, then transfer it to your cluster.
/var/run/secrets/user_credentials/
directory and creates environment variables for each defined secret.
For example, let’s say you have defined the following secrets:
There are multiple ways to call environment variables! For example, you could also import the
demand_env_var
function from the ae5-tools
package and call environment variables like this:Editing a secret
- Open the My account dropdown menu, then select Settings.
- Open the actions dropdown menu for your secret and select Edit.
- Update the Value for your secret, then click Save.
If you edit the name of a secret, a new secret is created instead.
Deleting a secret
- Open the My account dropdown menu, then select Settings.
- Open the actions dropdown menu for your secret and select Delete.
- Click Delete.