skip to content

When choosing between SAML 2.0 and OpenID Connect, what does each one's credential format demand of the relying side?

level: middleimportance: must knowfreq 55%

answer

  1. compare what you must consume
  2. one is a document, one is a compact token
  3. canonicalise and verify versus a JOSE check
  4. the dependency decides the platform
  5. a third standard still exists in estates

basics

~20 s

SAML 2.0 delivers an XML assertion with an XML Signature over it, so the relying side needs an XML toolchain that canonicalises and verifies documents. OpenID Connect delivers a JWT verified with a JOSE library against a published key set. That difference decides which platforms can cheaply be a relying party.

solid answer

~50 s

Compare the standards by the **credential a relying party has to consume**, because that is what it pays for on every login. SAML 2.0 hands over an XML assertion protected by an XML Signature: verifying it means canonicalising a document and checking a signature over part of it, which needs an XML security toolchain — heavier, historically a source of parser-level defects, and not equally available on every platform. OpenID Connect hands over a JWT (`RFC 7519`) verified by a JOSE library against keys published as a JWK Set (`RFC 7517`) — a smaller dependency that essentially every modern platform has. A third option exists and estates still carry it: `WS-Federation Version 1.2`, an OASIS Standard published in May 2009. Attribute delivery and logout semantics also differ between the standards; in a selection review those are criteria to confirm, not details to defer.

go deeper

for a junior

Recall that the two standards deliver different credentials: one an XML document, the other a compact token, and that the relying side must be able to verify whichever arrives.

for a middle

Explain the dependency each format imposes — an XML toolchain that canonicalises and verifies, against a JOSE library checking a JWT against a published key set — and why that decides platform fit.

for a senior

Show the review you would actually run: client population, consumption cost, expressiveness and incumbency, and say why incumbency usually decides it.

for a principal

Own the consequence across an estate you do not control: a standard nobody else runs is a project for every member, so the defensible answer is often to carry two and plan the migration rather than to pick a winner.

## Compare what you must consume, not what you like Standard-selection arguments go wrong when they are conducted on style — one is XML and old, the other is JSON and modern. That framing predicts nothing. The question that predicts everything is: **what must a relying party be able to do, on every single login, to accept this credential at all?** Answer that and the selection usually answers itself. ## The two credentials, side by side | | SAML 2.0 | OpenID Connect | |---|---|---| | Credential the relying side consumes | An XML assertion | A JWT (`RFC 7519`) | | Protection over it | An XML Signature over the document or a part of it | A JOSE signature over the compact-serialised token | | Dependency required | An XML security toolchain that canonicalises and verifies | A JOSE library and the key set (`RFC 7517`) it verifies against | | Typical size on the wire | A document, often kilobytes | A compact string, typically far smaller | | Platform availability | Good on long-lived server stacks, patchy elsewhere | Broad, including constrained and browser-adjacent platforms | | Party naming | An `entityID` names each party | An issuer identifier names the provider | What matters in that table is the **dependency row**. An XML signature is verified over a document whose exact bytes must first be agreed on, which is why canonicalisation exists and why the toolchain is substantial. A JOSE signature is verified over a string the format already pins. That is not a statement about which is more secure; it is a statement about what the relying party must ship and keep patched. ## What the difference actually decides Three selection consequences follow, in the order they usually bite: 1. **Which platforms can be a relying party cheaply.** If a member organisation's integration team can pull in a JOSE library but has no XML security stack, that asymmetry decides the standard for them regardless of anybody's preference. 2. **What your operational surface is.** A heavier parser is a larger surface to keep current. This is an argument about maintenance, not an accusation against the standard. 3. **What travels with the identity.** The two standards deliver attributes about the user differently, and they take different positions on how a logout is signalled. Both differences are **selection inputs** — confirm each one can carry what your estate needs before choosing. How either mechanism works is the subject of that standard's own material, not of this decision. ## The third option you must name rather than assume away Estates do not only contain the two standards people argue about. **WS-Federation Version 1.2** is an OASIS Standard published in **May 2009**, and organisations still carry deployments of it. In a selection review, name it at exactly that strength: a third, distinct federation standard that some members will arrive speaking, and one that needs its own implementation on both sides rather than being a dialect of either of the other two. Do not assume its messages resemble anything you know. ## How to run the comparison in practice A selection review that holds up has four columns and no adjectives: - **Client population** — what will need to log in, and can the standard serve it without an opt-in profile at both ends? - **Consumption cost** — what library and what maintenance does each credential format impose on each side? - **Expressiveness** — can the standard carry the attributes and the session behaviour the business actually needs? - **Incumbency** — what do the member organisations already run, and what does asking them to change cost them rather than you? Incumbency is the column engineers discount and estates decide on. A standard that is objectively better to consume is still the wrong answer if forty member organisations would each need a project to adopt it — which is why the realistic outcome is so often *both, for years*, and why coexistence is a first-class design problem rather than a failure of the selection. ## The trap to avoid The trap is treating the credential format as cosmetic and discovering later that it was structural: a member whose platform has no XML security stack, a client population the mainstream profile cannot serve, or an attribute the chosen standard has no natural place for. Those surface years after the decision, which is exactly why interviewers ask this as a design question rather than a trivia one.

  • A member organisation arrives speaking WS-Federation Version 1.2. What does that change about your selection?
    It adds a third distinct standard rather than a variant of the other two. WS-Federation Version 1.2 is an OASIS Standard published in May 2009 and some estates still run it, so plan for a member that neither of your existing paths serves: either that member is terminated separately and re-issued into whatever the applications speak, or it is scheduled for migration like any other member. What it is not is a configuration option on a SAML 2.0 or OpenID Connect integration.
  • Is 'XML is verbose' a legitimate selection argument?
    Only as a proxy for something measurable. Size matters where the credential is carried somewhere constrained, and the toolchain matters for maintenance and platform availability. Stated as taste, it convinces nobody who owns the incumbent integration; stated as a dependency and a size, it is a column in the review.
  • The two standards differ on logout. How much of that belongs in the selection decision?
    The fact of the difference, and whether each standard can express the behaviour the business requires — that is a criterion. The mechanics of either logout story belong to that standard's own material, and a selection review that drifts into them stops comparing and starts implementing.

saying these in an interview costs you the question

  • Argues purely from XML being old and JSON being modern
  • Thinks the two standards deliver user attributes in interchangeable ways
  • Assumes any platform can verify an XML Signature as easily as a compact token
  • Treats WS-Federation Version 1.2 as a dialect of SAML 2.0
  • Ignores what the member organisations already run
  • Calls the credential format cosmetic