Identity federation: validate IdP assertions and manage RP sessions
Learn how an IdP and relying party agree on trust, validate assertions, link accounts, minimize attributes, and manage RP sessions.
Identity federation: validate IdP assertions and manage RP sessions
Identity federation lets a service rely on a trusted identity provider (IdP) to authenticate a user and send a verifiable assertion, instead of collecting the user’s password or authenticator itself. The service provider or relying party (RP) must validate the assertion’s integrity, issuer, audience, time limits, replay status, account mapping, and needed attributes before creating a local session. A valid assertion proves only what the federation agreement and protocol say; it does not automatically grant application permissions.
This overview follows NIST SP 800-63C-4, the July 2025 final edition. It explains the general IdP-to-RP model, not a SAML or OpenID Connect configuration guide. Implementations must also follow their selected protocol specification and trust agreement.
How the sign-in crosses domains
The IdP checks the user’s authenticator and produces an assertion about that authentication event. The RP verifies it, maps the federated identity to the correct local account, and starts its own session. This avoids maintaining a separate password at every service, but the RP remains responsible for its account, session, and authorization decisions.
User ── authenticates ──▶ IdP
│ │ assertion about the authentication event
└─────────────────────────┴──▶ RP (service)
│ validates integrity, issuer, time, audience,
│ replay and account mapping
▼
RP session and authorization decisionFor example, a company IdP may confirm an employee signed in, but that does not make the employee a project administrator. The RP must map the identity to the right account and apply its own permission policy.
Agree on trust before integration
Network connectivity or exchanging a public key alone does not define trust. IdP and RP operators should agree on eligible issuers, protocol and verification keys, attributes and their purposes, account creation/linking/removal, and how to handle compromise and status signals.
| Agreement area | Questions to settle |
|---|---|
| Issuer and keys | Which exact IdP identifier may send assertions? How are key changes and revocation communicated? |
| User identifier | Which stable federated identifier locates the RP account? How is first-time linking protected from attaching the wrong person’s account? |
| Attributes | Which attributes are necessary, for what purpose, and for how long? Can a derived value replace more personal data? |
| Authentication | What authentication strength and recency does the RP require, and how are these represented? |
| Account status and incidents | Who reports suspension, departure, compromise, or attribute changes? Does ending an IdP session actually end existing RP sessions? |
| Recovery | During an IdP outage, is there another RP login path? Is it at least as strong as federation? |
Request only the attributes needed for an agreed purpose. If a service needs only to know whether someone is an adult, a verified yes/no age condition may reveal less than a birth date. The RP must still know whose attribute it is and how its issuer established it.
Validate before creating the RP session
The exact fields depend on protocol and assurance requirements. Use this general review order, then implement the selected protocol’s normative rules:
**Integrity and key:** Verify the protocol’s signature or message authentication code over the required assertion content, using a key allowed by the current trust agreement. A matching key identifier alone is not validation.
**Issuer:** Match the issuer exactly to the IdP expected for this transaction. If multiple IdPs are accepted, keep each issuer’s trust and account-linking policy separate.
**Audience:** Confirm the RP is an intended recipient. Reject assertions meant for another service.
**Time and replay:** Check issuance and validity times; bind a unique assertion ID or protocol nonce to the transaction and prevent reuse. If the RP initiated the request, also match the response to that request’s state or nonce.
**Authentication event:** Check that the method and time of authentication meet the service’s needs. For a high-risk action, an old IdP session may require fresh authentication.
**Account linking:** Map the identity to the correct RP account. Do not automatically attach an existing account merely because an email address matches. Define confirmation and recovery for account linking.
**Attributes and authorization:** Use only agreed attributes for their stated purpose. Authentication may justify starting an RP session; application permissions remain an RP policy decision.
NIST SP 800-63C-4 describes assertion contents such as issuer, audience, issuance and validity times, unique identifier, authentication time, and integrity protection. Depending on the protocol, integrity can use an asymmetric signature or a symmetric MAC. The checklist is not a product-specific field list.
Assertion lifetime and RP session lifetime differ
An assertion is short-lived evidence used to validate a login transaction. The RP session created from it can last longer. NIST treats the lifetimes of the assertion, IdP session, and RP session as independent; ending the IdP session may not terminate a downstream RP session. Set RP expiration and reauthentication rules separately, including fresh authentication for sensitive actions, account suspension, incident signals, and logout integration.
Troubleshooting and operations
| Symptom | First checks |
|---|---|
| Integrity check fails | Confirm the configured IdP key, active key rotation, signed content and permitted algorithm; do not disable verification. |
| Issuer or audience mismatch | Compare the configured issuer and RP identifier with the assertion and trust agreement. |
| Assertion is expired or rejected as replay | Check clocks, validity limits, request correlation, and whether assertion IDs/nonces are consumed once. |
| Login succeeds but selects the wrong account | Review issuer-scoped identifier, account-linking confirmation, and any email-based fallback. |
| IdP logout leaves the service open | Check RP session expiration and supported logout/status signals; do not assume the sessions are coupled. |
Keep enough audit information to diagnose issuer, audience, key ID, time and decision without storing reusable assertions or unnecessary personal attributes. When trust keys or endpoints change, verify the change through the agreed channel before deployment.
Sources
[NIST SP 800-63C-4: Federation and Assertions](https://csrc.nist.gov/pubs/sp/800/63/c/4/final)
[NIST SP 800-63C-4: Federation and Assertions, full text](https://pages.nist.gov/800-63-4/sp800-63c.html)
[NIST SP 800-63C-4: Common Federation Requirements](https://pages.nist.gov/800-63-4/sp800-63c/Federation/)