Skip to content
Wallet and Entity Collection draft updates
Documentation menu

3.3. Attach trust chains to signed protocol messages

Feature guides / 3. Trust chains · Example context

LIGO Wiki can send its chain with a signed registration message so Umeå University OP need not rediscover every statement. A peer chain can express the sender's view of the recipient's path.

How to use it

OIDC RP configuration exposes includePeerTrustChain. The registration workflow selects compatible chains and constructs the protected headers. Configure the role before attaching it to a federation host. Chain headers; Wallet offline selection.

import type { OidcRelyingPartyRoleConfig } from "@oidfed/oidc";
import type { TrustAnchorSet } from "@oidfed/core";

export function rpChainOptions(anchors: TrustAnchorSet) {
  return {
    signing: {requestObject:"request_object", clientAssertion:"client_assertion"}, trustAnchors: anchors,
    includePeerTrustChain: true,
  } satisfies OidcRelyingPartyRoleConfig;
}

What your application owns

The attached chain must identify the actual signer and remain valid. Entity Configurations and Subordinate Statements themselves cannot carry these headers. Wallet signed-object helpers accept a supplied signing chain; restrict their configured anchors to those the intended counterparty accepts when that is known. That host selection is distinct from OIDC's shared-chain registration workflow.

Keep the header bound to its signer

When LIGO Wiki attaches a trust_chain header, use a chain for the entity that signs the JWT and a path the recipient can validate. Possession of a valid chain for a different entity does not establish this signer's identity. The recipient still validates the header's evidence against its own trust configuration.

A supplied peer_trust_chain describes the other participant. Preserve the protocol's same-anchor conditions when supplying both chains. If a saved header becomes stale after rollover or renewal, rebuild the request with fresh evidence; changing the header of an already signed JWT invalidates its signature.

What is the peer_trust_chain JWS header parameter?

As defined in Section 4.4 of the OpenID Federation specification, the peer_trust_chain parameter is a JOSE JWS header parameter containing a JSON array of Entity Statements representing the Trust Chain between the peer entity being interacted with (e.g. the OP, when sent by the RP in a Request Object) and the selected Trust Anchor.

The processing rules are:

  • It allows the RP to supply the OP's trust chain as resolved/chosen by the RP. Supplying both chains binds the two views to the same federation.
  • The base Federation §4.4 rule says the chains SHOULD end at the same Trust Anchor when both headers are present.
  • OIDC registration strengthens this to MUST: §12.1.1.1.1 requires a common Trust Anchor for the two headers, and §12.2.1 requires the registration parties' chains to share an anchor. The OIDC registration APIs enforce these requirements; they are not a universal same-anchor rejection rule for core chain validation.
  • In automatic registration, peer_trust_chain can be supplied independently. Without trust_chain, the OP discovers and validates the RP's chain normally; its selected Trust Anchor need not match the peer chain's anchor. The peer chain is still fully validated against configured Trust Anchors, and its resolved OP metadata is returned in peerResolvedOpMetadata for the integrator to use.
  • OP-side processing validates supplied trust_chain and peer_trust_chain values as full Trust Chains. Each header must be a nonempty array of JWT strings. Malformed values, including empty arrays and null, are rejected before automatic-registration discovery or replay storage. Invalid supplied chains are rejected instead of being ignored in favor of live discovery.
  • According to Section 12.2.1, the peer_trust_chain header parameter MUST NOT be used when the request body itself is a Trust Chain (application/trust-chain+json); it is only permitted when the request body is the Entity Configuration of the RP (application/entity-statement+jwt).
  • It MUST NOT be included inside Entity Configurations or Subordinate Statements themselves.

Next: 4. Metadata

View source on GitHub