diff --git a/content/en/agent/configuration/secrets-management.md b/content/en/agent/configuration/secrets-management.md index 1bcbb9477a7d2..97a3ca5bc1827 100644 --- a/content/en/agent/configuration/secrets-management.md +++ b/content/en/agent/configuration/secrets-management.md @@ -650,6 +650,22 @@ To refresh manually, use: datadog-agent secret refresh ``` +### Automatic secrets refresh on API key failure / invalidation + +Starting in Agent version v7.74, the Agent can automatically refresh secrets when it detects an invalid API key. This happens when the Agent receives a 403 Forbidden response from Datadog or when the periodic health check detects an invalid or expired API key. + +To enable this feature, set `secret_refresh_on_api_key_failure_interval` to an interval in minutes in your `datadog.yaml` file. Set to `0` to disable (default). + +This interval is the minimum amount of time between 2 refreshes to avoid spamming your secrets management solution when an invalid API key is detected. + +```yaml +api_key: ENC[] + +secret_refresh_on_api_key_failure_interval: 10 +``` + +This setting is compatible with `secret_refresh_interval`. + ### Enabling DDOT collector refresh If you are using [DDOT collector][6] and want to enable API/APP refresh you must add the following additional configuration to your `datadog.yaml` file: ```