Question 530
A cloud developer must resolve: A Python app logs an SDK exception that includes a database connection string secret in structured telemetry. Which implementation step best meets the stated requirement?
Explanation
Correct Answer
Remove/redact secret fields before telemetry export and rotate any already exposed credentials. The scenario specifically states: A Python app logs an SDK exception that includes a database connection string secret in structured telemetry. Secret values must be redacted before logging and tracing to avoid secondary exposure. This change targets the named service and constraints rather than a different workflow. Validate the result by checking A controlled error log contains only sanitized metadata, not the secret value. The important remaining qualification is: Retrospective log deletion does not invalidate a secret already disclosed.
Incorrect Answers
Key Vault can emit supported lifecycle events to Event Grid for reactive automation. In the present case the governing issue is Secret values must be redacted before logging and tracing, which this does not resolve.
Secret rotation must coordinate credential update, version changes and client refresh. That observation may hold without resolving the relevant issue: Remove/redact secret fields before telemetry export and rotate any.
Azure managed identity can authenticate workload secret reads without stored client credentials. It does not verify the requested outcome; here the decisive check concerns Remove/redact secret fields before telemetry export and rotate any.