Repository identity, environment approval, token exchange, Azure authorization, and evidence are separate control boundaries.
Engineering and source
Owner: Application teamGitHub delivery control plane
Owner: Platform engineeringMicrosoft Entra trust boundary
Owner: Identity teamAzure target scope
Owner: Cloud platform teamEvidence and detection
Owner: Security operations- 1Approve immutable change
- 2Issue claim-bound OIDC token
- 3Exchange token through federated trust
- 4Authorize only the target scope
- 5Correlate deployment and Azure evidence
Executive Context
Static client secrets shared across repositories create a persistent vulnerability in enterprise cloud estates. When application teams deploy Terraform or application releases using these credentials, a single compromise exposes every associated subscription. Platform teams must balance deployment velocity with strict identity governance. Migrating to passwordless authentication via GitHub Actions OpenID Connect (OIDC) workload identity federation removes the need for secret rotation, reduces the attack surface, and enables precise, scope-bound access control. This design establishes a control plane where identity is ephemeral, scoped, and auditable.
Constraints and Assumptions
This architecture assumes a multi-team environment. Application teams own source code and deployment pipelines; platform engineering manages the delivery control plane. Microsoft Entra ID serves as the central identity provider. Azure subscriptions are segregated by environment (development, test, staging, production). The current state relies on shared client secrets that must be deprecated. The target state requires that every deployment action ties to a specific workflow run, repository, and branch, with no persistent credentials stored in GitHub or Azure. The design must support regulated workloads requiring explicit approval for production deployments and provide immutable evidence linking source changes to infrastructure modifications.
Target Architecture
The target architecture relies on five trust-boundary lanes. The Engineering and source lane contains the application team’s repositories. The GitHub delivery control plane, managed by platform engineering, orchestrates workflows and enforces environment protection rules. The Microsoft Entra trust boundary, owned by the identity team, hosts the federated identity credentials that validate tokens from GitHub. The Azure target scope, managed by the cloud platform team, contains the subscriptions and resources where deployments occur. Finally, the Evidence and detection lane, overseen by security operations, aggregates logs from GitHub, Entra ID, and Azure to correlate actions.
Control flow begins when an immutable change is approved in the source lane. GitHub issues a claim-bound OIDC token to the workflow. This token is exchanged through the federated trust relationship in Microsoft Entra ID. Azure RBAC then authorizes the request only against the target scope defined by the token’s claims. Deployment evidence is correlated with Azure activity logs to create a complete audit trail.
DevSecOps Control Model
DevSecOps operates across the entire lifecycle. Source control is enforced through branch protection rules. Build and artifact provenance are verified before deployment. Infrastructure as Code (IaC) is validated against policy standards. Release authorization requires explicit approval for higher-risk environments. Runtime posture is monitored via Azure Monitor. Exception expiry is managed by the ephemeral nature of OIDC tokens. Audit evidence is aggregated from multiple sources to ensure non-repudiation.
Controls are categorized into prevent, detect, and respond. Prevention is achieved through GitHub environment protection rules and Azure RBAC least-privilege assignments. Detection relies on Microsoft Defender for Cloud and Azure Activity Logs. Response involves automated rollback procedures and incident response playbooks triggered by anomalous activity. Accountable owners are clearly defined: engineering for source and build, platform for delivery control, identity for trust boundaries, network for segmentation, SRE for runtime posture, and security for audit and detection.
Key Architecture Decisions
Decision 1: Use User-Assigned Managed Identities for Federated Credentials
Decision: Configure user-assigned managed identities in Microsoft Entra ID to trust GitHub Actions tokens, rather than using app registrations with client secrets.
Why: User-assigned managed identities eliminate the need for secret management entirely. They provide a clean separation between the identity and the workload, allowing for precise RBAC assignments without exposing credentials. This aligns with the goal of passwordless deployments.
Alternative Rejected: App registrations with client secrets or certificates. These require secure storage, rotation, and carry the risk of leakage.
Consequence: Simplified credential lifecycle management and reduced risk of secret exposure. However, it requires careful configuration of federated identity credentials to match GitHub’s OIDC issuer and subject claims exactly.
Decision 2: Scope RBAC by Environment and Repository
Decision: Assign Azure RBAC roles at the resource group or resource level, scoped to specific GitHub repositories and branches via federated identity conditions.
Why: Least privilege is critical. By scoping access to specific environments and tying it to repository context, the blast radius of a compromised workflow is minimized. This ensures that a developer’s workflow in a dev repository cannot accidentally or maliciously affect production resources.
Alternative Rejected: Subscription-level role assignments. These are too broad and violate the principle of least privilege, increasing the risk of lateral movement in case of a breach.
Consequence: More granular RBAC assignments are required, increasing initial configuration complexity. However, this provides significantly stronger security posture and compliance with regulated workload requirements.
Decision 3: Enforce Environment Protection with Manual Approval for Production
Decision: Require manual approval from designated reviewers for any workflow targeting the production environment.
Why: Production deployments carry the highest risk. Manual approval introduces a human-in-the-loop control that prevents automated errors or malicious code from reaching production without scrutiny. This aligns with change management best practices for business-critical workloads.
Alternative Rejected: Fully automated deployments to production. While faster, this lacks the necessary control for high-risk environments and may not meet compliance requirements.
Consequence: Increased deployment latency for production changes. However, this is a necessary trade-off for security and compliance. The approval process is tracked in GitHub, providing an audit trail.
Implementation Blueprint
Implementation begins with configuring the federated identity credential in Microsoft Entra ID. For each GitHub repository, a user-assigned managed identity is created. A federated identity credential is added to this identity, specifying the GitHub Actions OIDC issuer URL and the subject claim that matches the repository and branch. For example, the subject might be repo:organization/repository:ref:refs/heads/main. This ensures that only workflows running on the main branch of that specific repository can authenticate as this identity.
Next, Azure RBAC roles are assigned to the user-assigned managed identity. Instead of broad roles like Contributor, custom roles or built-in roles with narrow scopes are used. For instance, a Virtual Machine Contributor role might be assigned at the resource group level for a specific application. This ensures that the identity can only perform actions relevant to its deployment task.
In GitHub, repository secrets are created for AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_SUBSCRIPTION_ID. These secrets are populated with the values from the user-assigned managed identity. The workflow file is updated to use the azure/login@v2 action with OpenID Connect authentication. The id-token permission is set to write to allow the workflow to fetch the OIDC token.
Environment protection rules are configured in GitHub. For the production environment, required reviewers are added, and deployment branches are restricted. This ensures that no workflow can deploy to production without explicit approval. The same pattern is applied to development, test, and staging environments, with varying levels of restriction based on risk.
Operational Evidence and SLOs
Operational evidence is critical for audit and compliance. Every deployment action generates logs in GitHub, Microsoft Entra ID, and Azure. GitHub logs record the workflow run, including the commit SHA, branch, and approval status. Microsoft Entra ID logs record the token issuance and validation, including the federated identity credential used. Azure Activity Logs record the resource operations performed by the identity.
To correlate these events, a unique identifier is embedded in the deployment metadata. This identifier links the GitHub workflow run ID to the Azure resource deployment. Security operations can then trace a change from source code to infrastructure modification, ensuring non-repudiation. Key SLOs include the time to detect unauthorized access attempts and the accuracy of audit trail correlation. Control-health indicators monitor the number of failed OIDC token exchanges and RBAC denials, which may indicate misconfiguration or malicious activity.
Failure Modes and Trade-offs
One failure mode is misconfiguration of the federated identity credential. If the issuer or subject claims do not match exactly, the token exchange will fail, causing deployment failures. This requires precise configuration and testing. Another failure mode is RBAC scope creep. If roles are assigned too broadly, the security benefits of least privilege are diminished. Regular audits of RBAC assignments are necessary to prevent this.
Trade-offs include increased initial setup complexity and potential deployment latency due to manual approvals. However, these are outweighed by the security benefits of eliminating secrets and enforcing strict access controls. The ephemeral nature of OIDC tokens means that there is no long-term credential to rotate or revoke, reducing operational overhead in the long run.
Adoption Roadmap
The adoption roadmap begins with a pilot in a low-risk development environment. This allows the platform team to validate the configuration and identify any issues. Next, the pattern is extended to test and staging environments. Finally, production environments are migrated, with manual approval enforced. Throughout the process, existing client secrets are gradually deprecated and removed. Training is provided to application teams on the new workflow configuration and RBAC principles. Monitoring and alerting are established to detect any anomalies during the transition.
Conclusion
Migrating to passwordless Azure deployments using GitHub Actions workload identity federation is a strategic imperative for enterprise cloud estates. It eliminates the risks associated with long-lived secrets, enforces least-privilege access, and provides a complete audit trail. By carefully designing the trust boundaries, RBAC scopes, and environment protection rules, organizations can achieve a secure, compliant, and efficient deployment pipeline. The initial investment in configuration is justified by the long-term security and operational benefits.