Microservices Identity Workflow
Every Azure-hosted ION workload authenticates with its own user-assigned managed
identity (UAMI) for service-to-service and Azure-resource access
(ADR-0013).
For a call through APIM, the workload obtains a token for the ION Platform API
application. APIM validates that caller and its Ion.* role, authenticates to the
protected backend with APIM’s own managed identity, and forwards the validated
caller token in X-Authorization. Calls into customer tenants use Workload
Identity Federation from the same per-service UAMI.
Mandatory workload-identity boundaries
Each microservice has a dedicated UAMI per environment. This is a MUST with no exceptions. System-assigned managed identities are not used and UAMIs are never shared between microservices.
Managed identityA microservice and the Azure resources it owns are deployed in its service resource group, the default ownership, lifecycle, authorization, and cost boundary.
Identity guidelinesA microservice UAMI receives Azure RBAC only in its own resource group or an approved shared-resource group. Other services' groups, subscriptions, and management groups need a Security exception.
Identity architectureIon.* roles on the Platform API app authorize ION API operations; Azure RBAC authorizes Azure resources. Neither substitutes for the other.
Application rolesAzure compute ingress requires Entra authentication for the Platform API audience before application code runs. APIM and private networking are additional controls, not substitutes.
App Service authenticationCustomer-tenant access apps trust each calling workload's own UAMI as a federated identity credential. New apps are federated-only.
Workload Identity FederationWorkload populations
This workflow applies to MFE BFFs, the shell SignalR BFF, Signet, synchronous APIs, background workers, event publishers and consumers, daemons, onboarding services, audit services, and integration adapters hosted in Azure. Each microservice has an attributable UAMI and an owning team. Multiple compute resources implementing the same microservice may attach that microservice’s UAMI; unrelated microservices never share one.
Managed identity type
| Property | System-assigned managed identity | User-assigned managed identity |
|---|---|---|
| Creation | Enabled as part of one compute resource | Created as an independent Azure resource and attached to compute |
| Lifecycle | Created and deleted with its parent resource | Explicitly created, attached, detached, and deleted |
| Pre-authorization | Assignments follow creation of the host | Receives approved assignments before a host is deployed |
| Host replacement | A replacement host gets a new principal and needs new assignments | Identity and assignments survive host replacement |
| Federated identity credentials | Not supported as a federated credential on an Entra application | Registered as a federated credential on customer-tenant access apps |
| ION V3 use | Not used | Required: one UAMI per microservice and environment |
Choosing UAMI never permits an identity shared by unrelated services. The UAMI represents one service responsibility and is bounded by that service’s resource group, dependencies, environment, and owner.
Recorded exception: the rome auth identity
The rome auth identity is a single shared UAMI registered as a federated
identity credential on the ION Platform API application. Backend Easy Auth uses
it, through the OVERRIDE_USE_MI_FIC_ASSERTION_CLIENTID client secret setting
name, in place of a client secret for the Platform API registration. It exists
because an Entra application accepts at most 20 federated identity credentials,
which cannot cover one credential per microservice.
The rome auth identity is used only for Easy Auth against the Platform API
application. It holds no Azure RBAC, no Ion.* application roles, and no data
access, and it is never used by application code to call an API or resource.
Some services, such as Signet, still configure Easy Auth with a client secret held in Key Vault. That is a migration in progress toward the rome auth identity pattern; the secret’s owner and expiry are tracked until migration completes.
Which operations can I perform with managed identities?
Authorized operators and deployment automation can:
- create, read, update, and delete UAMI resources;
- attach or detach a UAMI to supported Azure compute resources;
- assign
Ion.*application roles on the Platform API application to the UAMI service principal for approved API operations; - assign Azure RBAC for approved operations in the microservice’s own resource group or an approved shared-resource group;
- register the UAMI as a federated identity credential on an approved customer-tenant access application;
- request tokens through the Azure Identity SDK or a platform-native integration;
- inspect identity changes in Azure Activity Log and sign-ins in Entra workload sign-in logs; and
- revoke access by removing an app-role, RBAC, or federated-credential entry, detaching the UAMI, disabling the route or workload, or deleting the identity.
ION uses declarative automation as the system of record. Portal operations are for diagnosis or an approved emergency procedure and are reconciled back to source control. A managed identity does not itself grant access; the target still requires an explicit assignment and validates the token and operation.
Service trust flow
For service API calls, the token audience is the ION Platform API application
(“Platform API Application”, azsp-ontinue-rome-idm-ion-platform-{env}-01) and
Ion.* application roles describe the caller’s permitted operations. For direct
Azure data-plane calls, the audience is the target resource and Azure RBAC
provides authorization.
A BFF follows this flow only after terminating and authorizing the user request.
The user’s token never becomes the service token and is never forwarded: the BFF
reads X-Authorization for user context and capability binding and does not pass
it on. A worker created by a request obtains its own UAMI token rather than
persisting the initiating bearer token.
APIM and backend validation
For service-to-service traffic, APIM validates:
- signature, validity period, issuer, and the Platform API audience;
- that the calling UAMI is an approved caller for the route;
- the
Ion.*application role required by the operation; and - route, rate, quota, payload, and correlation policies where configured.
APIM then acquires its own managed-identity token with
authentication-managed-identity for the Platform API audience and places it in
backend Authorization. Token acquisition is fail-closed.
APIM must override X-Authorization with the validated original caller
token, so a client-supplied value never reaches a backend. The deployed global
policy uses exists-action="skip" and does not yet do this (gap
APIM-01).
An API whose backend
does not need caller context may instead set X-Authorization to APIM’s own
token. The backend:
- relies on Easy Auth to authenticate APIM for the Platform API audience;
- reads
X-Authorizationto identify the calling workload or user and to check its role or capability, validating the token’s signature, issuer, audience, and expiry until APIM-01 is fixed; - enforces customer context, operation authorization, and domain rules; and
- never forwards
X-Authorizationto another service.
Private networking and platform ingress controls restrict direct backend access. Where direct service invocation is intentionally supported, it is a separate contract in which the target explicitly trusts and authorizes that caller.
OAuth protection for Azure compute ingress
Every HTTP-capable Azure compute resource MUST enforce Microsoft Entra authentication before a request reaches application or workflow code. Anonymous access is prohibited for ION APIs, functions, workflows, containers, callbacks, and administrative endpoints.
This protects the direct Azure hostname as well as traffic routed through APIM. If APIM routing or a network rule is misconfigured, the backend must still reject a request without a valid token.
Platform enforcement
| Azure compute | Required inbound protection |
|---|---|
| Azure App Service and Function Apps | Easy Auth (authsettingsV2) with Microsoft Entra ID for the Platform API audience, using the rome auth identity federated credential. Require authentication on all API paths and return 401 rather than redirecting. |
| Azure Container Apps | Built-in authentication with Microsoft Entra ID, Require authentication, 401 for unauthenticated API requests, HTTPS only, insecure ingress disabled. |
| Logic Apps Standard | The App Service authentication layer on request-trigger endpoints with Entra-authenticated calls. Apply network restrictions independently. |
| Logic Apps Consumption | An Entra OAuth authorization policy for request triggers with the exact issuer and audience. Disable SAS when OAuth is the approved path. |
| Other HTTP-capable Azure compute | Native Entra or OAuth ingress where available. Otherwise an approved architecture combining private ingress with application-level JWT validation before release. |
| Event-only worker with no HTTP ingress | No HTTP surface. Authenticate trigger resources with the worker’s UAMI and Azure RBAC, and do not enable an unused public endpoint. |
Platform authentication is not a replacement for application authorization.
APIM and the application still validate the approved caller, required Ion.*
role, customer context, operation, and domain rules.
Configuration requirements
For every protected compute endpoint:
- accept tokens only for the environment’s Platform API audience;
- bind issuer and tenant validation to the Ontinue platform tenant for internal service traffic;
- require HTTPS and reject unauthenticated API requests with
401; - disable anonymous access, platform access keys, SAS callbacks, and default public endpoints that provide a path around authentication;
- disable the platform token store unless a documented flow needs it;
- restrict direct ingress with private endpoints or access restrictions where supported;
- protect deployment, SCM, administration, and diagnostic endpoints separately; and
- declare a narrowly scoped health-probe exclusion only when required; it exposes no customer data, configuration, dependency details, or operation capability.
Required validation
Release tests call both the APIM route and the reachable direct compute hostname. Verify that:
- no token, a malformed, expired, wrong-issuer, or wrong-audience token is rejected before application processing;
- a valid token without the route’s
Ion.*role is denied; - only an approved UAMI caller can perform the operation;
- a client-supplied
X-Authorizationvalue is overridden by APIM (fails until APIM-01 is fixed); - a direct-host request cannot bypass authentication, customer isolation, or operation authorization; and
- authentication settings, audiences, and network restrictions are checked for drift.
See Authentication and authorization in Azure App Service and Azure Functions, Authentication and authorization in Azure Container Apps, and Secure access and data for workflows in Azure Logic Apps.
Application roles and Azure RBAC
The Platform API application provides the controlled Ion.* role catalogue. Each
caller UAMI receives only the roles required for its outbound calls; each route
declares and validates its required role.
Azure RBAC is assigned separately for Cosmos DB, Service Bus, Key Vault, Storage, Log Analytics, and other Azure resources:
| Target | Permitted assignment scope | Approval requirement |
|---|---|---|
| Resource owned by the microservice | The resource or the microservice’s own resource group | Service and resource owner through deployment review |
| Governed shared platform resource | The shared resource or its approved shared-resource group | Service owner and shared-resource owner |
| Resource owned by another microservice | Prohibited by default | Security exception plus both owners; prefer an API |
| Subscription or management group | Prohibited by default | Security exception only when no narrower scope works |
Outbound access to customer tenants
ION workloads that act in customer tenants use multi-tenant access applications consented by the customer. Workload Identity Federation is the standard: each calling workload’s own UAMI is a federated identity credential on the access application, and every new Entra application starts with federated credentials only.
| Access application | Purpose | Workflow |
|---|---|---|
azsp-ontinue-ion-access-read-all-prd-01 | Read-only Graph and Defender access | Customer Environment Access |
azsp-ontinue-ion-access-mde-write-prd-01 | Defender for Endpoint write operations | Customer Environment Access |
azsp-ontinue-ion-access-graph-write-prd-01 | Graph write operations | Customer Environment Access |
azsp-ontinue-ion-access-write-all-prd-01 | Combined write operations | Customer Environment Access |
azsp-ontinue-ion-access-phishing-write-prd-01 | Scoped mailbox and phishing analysis | Mailbox access |
azsp-ontinue-ion-access-azure-rbac-prd-01 | Hollow app for customer-assigned Azure RBAC | Customer Azure RBAC |
The scope split follows ADR-0010 and the hollow app follows ADR-0011. Existing access applications that still hold Key Vault client secrets are transitional; SRE monitors secret expiry until each migrates to federation. Each application accepts at most 20 federated identity credentials, so the number of calling UAMIs per application is monitored. Implementation detail is in Workload Identity Federation.
CI/CD identity
GitHub Actions authenticate to Azure through OIDC, federated through a per-environment federated credential on the Runway Entra application (ADR-0024). The federation is a Runway prerequisite, configured outside Terraform. Pipelines hold no client secrets. The Runway application is distinct from every runtime microservice UAMI and is not used by application code.
Implementation: acquire a token with a UAMI
Use the Azure Identity SDK and explicitly select the microservice’s UAMI. The client ID is deployment configuration, not a secret; keep its value in the controlled configuration inventory rather than in source or this page.
using Azure.Core;
using Azure.Identity;
var uamiClientId = configuration["ManagedIdentity:ClientId"]
?? throw new InvalidOperationException("ManagedIdentity:ClientId is required");
var platformApiUri = configuration["Identity:PlatformApiUri"]
?? throw new InvalidOperationException("Identity:PlatformApiUri is required");
// Production workloads use only their own UAMI; no developer or secret fallback.
var credential = new ManagedIdentityCredential(
ManagedIdentityId.FromUserAssignedClientId(uamiClientId));
var token = await credential.GetTokenAsync(
new TokenRequestContext([$"{platformApiUri}/.default"]),
cancellationToken);
using var request = new HttpRequestMessage(HttpMethod.Get, targetUri);
request.Headers.Authorization =
new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token.Token);
request.Headers.Add("X-Transaction-Id", correlationId);
using var response = await httpClient.SendAsync(request, cancellationToken);
response.EnsureSuccessStatusCode();
For direct Azure-resource access, use that resource’s scope, such as
https://vault.azure.net/.default, and prefer the service’s Azure SDK client,
which accepts a TokenCredential. Do not log token.Token, place it in
telemetry, persist it, or add a fallback client secret. The SDK handles caching
and renewal.
Rationale
| Decision | Rationale | Consequence |
|---|---|---|
| One UAMI per microservice, no SAMI, no sharing | Stable identity across host replacement, usable as a federated credential, with attribution and blast radius aligned to one service | Every service has its own inventory entry, assignments, and federated credentials |
| Single rome auth identity exception for Easy Auth | Entra limits an application to 20 federated credentials, so per-service credentials on the Platform API app cannot scale | The shared identity holds no RBAC, roles, or data access, so sharing it grants nothing |
| One resource group per microservice | Aligns ownership, lifecycle, deployment, cost, and default RBAC scope | Cross-service resource access is exceptional; expose an API instead |
Platform API Ion.* roles | A stable, operation-oriented permission catalogue and a uniform backend audience | Each caller receives only required roles, separate from Azure RBAC |
| APIM authenticates with its own managed identity | Separates caller authorization from backend platform authentication and keeps direct endpoints protected | Backends authenticate APIM and read the caller from X-Authorization |
APIM must override X-Authorization | Prevents a client from injecting caller context | Backends can trust X-Authorization only once APIM owns it; until gap APIM-01 is fixed they validate it |
| Backend revalidates authorization | Prevents APIM routing or policy errors from becoming bypasses | Easy Auth validates APIM; the application enforces role, customer, and domain rules |
| Workload Identity Federation into customer tenants | Removes long-lived secrets from customer-tenant access | Federated-credential count per app is monitored; existing secrets are transitional |
Step-by-step implementation
Define the microservice identity boundary
Owner: Service team
Record the microservice name, environment, owner, compute resources, resource group, inbound and outbound APIs, Azure dependencies, customer-tenant access, data classification, and customer-isolation requirements.
Create a caller-to-target matrix with the target API or resource, audience or
scope, required Ion.* role or Azure RBAC role, exact scope, ownership, approval,
negative tests, and revocation path. Any dependency on another microservice’s
resource group is redesigned as an API call or submitted as a Security exception.
Create the service resource group and UAMI
Owner: Service team and platform engineering
Provision one resource group and one UAMI per microservice and environment through the approved infrastructure modules.
resource "azurerm_resource_group" "service" {
name = "rg-${var.service_name}-${var.environment}-01"
location = var.location
}
resource "azurerm_user_assigned_identity" "service" {
name = "id-${var.service_name}-${var.environment}-01"
resource_group_name = azurerm_resource_group.service.name
location = azurerm_resource_group.service.location
}Add the identity, environment, resource group, owners, and review date to the workload-identity inventory.
Attach the UAMI to the microservice's hosts
Owner: Service team
Attach the service UAMI only to compute that implements the same microservice. Do not enable a system-assigned identity.
resource "azurerm_linux_function_app" "service" {
# Existing application configuration omitted.
identity {
type = "UserAssigned"
identity_ids = [azurerm_user_assigned_identity.service.id]
}
}Configure the UAMI client ID as environment-specific application configuration and remove client-secret and certificate settings.
Assign Platform API application roles
Owner: API owner and platform identity team
For each approved ION API dependency, assign the required Ion.* role on the
Platform API application to the UAMI service principal through declarative
automation. Verify that a Platform API token contains only the expected roles.
The role value, not its environment-specific GUID, is the contract. Never assign
all roles for convenience.
Assign Azure RBAC within the permitted boundary
Owner: Service team and resource owner
Grant only the required actions at the narrowest scope.
resource "azurerm_role_assignment" "service_bus_sender" {
scope = azurerm_servicebus_namespace.shared.id
role_definition_name = "Azure Service Bus Data Sender"
principal_id = azurerm_user_assigned_identity.service.principal_id
principal_type = "ServicePrincipal"
}Confirm the target is in the service’s own or an approved shared resource group, the owner approved the scope, and any other scope has a current Security exception.
Configure Easy Auth and APIM
Owner: Service team, API owner, and platform engineering
Configure Easy Auth for the Platform API audience with the rome auth identity
federated credential, 401 for unauthenticated requests, and no anonymous or
key/SAS path. Configure the APIM route to validate the caller token and Ion.*
role, use authentication-managed-identity for the backend, and override
X-Authorization. Test the direct hostname with no token and with
wrong-issuer and wrong-audience tokens.
Register federated credentials for customer-tenant access
Owner: Service team and platform identity team
When the service calls a customer tenant, register its UAMI as a federated identity credential on the approved access application, confirm the application is below the 20-credential limit, and implement the token exchange described in Workload Identity Federation. Do not add a client secret.
Validate, release, inventory, and monitor
Owner: Service team, API owner, and Security
Run positive tests for each approved operation and negative tests for missing
roles, over-scoped RBAC, wrong audience or issuer, another service’s UAMI, another
customer’s context, injected X-Authorization, direct-backend access, and
unavailable managed identity with no fallback. Record assignments, approvals,
evidence, review date, and revocation procedure. Alert on unexpected callers,
cross-scope denials, and role or RBAC drift.
Revocation and offboarding
To remove one capability, delete the relevant app-role, Azure RBAC, or federated credential entry and verify that the operation is denied. When revocation cannot wait for token expiry, detach the UAMI, block the route, stop the workload, or deny network access.
To retire a workload, stop callers, remove route access, remove app-role and RBAC assignments and federated credentials on access applications, detach the UAMI, and delete it after dependency checks. Orphaned identities and assignments are found through periodic inventory reconciliation.
Audit and failure behavior
Entra workload sign-ins, app-role changes, Azure RBAC changes, federated-credential changes, APIM decisions, backend authorization failures, and Azure-resource denials are auditable. Service logs record workload identity, target audience category, operation, customer context where applicable, and correlation ID. They never include bearer tokens, client assertions, or authorization headers.
Token acquisition failure, invalid audience, unapproved caller, or absent role fails closed. Authentication failures are distinguished from authorization denials. Transient errors use bounded retries; code never falls back to secrets, user tokens, or a more privileged identity.