Auth / AuthZ
Problem
ION spans user-facing surfaces (customer portal, advisor workbench, Teams cards), service-to-service calls across systems, and third-party ingress (Sentinel push, ServiceNow webhooks). Each has different callers, different trust boundaries, and different authorisation needs.
A uniform authentication + authorisation pattern is needed across all three, or every service will roll its own — with inevitable gaps.
Solution
Three consistent flows, one boundary rule.
The boundary rule
User tokens terminate at the BFF. Downstream services never see a user’s JWT; they re-authenticate S2S via managed identity.
1. User-facing (BFF)
- User authenticates against Microsoft Entra ID (ADR-0009).
- BFF receives the user’s JWT via APIM; APIM validates signature, issuer, audience, expiry as a global policy.
- BFF also validates the capability header signature (attached by APIM per ADR-0023).
- BFF enforces the capability check — the target action is checked against the user’s capability scope and permissions.
- Downstream calls from BFF use UAMI + app-role token, not the user’s JWT.
2. Service-to-service (UAMI)
- Every service has a User-Assigned Managed Identity.
- Callee services define app roles (
Events.Read,Incidents.Write). - Caller obtains a token for the callee’s Entra app registration via UAMI; token carries the granted app role.
- Callee validates the token and the app role.
- No secrets, no client-cred with password, no user tokens in this path (ADR-0013).
3. Third-party ingress
- APIM validates transport (TLS 1.2+, source IP allowlist where contracted).
- Third-party auth (client cert, signed webhook, API key per contract) is validated at the integration BFF, not APIM.
- Once validated, the integration BFF translates to an internal command and proceeds via S2S UAMI to the domain service.
Capability model
Per ADR-0023:
- User capability =
{scope, permissions, mfe-access, shell}. - Scope — customer / tenant / workspace hierarchy the user can act on.
- Permissions — domain-entity-level (
Incident.Read,Ticket.ReadWrite). - Enforced at BFF, signalled to MFEs so UI can hide disallowed actions.
When to use
- All user-facing HTTP APIs — mandatory BFF pattern.
- All service-to-service calls — mandatory UAMI.
- All third-party inbound push — mandatory dedicated integration BFF.
Not for: fully internal test harness in Alpha only.
Consequences
Positive
- Uniform trust boundary — user tokens can never leak past BFF.
- No secrets in code or configuration for S2S.
- Capability model gives BFF a single point to enforce authorisation cleanly.
- Third-party integrations don’t dilute the ION user-token model.
Negative
- Every S2S caller needs an app registration + role grant; IaC discipline required.
- Capability model requires end-to-end tooling (issuance, APIM signature, BFF validation).
- Three flows to keep documented + tested.
Failure modes
- User token forwarded past BFF — invisible privilege escalation.
- Client cred + secret used for S2S — kill it before it leaks.
- Capability check missed at BFF — UI hidden but API callable.
- Third-party auth at APIM instead of integration BFF — mixes trust surfaces.
References
- ADRs: 0009, 0013, 0023.
- References/ —
Authentication & Authorisation Patterns.md,MFE- Authentication & Authorisation Patterns.md. - Capabilities: Identity, API management.
- Related: Private Data Store Access, Audit Logs, Application Permissions Only.
Applied in
- Every ION BFF (Veritas, Alya, service-scoped BFFs)
- Every S2S call across systems (Watchtower ↔ Cogs ↔ Pigeon ↔ Veritas ↔ ION IQ)
- Sentinel + ServiceNow inbound integration BFFs
- MFE capability-based UI enforcement (Alya + Veritas shells)