A developer needs to configure passwordless authentication for a GitHub Actions workflow to deploy resources to an Azure subscription using Microsoft Entra Workload Identity. In which order should the developer perform the steps to establish trust and grant the necessary permissions? To answer, arrange the steps in the correct sequence.
- 1Register the application in Microsoft Entra ID using the Azure CLI command az ad app create.
- 2Create a service principal for the registered application in the home tenant using the Azure CLI command az ad sp create.
- 3Configure a federated identity credential on the application registration using the Azure CLI command az ad app federated-credential create.
- 4Grant the service principal the necessary permissions on the target Azure subscription using the Azure CLI command az role assignment create.
- 5Update the GitHub Actions workflow YAML file to request an OIDC token and call the login action using the client and tenant identifiers.
Cevap
First, register the application. Second, create the service principal. Third, configure the federated identity credential on the application registration. Fourth, grant the service principal permissions on the target subscription. Finally, update the GitHub Actions workflow YAML file.
Establishing Workload Identity federation requires a sequential chain of trust. First, the application object is registered globally. Second, a local service principal is created to represent it in the home tenant. Third, a federated identity credential is added to the application registration to trust GitHub's OIDC issuer. Fourth, the service principal is assigned an RBAC role to grant resource management permissions. Finally, the GitHub Actions workflow YAML is configured with the target client and tenant IDs, and the required `id-token: write` permission to exchange its GitHub OIDC token for an Entra access token.
Adım Adım Çözüm
Anahtar Kavram
Microsoft Entra Workload Identity federation utilizes an application registration, its corresponding service principal, and federated identity credentials to allow external workloads (like GitHub Actions) to authenticate securely without maintaining client secrets or certificates.