An "Azure Pipelines" YAML pipeline deploys to Azure using a service connection that currently stores a Microsoft Entra service principal client secret. The security team mandates that the pipeline hold no long-lived credential of any kind, and the secret must not simply be moved into "Azure Key Vault". Which approach to the service connection meets this requirement?
- AConfigure the service connection to use workload identity federation, where Azure DevOps presents a short-lived OpenID Connect token that Microsoft Entra exchanges for an access token without any stored secret. Correct
- BRotate the service principal client secret automatically every seven days through a scheduled pipeline so that any leaked secret is short-lived and quickly invalidated before it can be reused by an attacker.
- CStore the service principal client secret in "Azure Key Vault" and have the pipeline read it at run time through a Key Vault task so the secret never appears in the pipeline definition or variables.
- DReplace the client secret with a Microsoft Entra service principal certificate uploaded to the service connection, since certificate-based authentication is stronger and avoids storing a password-style secret in the pipeline.
Why A is correct: Workload identity federation establishes a trust between Azure DevOps and Microsoft Entra so the pipeline authenticates with a short-lived OpenID Connect token exchanged for access, leaving no client secret or long-lived credential anywhere.
Why B is wrong: Frequent rotation shortens a secret's useful life but the pipeline still stores and presents a standing client secret between rotations, so a long-lived credential remains and the mandate is not satisfied.
Why C is wrong: A Key Vault lookup keeps the secret out of the YAML, but it is exactly the move the requirement forbids and the underlying client secret is still a long-lived credential the deployment depends on.
Why D is wrong: A certificate is stronger than a password-style secret, but the private key is still a long-lived credential the pipeline must hold and rotate, so it does not meet the no-long-lived-credential mandate.