Store secrets using the Unity Dashboard

You can manage secrets in the Unity Dashboard. Secrets are stored in a hierarchy that aligns with the structure of Unity Cloud projects, consisting of organizations, projects, and environments.

Ensure permissions

To store secrets, you need the appropriate permissions. You must be a member of the organization and have the necessary roles to access the secrets. If you don't have the required permissions, contact your organization's or project's owner. Refer to Grant roles for more information.

You can find secrets in three different levels: organization, project, and environment. Each level has its own secrets. Each level will display the inherited secrets from the level above it. For example, project-level secrets inherit from organization-level secrets.

View organization-level secrets

At the organization level, you can view all the secrets that are accessible to all projects in the organization. To access the organization level secrets, follow these steps:

  1. Navigate to the Unity Dashboard.
  2. Select the Administration menu item.
  3. Under the Organization settings group, select Secrets.

View project-level secrets

At the project level, you can view all the secrets that are accessible to all environments in the project, and inherited secrets from the organization level. To access the project level secrets, follow these steps:

  1. Navigate to the Unity Dashboard.
  2. Select the Projectsmenu item.
  3. Select the project you want to view secrets for.
  4. Select the Secrets tab.

View environment-level secrets

At the environment level, you can view all the secrets that are accessible to the environment in the project, and inherited secrets from the project and organization levels. To access the environment level secrets, follow these steps:

  1. Navigate to the Unity Dashboard.
  2. Select the Projectsmenu item.
  3. Select the project you want to view secrets for.
  4. Select the Environments tab.
  5. Select the environment you want to view secrets for.
  6. Select the Secrets tab.

Managing secrets

The section below provide a walkthrough on secret management in the Unity Dashboard. Most of these operations are available at the organization, project, and environment levels. A secret override cannot be created at the organization level, as there is nothing to override.

Add a secret

To create a secret, navigate to a level where you want to store the secret. Follow these steps:

  1. Select the Add secret button.
  2. Provide a unique key for the secret.
  3. Provide a description for the secret (optional).
  4. Enter the value of the secret.
  5. Select the dropdown to choose which Unity services can access the secret. You can select multiple services. For more information, refer to Service access.
  6. Select the Add button.

You cannot view the value of a secret after you create it. However, you can edit the secret to change the value.

When you add a secret, it is stored at the level where you created it. The lower levels inherit the secret from the level above it.

Override a secret

A secret override allows you to create a secret at a lower level that takes precedence over the secret at a higher level. You can only override a secret at the project and environment level. To learn more about overrides, refer to Override secrets.

To create an override, follow these steps:

  1. Navigate to the secret table for the level where the secret is stored.
  2. Select the triple dots icon for the secret you want to override.
  3. Select the Override secret option.
  4. Provide a new value and description for the secret.
  5. Select the Override button.

Alternatively, you can prompt the override creation process when you are adding a new secret. If the key you enter already exists at a higher level, you will be prompted to create an override.

Edit a secret

To edit a secret, navigate to the secret table for the level where the secret is stored. Select the edit icon for the secret you want to edit, and modify the secret value, the description, or both. Select the Edit button to save the changes.

Delete a secret

To delete a secret, navigate to the secret table for the level where the secret is stored. Select the Delete icon for the secret you want to delete, and confirm the operation. If you delete an override, the secret reverts to the value stored at the level above it.

WARNING: Deleting a secret that is in use by a service may cause the service to malfunction or stop working.