Secret¶
The DSH stores sensitive information required by services and tenants in so-called secrets.
- Secrets can represent an ID, certificate, password, private key, API token, etc.
- Using a DSH secret means that you don’t have to store a secret in the code of your application or service.
- Every secret has a unique name, and a value.
- For some services or resources, the DSH creates secrets automatically when you deploy them. You can’t edit or delete these secrets.
- You can also add your own secrets: you can edit their value, and delete them.
- In the service definition of your application or service, you can indicate which secrets to fetch when the DSH deploys the application or service. In the application or service, these secrets are then available as environment variables.
Limits¶
The DSH imposes the following limits on secrets:
- Maximum number of non-system secrets: The maximum number of secrets that your DSH tenant can contain. This only applies to secrets that you create yourself, and the limit doesn’t count the secrets that the DSH creates automatically.
- Maximum size: The maximum size of a secret’s value is 25 KiB. This limit can’t be changed.
You can request a new maximum number of secrets:
- Click “Resources” > “Overview” in the menu bar of the DSH Console.
- Click the “Request” button next to “Secrets”.
- Fill out the desired value and click “Request”. A platform administrator will process your request, which appears as a ticket in the Support Portal.
Managing secrets¶
You can manage secrets in the DSH Console.
Tip
You can also use endpoints in the Tenant Management API to manage secrets.
Adding a secret¶
Take the following steps to add a secret to the DSH:
- Click “Resources” > “Secrets” in the menu bar of the DSH Console.
- Click the “+ Secret” button to add a new secret.
- Fill out the fields:
- Secret name: Enter a name that’s unique in your tenant.
- Value: Enter a value for the secret.
- Click “Create secret” to add the secret to the DSH. Your secret appears in the list at “Resources” > “Secrets” immediately.
Inspecting a secret¶
Take the following steps to inspect a secret:
- Click “Resources” > “Secrets” in the menu bar of the DSH Console.
- Click the “Inspect” button for the secret that you want to inspect. The value of the secret appears on the page.
Editing a secret¶
Take the following steps to edit the value of a secret:
- Click “Resources” > “Secrets” in the menu bar of the DSH Console.
- Click the “Configure” button for the secret that you want to edit.
- Edit the “Value” field and click “Save secret”. You can’t edit the field “Secret name”.
Deleting a secret¶
Take the following steps to delete a secret:
- Click “Resources” > “Secrets” in the menu bar of the DSH Console.
- Click the “Delete” button for the secret that you want to delete, and click “Yes, delete” to confirm.