WIPIVERSE All articles

WS-Federation

WS-Federation (Web Services Federation) is a protocol and set of specifications that enable the sharing of identity, authentication, and authorization information across security domains in a web services environment. Developed by the OASIS Web Services Security (WS-Security) Technical Committee, WS-Federation builds upon earlier standards such as WS-Trust and WS-Security to support federated identity scenarios.

Purpose and Scope
WS-Federation allows a relying party (service provider) to delegate authentication to an external identity provider (IdP) without requiring the user to maintain separate credentials for each service. The protocol defines mechanisms for:

  • Issuing, renewing, and validating security tokens (e.g., SAML assertions, JSON Web Tokens).
  • Managing trust relationships between participating parties through metadata exchange.
  • Conveying authentication context, such as authentication method and assurance level.
  • Enabling single sign‑on (SSO) and single logout (SLO) across heterogeneous web applications.

Key Components

Component Description
Passive Requestor Profile Supports browser‑based interactions where the user agent (web browser) redirects between the relying party and the identity provider, typically using HTTP redirects or POSTs.
Active Requestor Profile Designed for programmatic clients (e.g., SOAP or REST services) that directly invoke WS‑Trust endpoints to request tokens.
Federation Metadata XML-based documents that describe the endpoints, supported token types, and cryptographic keys of each party, facilitating automated trust establishment.
Security Token Service (STS) A trusted service that issues, validates, and transforms security tokens according to WS‑Trust and WS‑Federation rules.

Relationship to Other Standards

  • WS‑Security – Provides the base mechanisms for attaching security tokens to SOAP messages.
  • WS‑Trust – Defines the request/response protocol for token issuance and validation; WS‑Federation leverages WS‑Trust messages in its flows.
  • SAML 2.0 – Often used as the token format within WS‑Federation; WS‑Federation can transport SAML assertions in SOAP headers or HTTP redirects.
  • OAuth 2.0 / OpenID Connect – Modern alternatives for federated authentication, especially in RESTful and mobile contexts. WS‑Federation remains prevalent in Microsoft‑centric ecosystems (e.g., Active Directory Federation Services).

Adoption and Implementations

  • Microsoft – WS‑Federation is the primary protocol used by Active Directory Federation Services (ADFS) and Azure AD for legacy SSO scenarios.
  • IBM – Implements WS‑Federation in WebSphere Application Server and related security products.
  • Apache CXF – Provides a WS‑Federation STS implementation for Java applications.
  • Other Vendors – Several identity and access management (IAM) solutions (e.g., Ping Identity, Okta) offer WS‑Federation connectors for backward compatibility.

Typical Flow (Passive Profile)

  1. User accesses a protected resource at the relying party (RP).
  2. RP issues a WS‑Federation sign‑in request (HTTP 302 redirect) containing parameters such as wtrealm (RP identifier) and wreply (return URL).
  3. The browser follows the redirect to the Identity Provider (IdP).
  4. IdP authenticates the user (e.g., username/password, multi‑factor).
  5. Upon successful authentication, IdP generates a security token (commonly a SAML 2.0 assertion) and issues a WS‑Federation sign‑in response back to the RP via HTTP POST.
  6. RP validates the token, establishes a session, and grants access to the requested resource.

Security Considerations

  • Token Integrity – Tokens must be signed (usually with XML‑Signature) and, where confidentiality is required, encrypted using XML‑Encryption.
  • Replay Protection – Tokens include timestamps (NotBefore, NotOnOrAfter) and unique identifiers to mitigate replay attacks.
  • Endpoint Validation – Relying parties must verify that the token originates from a trusted STS whose metadata matches the expected issuer.
  • Transport Security – HTTP (S) is required for all redirects and POSTs to prevent interception of token payloads.

Current Status

WS‑Federation remains a supported standard for federated identity, particularly in enterprise environments that rely on Microsoft identity platforms. While newer protocols such as OAuth 2.0 and OpenID Connect have become dominant for web and mobile applications, WS‑Federation continues to be maintained and interoperable with contemporary security stacks. It is defined in the OASIS specification WS‑Federation 1.2 (published 2012).

Browse

More topics to explore

    Browse all articles