ADR-0014 — Shared Azure API Management for ION API ingress
Context
ION exposes APIs to several caller classes:
- Customer users through the ION Portal and Teams Tab.
- Ontinue advisors and engineers using on-behalf-of access.
- Alya / Defender Workbench users.
- ION services calling APIs with their own Managed Identities.
- External integration and automation paths that must be governed at a common boundary.
Without a shared API boundary, each service would need to independently implement authentication, tenant validation, app-role checks, throttling, request shaping, logging, and backend protection. That would create inconsistent security policies and make every new service responsible for reproducing platform infrastructure.
The API boundary must also preserve the identity separation established by ADR-0013: user tokens are restricted to BFF services. APIM is not a general-purpose token exchanger or a replacement for BFF authorization. BFFs terminate user-facing sessions and call downstream services with their own UAMI and ION Platform API app roles. Service-to-service callers likewise use their own Managed Identity and platform app token.
Forces / Drivers
- principles/README.md § 10 Trilateral API — services expose publish, subscribe, and REST/API interaction surfaces; the REST surface needs a consistent platform ingress boundary.
- principles/README.md § 12 Managed Identity for service-to-service authentication — APIM must support Managed Identity to downstream APIs without embedding credentials.
- principles/README.md § 13 BFF pattern for frontend access — user tokens stop at BFFs; direct customer access to service APIs is not permitted.
- principles/README.md § 22 Least privilege — each API operation must enforce the minimum audience, tenant, role, and resource scope required.
- principles/README.md § 23 Blast-radius containment — a policy or abuse event on one API must not expose unrelated APIs; routes, products, quotas, and backends require explicit boundaries.
- principles/README.md § 21 Azure-native managed services first — Azure API Management is preferred over ION operating a self-hosted gateway and its control plane.
- Capacity and external API protection — the capacity model identifies substantial UI/backend traffic and external integration ceilings; quotas, rate limits, and concurrency controls belong at the earliest shared boundary.
- Operational consistency — API policy, diagnostics, versioning, and onboarding should be managed once and reused by all systems rather than recreated in every service.
Decision
Adopt one shared Azure API Management instance per ION environment as the platform API ingress and policy boundary.
Topology
- Customer, advisor, Alya, and service API traffic enters through the shared APIM instance rather than exposing each backend as an independent public API.
- APIM publishes APIs as explicit products / API surfaces with named operations, policies, diagnostics, and backend mappings. Products group and publish APIs and may carry a platform-governed product policy; they are not an authentication mechanism. Subscription keys are not used.
- Each ION service owns its API contract and implementation. APIM owns the shared ingress concerns; it does not own domain logic.
- Backend services remain private or otherwise inaccessible as a supported customer integration path. Direct backend access is not part of the public contract.
- The network placement and public edge chain are defined in ADR-0015, which covers Front Door, Application Gateway, WAF, and DDoS considerations.
Identity and authorization boundary
| Caller | APIM responsibility | BFF / backend responsibility |
|---|---|---|
| Customer user | Validate the expected customer Portal audience, supported tenant, and app roles; route only to the Customer Portal BFF | Customer Portal BFF terminates the user token and authorizes the requested customer context; it uses its UAMI for downstream calls |
| Advisor / engineer | Validate the advisor app audience and role; route only to the relevant BFF | BFF validates advisor-to-customer relationship and performs OBO/user-context policy; downstream calls use the BFF UAMI |
| Alya user | Validate the Alya Workbench audience and roles; route to Alya BFF | Alya BFF applies Workbench-specific authorization and uses its UAMI downstream |
| ION service | Validate ION Platform API audience, caller identity, and Ion.* app roles | Target API enforces operation-level role and domain authorization; caller’s UAMI token remains the service identity |
APIM authenticates to backends with its own identity and preserves the
caller’s. For an API call made by a user, a BFF, or another ION service,
the caller obtains a token for the target audience with its own identity.
APIM validates, rate-limits, routes, and logs that token. To reach the
OAuth-protected backend, APIM acquires a token with its own managed
identity and places it in Authorization. The validated caller token is
preserved in X-Authorization, which APIM overrides so a client-supplied
value cannot reach the backend. Caller identity is therefore not erased:
the backend authenticates APIM and attributes the request to the caller.
APIM does not mint caller tokens, is not a general token exchanger, and
does not replace BFF authorization.
Shared policy baseline
Every published API must define, as applicable:
- Entra token validation: signature, issuer, audience, tenant, and required app roles.
- Customer-tenant allow-list validation using the subscribed-tenant data maintained by the onboarding domain.
- Product / operation authorization and request-size limits.
- Rate limits and quotas keyed by the correct isolation dimension (for example tenant, caller application, or operation), never only by a shared global counter.
- Backend concurrency protection where a downstream service or external dependency has a lower capacity ceiling.
- Correlation ID propagation, structured diagnostics, and rejection metrics.
- Standard error mapping that does not leak internal service details.
- API revision / version policy and backward-compatibility expectations.
Policies are a minimum baseline, not a substitute for authorization in the BFF or domain service. A service must still enforce resource ownership, customer isolation, and business authorization after the request reaches it.
Service onboarding contract
A service joining shared APIM must provide:
- Its REST API definition and operation-level audience / role requirements.
- Its backend endpoint and health / readiness expectations.
- Its owning system, service owner, and environment mapping.
- Tenant, quota, throttling, and request-size requirements.
- Diagnostics and correlation requirements.
- A rollback / revision strategy and a test proving that direct backend access is not required.
The implementation procedure belongs in the future APIM capability how-to-guide, not in this platform ADR.
Alternatives Considered
Option A — Each service exposes and secures its own public API
- Rejected. Grounds:
- (decisive) Inconsistent security and tenant isolation. Every team would implement token validation, supported-tenant checks, role checks, throttling, and error handling independently. Drift would be inevitable across a multi-system platform.
- Repeated public endpoints expand the attack surface and make common WAF / edge controls harder to apply consistently.
- Capacity protection would be implemented too late — after traffic has already reached each backend.
Option B — Self-host an open-source gateway or gateway per system
- Rejected. Grounds:
- (decisive) Violates § 21 Azure-native managed services first. Azure API Management provides a managed gateway and policy platform; ION would otherwise own patching, scaling, certificate management, monitoring, backup, and recovery of gateway infrastructure.
- Multiple gateway control planes recreate the policy inconsistency that this ADR is intended to remove.
- Any feature advantage would need to justify a permanent operational burden for the platform team; no such requirement is established in the V3 references.
Option C — Use APIM only for customer traffic; expose service APIs directly for internal callers
- Rejected. Grounds:
- (decisive) Two security and observability paths. Internal APIs would lack the shared API inventory, policy baseline, diagnostics, quotas, and operational controls expected of platform APIs.
- Direct exposure makes service boundaries and network assumptions inconsistent; a workload could bypass common policy accidentally.
- This does not remove the need for Managed Identity or app-role authorization, so it provides little simplification.
Option D — Use a separate APIM instance per system
- Rejected. Grounds:
- Duplicates gateway capacity, policy, diagnostics, and lifecycle management across systems.
- Prevents a single platform-wide view of API health and usage.
- System isolation is better achieved through API products, routes, identities, quotas, and backend boundaries within shared APIM; a separate instance requires evidence of a distinct scale, compliance, or blast-radius boundary.
Rationale
Shared APIM is the smallest Azure-native platform boundary that provides consistent ingress governance without moving domain responsibility out of services. It gives every API the same minimum controls while allowing each system to retain ownership of its contract and business rules.
The key identity decision is not “APIM exchanges every token.” The correct split is:
- APIM governs ingress and applies caller-class policy.
- BFFs terminate customer and advisor user tokens.
- BFFs and other ION services authenticate to downstream APIs with their own
UAMIs and the ION Platform API app’s
Ion.*roles. - Backends enforce resource and domain authorization rather than trusting the existence of an APIM route alone.
This avoids both extremes: duplicating gateway concerns in every service, and centralizing business authorization in an opaque gateway policy layer.
Consequences
Positive
- One API inventory and one reusable policy baseline across ION systems.
- User-token boundary is explicit: customer and advisor tokens are confined to BFF services.
- Service-to-service authentication remains attributable to the calling
service’s UAMI: APIM authenticates to the backend with its own identity
but preserves the validated caller token in
X-Authorization, so caller identity is not erased. - Centralized throttling, quotas, request shaping, diagnostics, and correlation improve protection of the capacity-limited backends.
- New services have a defined onboarding contract and do not need to build their own public gateway.
- Azure operates the gateway substrate, consistent with § 21.
Negative / Trade-offs
- Shared APIM is a platform dependency and must be sized, monitored, and recovered as shared infrastructure.
- A faulty global policy can affect multiple APIs; policies therefore need scoped products / APIs, revision testing, staged rollout, and rollback.
- Teams must coordinate APIM API definitions and policy changes with service releases.
- Gateway controls cannot replace service-level authorization; security is intentionally duplicated at boundary and domain layers.
- APIM policy complexity can become a maintenance burden if domain logic is placed in policies. The onboarding contract explicitly limits APIM to ingress concerns.
WAF Pillar Impact
- Operational Excellence (primary) — one managed API control plane, shared onboarding contract, consistent policy and diagnostics.
- Security — common token validation, tenant isolation, reduced public attack surface, and BFF user-token boundary.
- Reliability — shared dependency and policy rollout risk are traded for centralized health and failure controls; availability is addressed by APIM tier and topology validation.
- Performance Efficiency — early throttling, quotas, and concurrency controls protect backend capacity; APIM adds a gateway hop.
- Cost Optimization — one shared control plane avoids per-system gateway duplication, while APIM tier sizing remains a capacity and cost decision.
Previous approach (V2)
Historical references describe APIs and APIM policies for multiple caller classes, including Managed Identity authentication from APIM to Azure Functions and rate-limit / quota policies. V3 retains the shared APIM platform boundary but clarifies the identity boundary: user tokens are restricted to BFF services; APIM is not a universal token exchanger. Service-to-service traffic uses the platform app and the caller’s Managed Identity as described in ADR-0013.
The deployment topology, APIM tier, API inventory, network path, and policy
coverage were validated against the implementation repositories on
2026-10-15. The ADR is therefore active. See the Amendments section.
Amendments
- 2026-10-15 — Validated and activated. The decision was validated
against
rome-ion/infrastructure/spoke/apimand the service APIM overlays: one Rome APIM service per environment (apim-rome-<env>-chn-02, classic Standard tier), a platform-owned global policy, and service-owned API and operation policies. Status changed fromproposedtoactive. - 2026-10-15 — Backend identity and caller context. The earlier text
said APIM “does not replace [the caller token] with an APIM identity”.
That did not match the V2 or V3 implementation. APIM authenticates to the
backend with its own managed identity in
Authorization, and the validated caller token is preserved inX-Authorization. APIM MUST overrideX-Authorization; the deployed global policy usesexists-action="skip", which is tracked as gap APIM-01. The Decision, Context, and Consequences were updated to match. - 2026-10-15 — Products and subscriptions. Products are for grouping
and publication and may carry a platform-governed product policy, such
as the MFE capability policy. They are not an authentication mechanism.
Subscription keys are not used; the MFE product sets
subscription_required = false. - 2026-10-15 — Product policy scope. The effective policy chain is
Global → Product → API → Operation. A product policy MUST call
<base />first, MUST NOT modifyAuthorization,X-Authorization, orX-Tenant-Id, and MUST receive platform and security review even when another team implements it.
Implementation detail and open gaps are in the V3 API Management documentation.
References
- references/Identity Management- Micro-services Communication.md — APIM policy examples, Managed Identity authentication, rate-limit / quota patterns, and service role model.
- references/Identity Management- Customer Portal (Teams).md — Portal token validation and BFF/OBO separation.
- context/capacity-model.md — UI/API demand and external integration ceilings.
- ADR-0013 — identity model and BFF user-token boundary.
- ADR-0012 — Teams Tab and customer collaboration surface.
- ADR-0015 — outer edge topology.
- principles/README.md §§ 10, 12, 13, 21, 22, 23.