Managed Identity
Every Azure workload uses managed identity for service-to-service calls and Azure resources. A client secret or certificate is not an alternative or fallback.
Prerequisites
- An accountable microservice/workload owner and target resource/API owner.
- The Azure resources that host the workload and their environment.
- A caller-to-target matrix listing audience, operation, ION application role, Azure RBAC role, and resource scope.
- A decision between system-assigned managed identity (SAMI) and user-assigned managed identity (UAMI).
- Declarative deployment support for the identity, attachment, app-role assignments, and RBAC assignments.
Select SAMI or UAMI
Either type satisfies the managed-identity requirement:
- Use SAMI when one Azure resource owns the workload identity and identity deletion must follow deletion of that resource.
- Use UAMI when permissions must survive host replacement, pre-authorization is required, or several Azure resources implement the same microservice.
- V2 microservices that require stable identity lifecycle use one UAMI per microservice. Do not share it with unrelated microservices.
Document the lifecycle reason. Do not choose UAMI solely to create a universal identity shared by services.
Provision and attach
- Declare the SAMI on its host resource or declare the UAMI as a standalone Azure resource in the workload’s environment and ownership boundary.
- For a UAMI, attach it only to resources that execute the same microservice responsibility. Configure the application to select that identity without placing its identifiers in public documentation.
- Remove client-secret and certificate settings from the Azure workload and deployment pipeline. Do not retain a credential fallback.
- Use the Azure Identity SDK or platform-native managed-identity support. Request the exact target API application ID URI or Azure resource scope ending in
/.defaultas required by that provider. - Declare least-privilege authorization:
- assign an
Ion.<Resource>.<Operation>[.<Constraint>]application role for ION API access; - assign an Azure RBAC role at the narrowest resource scope for Azure control-plane or data-plane access.
- assign an
- Keep application-role and RBAC declarations separate. An API role does not grant Azure-resource access, and Azure RBAC does not grant an ION API operation.
- Deploy identity creation before assignments, assignments before workload activation, and workload activation only after propagation and validation.
- Configure APIM/target API validation for signature, issuer, time, audience, caller identity, and required application role. The domain service also enforces resource, customer, operation, and business authorization.
- Add the identity, attached resources, owners, audiences, assignments, resource scopes, and review date to inventory.
App-role assignments must be deployed through declarative automation using Microsoft Graph’s service-principal app-role-assignment API or an approved provider that uses it. Do not use legacy AzureAD PowerShell or a production portal click path as the system of record.
Positive validation
- From the deployed Azure workload, acquire a token for the intended target without a configured secret or certificate.
- Perform one non-destructive allowed ION API operation and one allowed Azure-resource operation, as applicable.
- Confirm the target identifies the expected managed-identity principal and expected application role or RBAC assignment.
- Replace or restart a UAMI-backed host and confirm stable access; for SAMI, confirm the identity follows the declared host lifecycle.
- Confirm safe telemetry contains identity reference, target, decision, and correlation ID but not the token.
Negative validation
Verify denial for each applicable case:
- no app-role assignment or RBAC assignment;
- wrong target audience;
- a different managed identity, including another microservice’s identity;
- valid identity attempting an unassigned operation or different resource scope;
- valid role attempting another customer’s resource;
- direct user-token access to the service; and
- unavailable managed identity with no secret/certificate fallback.
Rollback and revocation
For a failed rollout, disable the new workload revision, restore the prior identity attachment and assignment declaration, and retest both allowed and denied paths.
For decommissioning:
- Stop or detach all workload hosts so the identity cannot obtain new tokens.
- Remove ION app-role assignments and Azure RBAC assignments declaratively.
- Verify access fails after token and authorization caches expire or are invalidated.
- Delete the UAMI only after attachments and assignments are removed; deletion of a SAMI follows deletion/disablement of its owning resource.
- Remove inventory entries only after audit evidence, revocation result, and retention requirements are satisfied.
Ownership and evidence
The workload owner owns identity use and SDK configuration. API/resource owners approve roles and scopes. The platform identity team owns provisioning controls and inventory. Retain the identity-type rationale, caller-target matrix, approvals, declarative diff, pipeline output, safe positive/negative tests, assignment inventory, and decommission result.