skip to content

In the WS-Security SAML Token Profile, how do holder-of-key and sender-vouches subject confirmation differ, and what must the receiver verify for each?

level: seniorimportance: nice to knowfreq 7%

answer

  1. who proves the assertion applies
  2. a key named inside the assertion
  3. a trusted party speaking for someone
  4. signature ties assertion to message
  5. bearer: the profile asks nothing

basics

~20 s

With holder-of-key, the sender proves it knows a key named in the assertion's subject confirmation, usually by signing message content with it. With sender-vouches, a separate attesting entity the receiver already trusts signs assertion and message together, vouching for the subject.

solid answer

~50 s

The **SAML Token Profile 1.1.1** carries a SAML 1.1 or 2.0 assertion in, or references it from, the `wsse:Security` header, and requires receivers to support two confirmation methods (`urn:oasis:names:tc:SAML:2.0:cm:holder-of-key` and `...:sender-vouches`, with SAML 1.0 equivalents). **Holder-of-key**: the assertion's `SubjectConfirmation` names a key in `ds:KeyInfo`, and the attesting entity proves knowledge of it, typically with a `ds:Signature` over message content. The receiver MUST NOT accept the statements until it has validated the assertion's integrity and seen that proof. **Sender-vouches**: an attesting entity, presumed different from the subject (say, a gateway acting for a user), protects the assertion together with the message content, usually by signing both with its own key; the receiver MUST already have a trust relationship with that entity. For a **bearer** assertion, the profile requires no check that links the message to the assertion.

go deeper

for a junior

Recall that a SAML assertion can travel in the Security header and that holder-of-key and sender-vouches are the two confirmation methods receivers must support.

for a middle

Explain who proves what in each method: knowledge of a key named in the assertion, or a trusted third party signing for the subject.

for a senior

Show what a receiver must check before accepting each kind, and how a gateway-to-service chain changes where trust really sits.

for a principal

Judge when concentrating trust in a vouching gateway is acceptable, versus pushing proof-of-possession keys out to every caller.

## Where the assertion sits The **SAML Token Profile 1.1.1** (OASIS) explains how a SAML assertion, a set of statements an authority makes about a subject, is used as a WS-Security token. The assertion is either placed directly inside `wsse:Security` or referenced from it through a `wsse:SecurityTokenReference`: - A key identifier with ValueType `#SAMLAssertionID` (SAML 1.1, whose identifier attribute is `AssertionID`) or `#SAMLID` (SAML 2.0, whose attribute is `ID`). - A `wsse11:TokenType` of `#SAMLV1.1` or `#SAMLV2.0` on the reference to say which version is meant. - For an assertion that is not in the message at all, a remote reference the receiver resolves itself. The profile notes two version differences that matter to it. Besides the renamed identifier attribute, SAML 1.1 lets each statement carry its own subject and confirmation methods, while SAML 2.0 allows at most one subject and one set of confirmation methods for all the statements of an assertion. The structure of the assertion (its subject, conditions and statements) belongs to SAML itself; this profile is about **how the receiver decides the assertion applies to the message in front of it**. ## The question every confirmation method answers The profile calls the party that supplies the evidence the **attesting entity**. The receiver MUST establish the relationship between the subject and claims of the statements and that attesting entity, and systems implementing the profile MUST support both **holder-of-key** and **sender-vouches**. It also strongly RECOMMENDS an XML signature to tie message and statements together, especially over an unprotected transport. ## Holder-of-key 1. The issuing authority puts a `SubjectConfirmation` with the holder-of-key method into the assertion, and it MUST include a `ds:KeyInfo` identifying a public or secret key. The assertion SHOULD itself be signed so that key binding cannot be altered. 2. The sender demonstrates knowledge of that key. The profile says it MAY do so by signing content within the message and putting that `ds:Signature` into the `wsse:Security` header. 3. The receiver MUST NOT accept the statements on that basis unless it has validated the assertion's integrity **and** seen the key demonstrated. 4. If both hold, the statements MAY be attributed to the sender, and message content protected by that key MAY be treated as coming from it. The sender MAY also include the assertion, or an unambiguous reference to it, under the same signature, which stops a different assertion naming the same key from being swapped in. ## Sender-vouches 1. The attesting entity is presumed to be **different from the subject**: typically an intermediary that has already authenticated a user and now calls a service on that user's behalf. 2. It MUST protect the vouched-for message content, and the binding of the statements to it, against undetected modification. The profile says it MAY do this with a `ds:Signature` over the relevant content and assertions, made with **its own** key. 3. The receiver MUST have an **existing trust relationship** with that attesting entity, and MUST NOT accept the statements unless they and the message are protected by an entity it trusts to act for those subjects. In sender-vouches, the user's own key never appears; trust collapses onto the party that vouches. ## Side by side | | Holder-of-key | Sender-vouches | Bearer | |---|---|---|---| | Who attests | whoever knows the confirmation key | a third party acting for the subject | whoever presents the assertion | | Proof in the message | signature with the key named in the assertion | signature by the vouching party over assertion and content | none required by this profile | | What the receiver must already trust | the assertion's issuer | the vouching party, by prior arrangement | outside this profile's scope | | Required by the profile | yes | yes | must be conveyable, no binding check | For bearer assertions (`urn:oasis:names:tc:SAML:1.0:cm:bearer`), the profile states that it does **not** require receivers to establish any relationship between the message and the statements; conformant implementations only have to be able to carry and reference them. ## What still has to be checked - Every processor MUST apply SAML's own validation rules: the assertion's signature, its conditions and its subject confirmation data. - The profile notes that its high-level model does not separate the attesting entity from the message sender in a way that would stop replay; freshness needs timestamps or other tracking.

  • Why might a holder-of-key sender also put the assertion under its own signature?
    The profile says the attesting entity MAY guard against substitution of a different but equivalently confirmed assertion by including the assertion, or an unambiguous reference to it, in the signed content. Without that, an attacker could swap in another assertion naming the same confirmation key but carrying different statements, and the key proof would still check out.
  • In what kind of call chain does sender-vouches fit, and what does it cost?
    A front-end or gateway authenticates the end user, then calls a back-end service on that user's behalf, attaching an assertion about the user and signing assertion and message with its own key. The back end trusts the gateway, not the user's key. The cost is concentrated trust: a compromised gateway can vouch for any subject.

saying these in an interview costs you the question

  • Holder-of-key means whoever holds the assertion is its subject.
  • Sender-vouches needs no trust in the sender if the issuer signed the assertion.
  • In sender-vouches the subject signs the message with its own key.
  • The profile binds a bearer assertion to the message it arrives in.
  • A receiver may accept holder-of-key statements without validating the assertion.