The Datadog Extension's AWS SecretsManager support (via DD_API_KEY_SECRET_ARN) can't consume Managed Rotation for Datadog Secrets (secret type DatadogApiKey):
That secret's JSON shape is:
{
"apiKey": "{{32-character hex API key}}",
"apiKeyId": "{{API key UUID}}"
}
The Datadog Extension's current JSON-secret extraction mechanism looks for a hardcoded dd_api_key field, not apiKey (added in commit 43ff705).
Note that for the Datadog Agent, it is possible to specify the SecretsManager secret name AND the name of the JSON key to use (it uses ENC[secret_id;key] syntax). See code: https://github.com/DataDog/datadog-agent/blob/main/cmd/secret-generic-connector/backend/aws/secrets.go
Would it be possible to adapt this so the Datadog Extension also checks the JSON key name apiKey? or make the JSON key name configurable, similar to the Datadog Agent's ENC[id;key] approach?
The Datadog Extension's AWS SecretsManager support (via
DD_API_KEY_SECRET_ARN) can't consume Managed Rotation for Datadog Secrets (secret typeDatadogApiKey):That secret's JSON shape is:
{ "apiKey": "{{32-character hex API key}}", "apiKeyId": "{{API key UUID}}" }The Datadog Extension's current JSON-secret extraction mechanism looks for a hardcoded
dd_api_keyfield, notapiKey(added in commit 43ff705).Note that for the Datadog Agent, it is possible to specify the SecretsManager secret name AND the name of the JSON key to use (it uses
ENC[secret_id;key]syntax). See code: https://github.com/DataDog/datadog-agent/blob/main/cmd/secret-generic-connector/backend/aws/secrets.goWould it be possible to adapt this so the Datadog Extension also checks the JSON key name
apiKey? or make the JSON key name configurable, similar to the Datadog Agent'sENC[id;key]approach?