By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
Identity Federation allows users to access multiple applications/services using a single set of credentials (e.g., logging into Gmail, YouTube, and Google Drive with one Google account). Single Sign-On (SSO) is a subset of federation that enables users to authenticate once and access multiple services without re-entering credentials. These technologies reduce password fatigue, improve security (fewer credentials to steal), and streamline user experience.
Why it’s critical:- Security: Reduces attack surface by minimizing password reuse (a leading cause of breaches, e.g., the 2020 Twitter hack where attackers phished employee credentials to hijack high-profile accounts).- Compliance: Meets regulatory requirements (e.g., NIST SP 800-63B, GDPR) for secure authentication.- Operational efficiency: Eliminates helpdesk tickets for password resets (40% of helpdesk calls, per Gartner).
Real-world incident:In 2017, OneLogin (an SSO provider) suffered a breach where attackers accessed a set of AWS keys, allowing them to decrypt sensitive data, including customer credentials. The attack exploited a misconfigured SAML implementation, highlighting the risks of improper federation setups.
Identity Provider (IdP): A trusted service that authenticates users and issues identity assertions (e.g., Okta, Microsoft Azure AD, Google Identity Platform). Follows standards like SAML 2.0 or OpenID Connect (OIDC).
Service Provider (SP) / Relying Party (RP): The application or service a user wants to access (e.g., Salesforce, Slack). The SP/RP trusts the IdP to verify the user’s identity.
SAML (Security Assertion Markup Language): An XML-based standard for exchanging authentication and authorization data between IdPs and SPs. Used in enterprise SSO (e.g., corporate logins to cloud apps). Port: Typically 443 (HTTPS).
SAML Flow: SP-initiated (user clicks "Login with SSO") or IdP-initiated (user logs into IdP first, then accesses SP).
OAuth 2.0 (Open Authorization): A delegation protocol that allows third-party apps to access resources on behalf of a user without sharing credentials (e.g., "Log in with Google" to grant a mobile app access to your contacts). Not an authentication protocol—it’s for authorization (e.g., "Can this app read my emails?").
Grant Types (Flows):
OpenID Connect (OIDC): An authentication layer built on OAuth 2.0 that adds identity verification (e.g., "Is this user really Alice?"). Uses JSON Web Tokens (JWT) instead of XML (like SAML).
sub
email
Example: Logging into Spotify with your Google account.
JSON Web Token (JWT): A compact, URL-safe token format (e.g., header.payload.signature) used in OIDC and OAuth. Contains:
header.payload.signature
JWT
HS256
RS256
⚠️ Risk: JWTs are base64-encoded, not encrypted by default. Always use HTTPS and validate signatures!
Federation Metadata: XML (SAML) or JSON (OIDC) files that define trust relationships between IdPs and SPs (e.g., SAML’s metadata.xml or OIDC’s /.well-known/openid-configuration).
metadata.xml
/.well-known/openid-configuration
Just-In-Time (JIT) Provisioning: Automatically creates user accounts in an SP when a user logs in for the first time via federation (e.g., a new employee logs into Salesforce via Azure AD).
SCIM (System for Cross-domain Identity Management): A standard for automating user provisioning/deprovisioning across systems (e.g., when an employee is hired/fired, SCIM syncs their access across apps).
LDAP (Lightweight Directory Access Protocol): A protocol for querying and modifying directory services (e.g., Active Directory). Often used by IdPs to store user data. Ports: 389 (unencrypted), 636 (LDAPS, encrypted).
Multi-Factor Authentication (MFA) in Federation: IdPs can enforce MFA (e.g., SMS, TOTP, FIDO2) before issuing tokens/assertions. Critical for security—federation without MFA is a major risk (e.g., the 2020 Twitter breach).
EntityID
ACS URL
Logout URL
username
Client ID
Client Secret
https://yourapp.com/callback
https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=...
code
ID Token
Access Token
Client Secrets
state
A) OAuth 2.0 B) OpenID Connect C) SAML 2.0 D) LDAP
✅ Correct Answer: C) SAML 2.0Explanation: SAML is the standard for enterprise SSO (e.g., corporate apps like Salesforce). OAuth/OIDC are better for consumer apps, and LDAP is a directory protocol, not a federation standard.
A) The token may expire too quickly.B) The token could be stolen via a cross-site scripting (XSS) attack.C) The token will not work with refresh tokens.D) The token will be encrypted by default.
✅ Correct Answer: B) The token could be stolen via a cross-site scripting (XSS) attack.Explanation: localStorage is accessible via JavaScript, making it vulnerable to XSS attacks. Tokens should be stored in HTTP-only cookies or secure mobile storage.
localStorage
A) The IdP’s signing certificate was not validated by the SP.B) The SP used the Implicit Flow instead of Authorization Code Flow.C) The access tokens were not encrypted.D) The refresh tokens were stored in a database.
✅ Correct Answer: A) The IdP’s signing certificate was not validated by the SP.Explanation: If the SP does not validate the SAML signature, attackers can tamper with assertions (e.g., change the NameID to impersonate another user).
NameID
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.