✳ Field lesson IF2 / 11 min

OIDC and SAML assertions: signed identity claims are not admin permission

Federation protocols like OpenID Connect (OIDC) and SAML 2.0 deliver cryptographically signed identity assertions (id_token or <saml:Assertion>) from an Identity Provider (IdP) to a Relying Party (RP / Service Provider). The Relying Party must validate the signature, issuer, audience, and replay nonce, and then map specific verified attributes to local least-privilege roles.

identityoidcsamlfederationssoCISSP D5Security+ (SY0-701) D4CCSP D4

Helpful first: Who holds the ticket: OAuth 2.0 roles and bearer token verification

Key points

  • Distinguish an OIDC id_token or SAML 2.0 assertion (proof of authentication) from an OAuth 2.0 access_token (API capability ticket) and local authorization policy
  • Bind federated identity uniquely using immutable (iss, sub) pairs rather than mutable email addresses
  • Enforce explicit claim-to-role mapping so valid federated login never defaults to administrative privilege

What an IdP assertion actually says

While OAuth 2.0 delegates API authorization, OpenID Connect (OIDC) (layered on top of OAuth 2.0) and SAML 2.0 handle federated authentication: proving to a Relying Party (RP) or Service Provider (SP) that a human user signed in at a trusted Identity Provider (IdP). In OIDC, that proof is a signed JWT called an ID Token (id_token). In SAML 2.0, it is an XML document containing a cryptographically signed <saml:Assertion>.

The same five Mandatory Relying Party checks apply to an id_token and a <saml:Assertion>, and only the field names differ. A valid assertion only proves Authentication, never Authorization.

At Meridian Space & Robotics (chronos.orbital), Principal Security Architect Vera Vance sees a recurring logical bug when teams integrate enterprise Single Sign-On (SSO): a service verifies that the incoming SAML or OIDC signature is valid and immediately grants the caller full administrative access to the tenant. A valid assertion only proves who signed in (Authentication), never what they may administer (Authorization).

Core claims inside OIDC ID Tokens and SAML 2.0 Assertions
Claim / ElementOIDC (id_token)SAML 2.0 (<Assertion>)Mandatory Relying Party Check
Issueriss (https://idp.chronos.orbital)<saml:Issuer>Must match the exact IdP configured for that specific customer tenant
Subject Identifiersub (u-99418a)<saml:NameID>Combine (iss, sub) as the immutable primary key; never key purely on mutable email
Intended Audienceaud (client_id of the RP)<saml:AudienceRestriction>Reject assertions minted for any other Relying Party application
Time Window & Replayexp, iat, nonceNotBefore, NotOnOrAfter, InResponseToReject expired assertions and enforce single-use nonce / InResponseTo IDs
Assurance & Groupsacr / amr, groups<AuthnContextClassRef>, <AttributeStatement>Map verified group/role claims to local RBAC; default unmapped users to zero privilege

Why (iss, sub) beats email as a federated primary key

Suppose Meridian’s telemetry portal keys user accounts solely by the email claim in an OIDC id_token. What happens if contractor alex@partner-aero.example leaves the partner company, and six months later the partner’s IT department reassigns alex@partner-aero.example to a new intern? Or worse, what if a misconfigured multi-tenant IdP lets an attacker in another organization register an unverified alias matching @chronos.orbital?

The telemetry portal keys user accounts only by the email claim, so the account follows alex@partner-aero.example when the partner reassigns that address to a new intern. OIDC Core 1.0 section 5.7 names (iss, sub) as the only stable, unique identifier. The Relying Party must also require email_verified: true before it uses email for display or account linking.

The OIDC Core specification explicitly warns against using email as a primary key. Instead, the Relying Party must identify users by the composite tuple (iss, sub) - the verified Issuer URL plus the IdP’s immutable Subject identifier - and require email_verified: true before using email even for display or account linking.

Explicit claim-to-role mapping and step-up assurance (acr)

When Propulsion Lead Priya Nair signs in via OIDC to approve a launch parameter change, the Relying Party inspects two additional claims inside the signed token before granting write access: the authorization group/role attribute (groups: ["meridian-flight-directors"]) and the Authentication Context Class Reference (acr: "urn:chronos:aal3-fido2").

If a user authenticates validly at the IdP using only a password + TOTP (acr: "aal2") or belongs only to ["meridian-all-staff"], the Relying Party accepts their identity (200 OK for read-only status views) but returns 403 Forbidden or triggers an interactive step-up authentication challenge before allowing any administrative action.

With explicit claim-to-role mapping and step-up assurance (acr), groups: ["meridian-flight-directors"] and acr: "urn:chronos:aal3-fido2" grant write access. With acr: "aal2" or only ["meridian-all-staff"], the Relying Party accepts their identity (200 OK for read-only status views) but returns 403 Forbidden or a step-up authentication challenge before any administrative action.

CHECK YOUR JUDGMENT

Meridian Space & Robotics (chronos.orbital) integrates an external supplier’s SAML 2.0 Identity Provider into Meridian’s Supplier Quality Portal. During testing, Kael Cho notices that any supplier employee who completes SAML sign-in is automatically placed into the portal-super-admin role unless an administrator manually downgrades them later. What is the flaw, and how should Kael fix it?

NEXT FIELD LESSON

Federation failure modes: five ways SSO and token trust break

↗

Find your next idea.

Tip: press / to open search. Escape closes this window.