Implementing Federated Identity

1. Understanding Identity Federation Concepts

ConceptDetail
FederationTrust agreement between IdP and RP across domains
Trust anchorShared signing keys / metadata
Home realmUser's primary IdP
Discovery"Where are you from?" page — finds user's IdP

2. Implementing SAML Federation

ElementDetail
Metadata exchangeAggregated by federation operator (e.g., InCommon, eduGAIN)
DiscoveryWAYF / SeamlessAccess
Attribute releasePer-SP scope (entity categories: R&S, CoCo)

3. Implementing OAuth Federation

ApproachDetail
OIDC Federation (RFC drafts)Trust chains via JWTs
Hub modelBroker bridges multiple IdPs
Token exchange (RFC 8693)Swap tokens across trust boundaries

4. Using WS-Federation Protocol

AspectDetail
UseLegacy Microsoft (ADFS), SharePoint
Token formatSAML 1.1/2.0 or JWT
Endpointswsignin1.0, wsignout1.0
StatusMaintained, but new projects use OIDC/SAML

5. Implementing Trust Relationships

MechanismDetail
Direct trustBilateral metadata exchange
Federation trustCommon trust anchor (signed metadata bundle)
Brokered trustHub IdP trusted by all parties
RenewalKey rollover with overlap window

6. Handling Identity Mapping

StrategyDetail
Persistent IDStable opaque ID per (IdP, SP) pair
Transient IDSingle-session only (privacy)
Email-basedRisky if multiple IdPs control same email
Account linkingMultiple external IDs → one local user

7. Implementing Attribute Aggregation

SourceUse
Primary IdPIdentity claims
Attribute authorityRoles/entitlements from separate service
VOOT / SCIMGroup memberships
Risk engineReal-time risk signals

8. Using Federation Metadata

FormatDetail
SAMLEntitiesDescriptor XML, signed
OIDCFederation Entity Statements (JWT)
RefreshPeriodic (daily) with signature verification
FailureUse cached version, alert

9. Implementing Federation Logout

AspectDetail
Single LogoutCascade via SAML SLO or OIDC back-channel
ReliabilityBest-effort; some RPs may stay logged in
User feedbackShow "you remain signed in to X, Y" if cascade incomplete

10. Handling Federation Errors

ErrorHandling
Metadata signature invalidReject, alert ops
Trust expiredBlock until renewed
Attribute missingFall back to defaults or deny
Discovery timeoutPrompt user to choose IdP manually