Workload Identity Federation
Workload identity federation is the standard credential for every ION Entra application that a workload or pipeline authenticates as. The caller presents a token it already holds, issued to its own identity, as a client assertion. Entra accepts it because the application trusts that issuer and subject through a Federated Identity Credential (FIC). No client secret or certificate exists to store, rotate, or leak.
This runbook covers two patterns and the migration of existing secret-based access applications:
| Pattern | Federated application or identity | Trusted token | Used for |
|---|---|---|---|
| Customer-tenant access | Multi-tenant access application (for example azsp-ontinue-ion-access-read-all-prd-01) | The calling microservice’s own UAMI token | Graph, Defender for Endpoint, mailbox, and customer Azure resources in a consented customer tenant |
| CI/CD | Runway Entra application (per-environment federated credential) | GitHub Actions OIDC token for an approved repository and environment | Runway deployments (ADR-0024) |
Easy Auth uses the same mechanism with the shared rome auth identity and is covered separately by App Service authentication.
Prerequisites
- The calling microservice already has its own UAMI (Managed identity). Shared UAMIs are disallowed, so every caller is a distinct FIC subject.
- The target access application exists and its permission set matches ADR-0010 or ADR-0011.
- Approval from the access application owner for the new caller, recorded in the caller-to-target matrix.
- Platform identity rights to manage federated credentials on the application through the identity automation pipeline.
- For CI/CD: the GitHub repository, the GitHub environment name, and the Runway Entra application for that environment.
Token exchange
The UAMI token never leaves Ontinue’s control as a credential: it is only valid as an assertion for applications that list it as a FIC, and it is short lived. Customer authorization is unchanged by the credential type; consent, Exchange RBAC for Applications, and Azure RBAC all key off the enterprise application in the customer tenant.
Federated credential parameters
| Field | Customer-tenant access | CI/CD |
|---|---|---|
| Issuer | https://login.microsoftonline.com/{ontinueTenantId}/v2.0 | https://token.actions.githubusercontent.com |
| Subject | Principal (object) ID of the calling UAMI | repo:{org}/{repo}:environment:{environmentName} |
| Audience | api://AzureADTokenExchange | api://AzureADTokenExchange |
| Holder of the FIC | Multi-tenant access application in the Ontinue tenant | Runway Entra application |
The subject is the UAMI’s principal (object) ID, not its client ID. Using the client ID is the most common configuration error and fails with an assertion subject mismatch.
Configure customer-tenant access
Confirm the access application is federated-only
Owner: Platform identity
Every new Entra application starts with federated credentials only. Confirm the application has no password or key credentials before adding callers:
Connect-MgGraph -Scopes "Application.Read.All"
$app = Get-MgApplication -Filter "displayName eq 'azsp-ontinue-ion-access-read-all-prd-01'" `
-Property "id,appId,displayName,passwordCredentials,keyCredentials"
$app.PasswordCredentials.Count # expect 0 for a new application
$app.KeyCredentials.Count # expect 0An existing application that still holds a secret follows Migrate a secret-based access application instead of acquiring additional secrets.
Add one FIC per calling workload UAMI
Owner: Platform identity
Add a FIC for each approved calling microservice. Name it after the microservice so the inventory maps directly to callers.
data "azuread_application" "access_read_all" {
display_name = "azsp-ontinue-ion-access-read-all-prd-01"
}
resource "azuread_application_federated_identity_credential" "incident_enricher" {
application_id = data.azuread_application.access_read_all.id
display_name = "fic-incident-enricher-prd"
description = "UAMI of the incident enricher microservice"
audiences = ["api://AzureADTokenExchange"]
issuer = "https://login.microsoftonline.com/${var.ontinue_tenant_id}/v2.0"
subject = var.incident_enricher_uami_principal_id
}Resolve the UAMI principal ID from the microservice’s Terraform output or a data source at deployment time; do not paste production object IDs into source.
Check the 20-FIC budget
Owner: Platform identity
An Entra application accepts at most 20 FICs. Before adding a caller, count the existing credentials:
(Get-MgApplicationFederatedIdentityCredential -ApplicationId $app.Id).CountAlert at 16 and escalate to architecture before the limit is reached. The answer is never to share a UAMI between microservices; options are reviewed through an ADR, for example consolidating a caller’s responsibilities or splitting the application by permission set.
Acquire customer-tenant tokens in code
Owner: Service team
Chain the microservice’s own ManagedIdentityCredential, selected by client ID,
into a ClientAssertionCredential for the access application and the customer
tenant:
using Azure.Core;
using Azure.Identity;
using Microsoft.Graph;
const string TokenExchangeAudience = "api://AzureADTokenExchange";
var managedIdentityClientId = configuration["ManagedIdentityClientId"]; // the microservice UAMI
var accessAppClientId = configuration["AccessApps:ReadAll:ClientId"];
var managedIdentity = new ManagedIdentityCredential(managedIdentityClientId);
TokenCredential CustomerCredential(string customerTenantId) =>
new ClientAssertionCredential(
customerTenantId,
accessAppClientId,
async ct =>
{
var context = new TokenRequestContext(new[] { $"{TokenExchangeAudience}/.default" });
AccessToken miToken = await managedIdentity.GetTokenAsync(context, ct).ConfigureAwait(false);
return miToken.Token;
});
// Microsoft Graph in the customer tenant
var graph = new GraphServiceClient(
CustomerCredential(customerTenantId),
new[] { "https://graph.microsoft.com/.default" });
// Azure Resource Manager in the customer tenant (hollow application):
// request "https://management.azure.com/.default" with the same credential.Resolve customerTenantId from the active onboarding record, never from caller
input. Cache one credential per tenant and access application; the Azure SDK
caches tokens. Never log, persist, or forward the assertion or the resulting
token.
Record the federation in inventory
Owner: Platform identity
Record the application, FIC name, issuer, subject UAMI and owning microservice, approval, review date, and current FIC count. Follow Lifecycle and operations.
Configure CI/CD federation
Runway workflows authenticate to Azure with the GitHub Actions OIDC token, federated through a per-environment federated credential on the Runway Entra application (ADR-0024). This federation is a prerequisite for Runway to work. It is configured on the application by platform engineering and is not managed in Terraform.
Add an environment-scoped FIC to the Runway Entra application
Owner: Platform engineering
Restrict the subject to one approved repository and GitHub environment. Do not use branch, pull-request, or wildcard subjects for deployment identities.
az ad app federated-credential create \
--id "<runway-app-id>" \
--parameters '{
"name": "gh-<repo>-<environment>",
"issuer": "https://token.actions.githubusercontent.com",
"subject": "repo:<org>/<repo>:environment:<environment>",
"audiences": ["api://AzureADTokenExchange"]
}'Record the credential, its subject, the approving change, and the review date in the identity inventory, because no Terraform state captures it.
Grant deployment roles at the required scope
Owner: Platform engineering
Assign the Runway application’s service principal only the roles the
deployment needs, at the
subscription, resource-group, or resource scope it deploys to. Prefer
Contributor with a scoped, conditioned
Role Based Access Control Administrator assignment over Owner.
Configure the workflow without a secret
Owner: Service team
The workflow requests an OIDC token and passes only non-secret identifiers:
permissions:
id-token: write
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
environment: bcinc-prod
steps:
- uses: azure/login@v3
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}Do not add AZURE_CLIENT_SECRET or a credentials JSON to repository or
environment secrets.
Prove other repositories and environments are denied
Owner: Platform engineering
Run the workflow from the approved repository and environment and confirm
login succeeds. Run it from another repository, another environment, and a job
without environment: and confirm azure/login fails with no matching
federated identity record.
Migrate a secret-based access application
Access applications created before this standard hold client secrets in Key
Vault. Those secrets are transitional. Migrate each application through the
following states; new applications start in FederatedOnly.
Add FICs alongside the existing secret
Owner: Platform identity
Inventory every workload that reads the application’s secret from Key Vault.
Add a FIC for each of those workloads’ own UAMIs (steps 2 and 3 above). The
application is now in Dual state: both credentials work.
Switch each workload to the federated credential
Owner: Service team
Replace the ClientSecretCredential (or MSAL client-secret configuration) with
the ClientAssertionCredential pattern above. Remove the Key Vault secret
reference from application settings in the same change. Deploy one workload at
a time.
Verify no remaining secret use
Owner: Service team and Platform identity
For each customer tenant the workload serves, confirm a representative read succeeds with the federated credential. In Entra sign-in logs for the application’s service principal, confirm the client credential type is the federated assertion and that no client-secret sign-ins remain over an agreed observation window.
Delete the Key Vault secret and the application secret
Owner: Platform identity
Delete the secret from Key Vault, then remove the password credential from the application:
$app = Get-MgApplication -Filter "displayName eq '<access-app-name>'" -Property "id,passwordCredentials"
foreach ($cred in $app.PasswordCredentials) {
Remove-MgApplicationPassword -ApplicationId $app.Id -KeyId $cred.KeyId
}Confirm passwordCredentials and keyCredentials are empty. The application
is now FederatedOnly.
Positive validation
- The application has zero password and key credentials (or is in a documented
Dualmigration window). - From the deployed host, the microservice acquires a customer-tenant token through its own UAMI and performs one non-destructive allowed call.
- Entra sign-in logs for the service principal show a federated client assertion, the expected UAMI subject, and the expected customer tenant.
- The FIC count is recorded and below the alert threshold.
- The CI/CD workflow from the approved repository and environment logs in without a secret.
Negative validation
Verify denial for each applicable case:
- a microservice whose UAMI is not a FIC subject on the application (
AADSTS70021no matching federated identity record); - a FIC configured with the UAMI client ID instead of its principal ID;
- a token requested for any audience other than
api://AzureADTokenExchangeused as the assertion; - a customer tenant that has not consented, or whose onboarding record is not active;
- a permitted caller requesting a permission outside the application’s consented set;
- the rome auth identity presented as an assertion to an access application; and
- a workflow from another repository, environment, or a job without an environment.
Rollback and revocation
- Remove one caller: delete the FIC for that UAMI. New assertions fail immediately; already issued customer-tenant tokens remain valid until expiry, so contain incidents by also disabling the workload or asking the customer to disable the enterprise application.
- Roll back a migration: while in
Dualstate, redeploy the previous workload revision that uses the secret. Do not recreate a deleted secret; restore the previous revision only before step 4. - CI/CD: delete the environment’s FIC from the Runway Entra application and remove its deployment role assignments.
- Customer-initiated: the customer removes consent, role assignments, or Exchange scope, or deletes the enterprise application, which revokes access regardless of FICs.
Prove that the removed path fails and that unaffected callers still succeed.
Ownership and evidence
Platform identity owns access applications, their FICs, the FIC budget, and the migration tracker. Service teams own credential code and workload switch-over. Platform engineering owns the Runway Entra application and its FICs. SRE owns transitional secret expiry monitoring. Retain approvals, declarative diffs, FIC inventory and counts, sign-in log evidence of credential type, positive and negative tests, and secret deletion results.