Skip to content
Ashish.
All posts
Diagram comparing Hub-and-Spoke IdP topology vs Brokered Mesh topology.
6 min readDevelopmentIntermediateFeatured#identity broker#identity provider#sso#token translation#topology#iam architecture

Identity Broker vs Identity Provider: Architectural Distinctions

Understand the architectural differences between identity brokers and identity providers, focusing on token translation and topology design for engineers.

By Ashish Kumar

In modern Identity and Access Management (IAM) architecture, the terms "identity broker" and "identity provider" are frequently conflated by product marketers, yet they represent fundamentally different mechanisms in the data flow of authentication. For engineers, this distinction is not merely semantic; it dictates where trust is anchored, how tokens are transformed, and how system failures propagate across federated environments.

The core functional difference is straightforward: an Identity Provider is a source of truth that issues credentials based on direct authentication. An Identity Broker is an intermediary that aggregates, translates, and routes identity assertions from one or more IdPs to Service Providers (SPs). Understanding this requires analyzing the mechanism of token issuance versus the mechanism of token translation.

The Identity Provider: The Trust Anchor

An Identity Provider is a system that verifies a user’s identity and issues a security token asserting that verification. The IdP holds the "source of truth" for a specific set of users. When a user logs in via an IdP, the system performs the authentication check (password, MFA, biometric) and then constructs a signed assertion.

The mechanism here is issuance. The IdP does not care about the destination service’s internal schema; it only ensures that the token is cryptographically signed and readable by the intended audience. This behavior is standardized in protocols like OpenID Connect (OIDC) Core and SAML 2.0, where the IdP acts as the ultimate authority for the subject's attributes. Consider a well-known implementation like Azure AD or Google; these systems generate tokens that rely on their own public key infrastructure for validation, establishing them as the root trust anchor for the users within their domain.

Consider a standard OpenID Connect (OIDC) flow with Google as the IdP:

  1. The user attempts to access app.example.com.
  2. The app redirects the user to accounts.google.com.
  3. Google authenticates the user.
  4. Google redirects back to the app with an id_token (JWT) containing claims like sub, email, and name.

The trust model here is direct. The Service Provider (app) must trust Google’s public key to validate the signature. The IdP is the root of the trust chain for those specific users. It does not transform the identity; it exposes it in its native format.

Technical diagram showing a direct Hub-and-Spoke topology. Center node is 'Service Provider'. Lines connect directly to multiple 'Identity Providers' (Azure AD, Google, Okta). Clean lines, minimalist style, blue and gray color palette.

The Identity Broker: The Protocol Translator

An Identity Broker sits between the IdP and the Service Provider. Its primary mechanism is translation and aggregation. A broker allows an organization to connect multiple disparate identity sources (e.g., Azure AD for employees, Okta for contractors, and a legacy LDAP for vendors) and present them as a single identity source to downstream applications.

The broker does not typically authenticate the user directly against a password store (though it can act as an IdP for the downstream app). Instead, it acts as a proxy that intercepts the authentication flow, negotiates with the upstream IdP, and then reformats the resulting token for the downstream SP. Implementations like Keycloak or Auth0 often serve this role, providing configurable pipelines for attribute mapping and protocol switching.

Token Translation Mechanism

The most critical function of a broker is attribute mapping. Upstream IdPs and downstream SPs rarely speak the same language regarding user attributes.

For example:

  • Upstream IdP (Azure AD) returns a claim onPremisesSecurityIdentifier.
  • Downstream SP (Salesforce) expects a claim emailAddress or a custom ExternalId.

A broker intercepts the SAML assertion or OIDC ID token from Azure AD. It parses the XML/JSON, extracts the onPremisesSecurityIdentifier, looks up the corresponding emailAddress in a local mapping table, and constructs a new SAML assertion or OIDC token signed by the broker’s own keys. To the downstream SP, the broker is the IdP.

This mechanism decouples the downstream application from the complexity of the upstream identity ecosystem. The SP trusts the broker, and the broker trusts the upstream IdPs. This creates a layered trust model.

Topology: Hub-and-Spoke vs. Brokered Mesh

The architectural choice between using an IdP directly and using a Broker impacts the topology of your system. Recognized architectural patterns, such as those discussed in the Enterprise Integration Patterns literature, highlight the trade-offs between coupling and latency in these designs.

1. Direct IdP Integration (Hub-and-Spoke)

In this model, every Service Provider connects directly to the IdP.

  • Flow: SP <-> IdP
  • Pros: Simple configuration. Low latency (one hop).
  • Cons: High coupling. If the IdP changes its attribute schema, every SP must be updated. If you have 50 SPs and 3 different IdPs (HR system, partner portal, legacy system), you must configure 150 connections. The IdP becomes a bottleneck and a single point of failure for the entire federation.

2. Brokered Topology (Star/Mesh)

In this model, all IdPs connect to the Broker, and all SPs connect only to the Broker.

  • Flow: SP <-> Broker <-> IdP(s)
  • Pros: Centralized policy enforcement. You can apply consistent attribute mapping rules in one place. The Broker can aggregate identities (e.g., merging a GitHub identity with a corporate email). The SPs are insulated from upstream changes.
  • Cons: Added latency (two hops). Complexity in managing the broker’s mapping logic. The broker becomes a critical infrastructure component; if it fails, all federated access fails.
Technical diagram showing a Brokered Mesh topology. Center node is 'Identity Broker'. Lines connect from multiple 'Identity Providers' on the left and multiple 'Service Providers' on the right. Clean lines, minimalist style, blue and gray color palette.

Why Engineers Choose Brokers

Engineers introduce a broker when the cost of managing direct IdP-SP connections outweighs the latency penalty. This typically happens in three scenarios:

  1. Protocol Heterogeneity: An organization uses SAML 2.0 for internal legacy apps but needs to expose identity via OIDC to mobile apps. A broker can translate SAML assertions into OIDC tokens on the fly, handling the complex mapping of XML-based SAML attributes to JSON-based OIDC claims.
  2. Attribute Normalization: Different IdPs use different namespaces. A broker can normalize uid from LDAP, upn from Active Directory, and email from Google into a single sub claim for the SP.
  3. Aggregation: A user might have an identity in HR (Active Directory) and an identity in a contractor portal (Okta). A broker can link these two identities and present a unified profile to the SP, hiding the fact that the user exists in two separate systems.

Conclusion

The Identity Provider is the vault; it holds the key and verifies the user. The Identity Broker is the translator; it takes the key from the vault, explains what it means to the receiver, and ensures the door opens correctly.

Confusing the two leads to architectural fragility. If you treat a broker as an IdP, you may attempt to store passwords or manage MFA at the broker layer when it should simply be routing assertions. If you treat an IdP as a broker, you will fail to handle attribute mapping across heterogeneous systems.

For engineers, the decision is clear: Use an IdP when you have a single source of truth and a single protocol. Use a Broker when you need to aggregate multiple sources, translate protocols, or normalize attributes before they reach the service provider. The key architectural distinction lies in whether the system generates trust or merely relays it. Successful implementation requires careful consideration of token translation, topology design, and the complexities of brokering identity across diverse systems.

Related posts