Get started
Docs menu

Credentials and federation

OpenID Federation

On this page

Introduction

In an OpenID Federation, organisations trust each other's servers through a shared authority, instead of registering each one by hand. Each member publishes a signed description of itself. Authorities above it vouch for its keys, and the statements from a member up to an authority both sides trust form a "Trust Chain".

Signari publishes an Entity Configuration, the self-signed Entity Statement that makes it a member of an OpenID Federation. It can also build and check other members' Trust Chains, and let a federation's applications sign in with no registration step. Specification: OpenID Federation 1.0, Final, 17 February 2026.

You turn federation on with the command line or the Admin API, and restart Signari.

Note

Trust Marks, which say that a member has passed an assessment, have a page of their own: Trust marks.

What is implemented, and what is not

Implemented. These parts of the specification are built:

  • The Entity Configuration (§9): the statement an entity publishes about itself at /.well-known/openid-federation. It is the leaf of every Trust Chain, and the prerequisite for everything else in the specification.
  • Trust-chain building and validation (§10), metadata policy (§6) and constraints (§6.2).
  • Trust Marks (§7): issuing, delegation, validation, and the three Trust Mark Issuer endpoints of §8.4–§8.6. See Trust marks.

Signari can be a Leaf Entity, a Trust Mark Issuer, an Intermediate and a Trust Anchor. A Leaf Entity is a member at the bottom of the tree. An Intermediate vouches for members below it. A Trust Anchor is the authority at the top, which the members trust. Fetch, subordinate listing and resolve are in Speaking for other entities.

Nothing advertises what does not apply. A Leaf Entity's federation_entity metadata contains no federation_fetch_endpoint, which §5.1.1 forbids it. The three trust-mark endpoints are advertised only once this entity has issued a Trust Mark.

Enabling it

To enable federation, name the authority above this entity and the organisation's name:

Shellsignari federation enable \  -authority-hints https://anchor.example \  -organization-name "Example University"

Then restart signari serve. The endpoint is registered at startup, and only when a federation key exists.

-authority-hints names this entity's Immediate Superiors, the authorities directly above it. §3.1.2 makes the claim REQUIRED for any entity with a superior above it, and forbids the empty array. It also forbids the claim entirely for a Trust Anchor with no superiors. So leaving it out makes this entity a Trust Anchor (see below). trust-mark issuers and trust-mark owners set claims only a Trust Anchor publishes.

Three more settings go into the Entity Configuration. Each is kept when its flag is not given, so a re-run to change the name does not wipe them:

Shellsignari federation enable -authority-hints https://anchor.example \  -trust-anchor-hints https://anchor.example,https://edugain.example \  -federation-contacts security@example.edu \  -entity-lifetime 12h
  • -trust-anchor-hints is published as trust_anchor_hints, the Trust Anchors this entity trusts. Each must be an Entity Identifier. Empty clears it, and the claim is then absent, because §3.1.2 forbids the empty array.
  • -federation-contacts goes into the federation_entity metadata as contacts, which may hold names, addresses or phone numbers.
  • -entity-lifetime is how long the Entity Configuration is valid, from 5m to 168h, 24h by default. A federation keeps trusting a configuration until it expires, even after you change it.

federation show prints all three.

The Admin API enables federation and changes these settings the same way, at /admin/instances/{instanceID}/federation, with a deployment-wide token. Its answer says restart_required when it generated the federation key, since the endpoint is registered when serve starts. See the Admin API.

A separate federation key

§3.1.1, of the jwks claim:

These Federation Entity Keys SHOULD NOT be used in other protocols. (Keys to be used in other protocols, such as OpenID Connect, are conveyed in the metadata elements for the protocol's Entity Type Identifiers...)

So Signari does not reuse its OpenID Connect (OIDC) signing key for federation, although that key is already loaded, wrapped and published.

The two keys answer different questions. An application trusts Signari's OIDC key to assert who a person is. A federation trusts its federation key to assert what this entity is and who vouches for it. Rotating one should not rotate the other, and compromising one should not forge the other.

Federation keys are kept in core.signing_keys, with a purpose column, rather than in a table of their own. That table already handles the rotation states, the root-key wrapping and the retirement sweep. A second table would need a second copy of that logic.

Two things follow from that column:

  • LoadSet filters purpose = 'oidc', so a federation key is never published at /oauth2/jwks.
  • The signing_keys_one_active unique index is (instance_id, purpose, algorithm), so an active ES256 federation key and the active ES256 protocol key can both exist.

What the endpoint serves

With federation enabled and serve restarted, /.well-known/openid-federation meets each requirement in this table. The values are for an entity at https://idp.example:

RequirementSpecWhat Signari serves
typ header§3entity-statement+jwt
kid header§3 (MUST)present, and in the published jwks
iss == sub§3.1.1both https://idp.example
iat, exp§3.1.186400s lifetime
jwks§3.1.1the federation key only
authority_hints non-empty§3.1.2["https://anchor.example"]
metadata entity types§5.1federation_entity, openid_provider
Content-Type§15.1application/entity-statement+jwt
Signature§3verifies against the key in its own jwks

The keys stay separate. The OIDC JSON Web Key Set (JWKS) never lists the federation key's key ID, its kid.

Trust Chain validation

oidfed.ValidateChain implements §10.2's nine steps. A chain is an ordered list of Entity Statements, from the subject up to a Trust Anchor. Validating it is what turns "this server published a statement about itself" into "an authority I already trust vouches for this server".

The two signature checks on ES[0]

§10.2 verifies ES[0], the subject's own Entity Configuration, twice. The two checks do different work:

For ES[0] ... verify that its signature validates with a public key in ES[0]["jwks"].

For each j = 0,...,i-1, verify that the signature of ES[j] validates with a public key in ES[j+1]["jwks"].

The first is a self-signature. It proves internal consistency, and proves nothing about trust, because anybody can sign a statement with a key they also published inside it. A validator that does only this check accepts every entity.

The second check establishes trust. ES[1] is the Subordinate Statement issued by the superior about this entity. Its jwks is the key set the superior attests the subordinate has. So checking ES[0]'s signature against ES[1]'s jwks checks whether the key this entity signed with matches the key its superior says it has.

This check refuses a leaf that rotates to a key its intermediate has never seen, and re-signs its own configuration. Its configuration is self-consistent, but nobody vouches for it.

Two things the caller must supply out of band

ValidateChain(chain, trustAnchorID, trustAnchorKeys, now) takes the anchor's identifier and its keys from the caller, never from the chain. §10.2's last two steps are "verify that the issuer matches the Entity Identifier of the Trust Anchor" and "verify that its signature validates with a public key of the Trust Anchor". Reading either from the chain makes the step verify the chain against itself, and then any chain that names its own anchor would validate.

Chain expiry

§10.4: "The expiration time of the whole Trust Chain is the minimum (exp) value within the Trust Chain." Taking the last statement's, or the subject's, would let one long-lived member keep a chain valid after another of its members has expired.

Other chains it refuses

ValidateChain also refuses:

  • a broken link (ES[j].iss != ES[j+1].sub);
  • an expired member;
  • a chain of one;
  • a statement with no kid header. §3 makes it a MUST. Without it a verifier must try every key, so a signature by any key in the set would pass, not only one by the attested key;
  • any symmetric signing algorithm.

Fetching

oidfed.Fetcher retrieves Entity Configurations (§9) and Subordinate Statements (§8.1).

Which addresses it fetches

Signari fetches an entity's configuration, reads authority_hints out of it, and fetches those. So every URL after the first is one the previous document chose. authority_hints is a list of addresses somebody else writes. Following it could be used for server-side request forgery: making Signari call addresses that somebody else chose.

So the fetcher uses safedial, which checks at dial time, not at parse time. A hostname that resolves publicly when validated, and to 169.254.169.254 when connected, is Domain Name System (DNS) rebinding, and checking the URL cannot catch it. By default, a Fetcher{} with no options set refuses loopback, link-local and RFC 1918 addresses.

The option for tests is called AllowLoopbackForTesting. The long name makes it unlikely to be set in a configuration file by mistake. A test asserts the name has not been shortened.

What it refuses beyond addresses

It also refuses these:

RefusalWhy
A configuration whose iss is not the entity we asked aboutotherwise a superior hands back somebody else's configuration and we walk their authority_hints
A configuration where iss != sub§3.1.1: that is not an Entity Configuration
A Subordinate Statement about a different subject than we askedotherwise a chain can be rerouted to an entity nobody asked about
A non-https fetch endpoint or subject identifier§9
A body over 256 KiBbounded before it is read, not after buffering
authority_hints: []§3.1.2 forbids the empty array, and reading it as "no superiors" would accept a document the specification forbids

MaxChainDepth bounds the walk at 10. §6.2.1 lets a Trust Anchor impose a max_path_length on its subtree. This is the local ceiling when no Trust Anchor has set one. Without it, a cycle of entities naming each other as superiors would be walked without end.

ParseStatement does not verify

Parsing and verifying are necessarily separate here. A statement's signing key is only known once the chain is assembled, so the fetcher cannot verify what it retrieves. The name ParseStatement says that it only parses: a statement with a corrupted signature still parses.

Chain building

oidfed.Resolver joins the two halves. It walks up from an entity using authority_hints, fetching each superior's Entity Configuration and its Subordinate Statement about the entity below. Then it hands the assembled chain to ValidateChain.

Why building and validating are separate passes

Verifying each statement as it arrives does not work. §10.2 verifies ES[j] against ES[j+1]'s key set, so no statement can be checked until the one above it has been fetched. A resolver that validates as it goes can only check each statement against its own keys, which is the self-signature check and proves nothing about trust.

So the whole candidate chain is fetched, then validated. The cost is fetching statements that a later failure discards.

What it refuses

The resolver refuses these:

RefusalWhy
No trust anchors configureda chain cannot end at a trusted anchor, which is a misconfiguration
A cycle in the federation graphreported as a cycle, not as exhausting the depth budget, so the error names the cause
More than MaxChainDepth hopsthe ceiling for when no Trust Anchor has imposed a max_path_length (§6.2.1)
A superior publishing no federation_fetch_endpointit cannot be asked about its subordinates, and the error says so rather than surfacing a transport failure

§10.3's rule, "prefer a shorter chain over a longer one", is implemented. Each additional Intermediate is another party who can vouch for something. So the shortest chain is the one with the fewest entities able to change the answer.

When two chains validate

The shorter chain wins, whatever order the anchors are listed in. For example, a leaf names two superiors, reaching anchor A in three statements and anchor B in two. Both anchors are trusted, and both chains validate. Anchor A is listed first in the configuration, and the chain through anchor B is chosen.

Automatic Registration (§12.1)

An application in a federation, which the specification calls a "relying party", can use Signari with no registration step. Its Entity Identifier is its client_id. Everything Signari needs, such as redirect URIs, keys and scopes, comes from metadata resolved through a Trust Chain, not from a registration request.

Whose word to take

No application is admitted until an administrator lists the Trust Anchors to trust. Being in a federation is not enough. With an empty list, Signari fetches nothing for an application it does not know.

These commands add a Trust Anchor whose word Signari takes, list the anchors, and remove one:

Shellsignari federation add-anchor -entity-id https://anchor.example \  -org <org-uuid> -jwks-file anchor-keys.json \  -trust-marks https://marks.example/accredited     # optionalsignari federation anchorssignari federation remove-anchor -entity-id https://anchor.example

The keys are the anchor's Federation Entity Keys, and they come from the administrator, not from the anchor's address. If they were fetched, whoever answered at that address would become the anchor. -org is where the applications it vouches for are registered.

-trust-marks names Trust Mark types an application must also hold. Each must be valid under §7.3: issued to it, by an issuer the anchor allows for that type where it says, and signed by keys established through a chain of its own.

The same list is /admin/instances/{instanceID}/federation/anchors on the Admin API.

Removing an anchor deletes the clients it admitted, with their sessions and tokens. They had no other standing here. One the federation still vouches for, through another listed anchor, is registered again by its next request.

What a first request does

An https client_id nobody has registered, with a signed request at the authorization endpoint or the pushed authorization endpoint, is taken to be a federation application:

  1. The chain is resolved to a listed anchor, with the metadata policy along it applied.
  2. Any Trust Marks the anchor asks for are checked.
  3. The request is verified with the keys the chain published.
  4. It becomes a client: confidential, private_key_jwt, no secret, and required to sign every request. Its consent screen is shown like any other.

Failing any of these leaves it unknown, and nothing is written. §12.1.3 is why that is shown to the person, and not sent to the redirect URI: "it MUST treat the redirection URI as invalid and not perform redirection". One address can make Signari walk 30 chains a minute.

Its requests are held to §12.1.1.1 from then on: aud naming only Signari, exp and jti required, no sub, and each one good once. The registration lasts as long as the chain, and the first request after that resolves it again. If it no longer resolves, the client stops signing people in. Tokens already issued go on working until they end.

A client an administrator made is never touched, whatever a chain says about the same name.

Explicit Registration (§12.2)

An application can also register first. It POSTs its Entity Configuration, addressed to Signari in aud, to /federation/register, as application/entity-statement+jwt. Or it posts a Trust Chain as application/trust-chain+json, of which the first statement is read.

The anchor list governs this as it does the other. With nothing on it, the endpoint answers 404, and neither registration is advertised.

What it sent is what counts, so it can tailor its metadata for Signari. A configuration is only as good as its signature, and anybody can sign one naming an application. So the keys in it have to be the keys its superior attests to.

It keeps its Entity Identifier as its client_id, and gets no secret, as an automatic one does. The answer is a signed application/explicit-registration-response+jwt, whose exp is the registration's and never later than the chain's. Unlike an automatic client, it is not held to signed requests, having proved who it is by registering. To renew, it registers again before exp.

Two things are not here. One is an application proving itself at a push with private_key_jwt alone, with no Request Object, which §12.1.1.2 also allows. The other is the trust_chain header, which is a hint.

Proving control of the keys

A resolved chain establishes who an entity is. It does not establish that the party sending this particular request is that entity. Anybody can read a public Entity Configuration and put its identifier in a client_id.

§12.1 is explicit about the missing half:

Since there is no registration step prior to the Authentication Request, asymmetric cryptography MUST be used to authenticate requests... the OP neither assigns a Client Secret to the RP nor returns it.

Authentication requests MUST demonstrate that the requesting Entity controls the Entity's RP keys... Attempted authentication requests that do not do so MUST be rejected.

So RegisteredClient carries the application's published jwks out, and there is no path that produces a client without them. An application publishing no keys is refused, rather than admitted as a client anybody could impersonate by knowing its public identifier.

Metadata policy

A superior constrains a subordinate's metadata with metadata_policy: which redirect URIs are permitted, which scopes, which algorithms. Each rule in a policy is an "operator", such as subset_of. §6.1.4:

If a policy error or another error is encountered during the metadata policy resolution or its application, the Trust Chain MUST be considered invalid.

Ignoring the policy and using the leaf's own metadata would produce the client the application asked for, rather than the one its federation permits.

All seven standard policy operators of §6.1.3.1 are implemented, along with §6.1.4.1 resolution and §6.1.4.2 application.

What the policy operators do

The names suggest checks, but several of them change the metadata:

Policy operatorActionMerge of two superiors' values
valueAssigns. null removes the parameterMust be equal, else a policy error
addUnion into the parameter; initialises it if absentUnion
defaultSets only when the parameter is absentMust be equal
one_ofChecks membershipIntersection; empty is an error
subset_ofAssigns the intersection: a modifier, not only a checkIntersection; empty is fine
superset_ofChecks containmentUnion
essentialRequires presenceLogical OR

subset_of being a modifier is what lets one policy serve a whole federation. An application asking for more than it may have is trimmed, rather than rejected.

The merge rules apply §6.1.1's Hierarchy principle: intersection where a value is permitted, union where one is demanded, OR for essential. So a subordinate can always narrow what a superior allowed, and never widen it.

Two more rules apply:

  • one_of may not be combined with add, subset_of or superset_of. It constrains a single value, and they operate on arrays. The combination is a policy error, not a no-op.
  • scope is processed as an array (§6.1.3.1.8), and re-joined with spaces. Without this, a subset_of on scope compares the whole string "openid profile email" against individual scope values. It matches none, and narrows every client in the federation to no scopes.

Order of the policy operators

The policy operators run value → add → default → one_of → subset_of → superset_of → essential, which each policy operator's own definition fixes.

Two positions have consequences. superset_of runs after subset_of. So a policy demanding a value its own subset_of has already removed fails, which is the intended outcome for a policy describing a set nothing can satisfy.

And essential runs last, so it judges the parameter as default left it, not as the entity published it. Moving it earlier refuses entities whose omission the policy was about to fix.

Ordering against the superior's own metadata

§3.1.1: "If both metadata and metadata_policy appear in a Subordinate Statement, then the stated metadata MUST be applied before the metadata_policy."

So a superior's assigned values are judged by that same superior's policy. The other order gives the same result whenever the assignment satisfies the policy.

Unknown policy operators

§6.1.3.2 splits these two ways:

  • A policy operator Signari does not understand is ignored. Refusing would make every federation using any extension policy operator unusable, whether or not the constraint was relevant.
  • Unless its name appears in metadata_policy_crit, in which case the chain is invalid. Ignoring it there would admit an entity under a constraint its federation believes is in force.

Signari also refuses:

  • an entity that resolves but publishes no openid_relying_party metadata, since being in the federation is not the same as being an application that signs people in;
  • an application with no redirect_uris, since inventing one builds an open redirector;
  • a client_id that resolves to nothing.

Merge direction

§6.1.4.1 calls the merge direction, most superior first, crucial, and it is implemented that way. But with only the standard policy operators, the resolved policy is the same read from either end. Every standard merge is commutative: union, intersection, equality, OR.

The direction still matters for the additional policy operators §6.1.3.2 permits, whose merges need not be commutative.

Speaking for other entities

An entity with no superior is a Trust Anchor. One with a superior becomes an Intermediate by speaking for somebody. These commands set that up, list the entities it speaks for, and remove one:

Shellsignari federation enable                 # no -authority-hints: a Trust Anchorsignari federation add-subordinate -entity-id https://rp.example \    -jwks-file rp-federation-keys.json \    [-metadata-policy-file policy.json] [-max-path-length 1] [-intermediate]signari federation subordinatessignari federation remove-subordinate -entity-id https://rp.example

You must take the keys from the entity by some way other than its own address. A Subordinate Statement says "these are that entity's keys", so it is only as good as your check of them. Asking the entity at the moment of adding it would vouch for whoever answered, so the keys are a file.

A private key is refused, since the keys are published to everybody who asks. So is a policy no resolver could apply, which would break the chain of everybody below.

Three endpoints serve it. Only a Trust Anchor, or an entity with subordinates, publishes them in its federation_entity metadata, as §5.1.1 requires:

GET /federation/fetch?sub=§8.1: a Subordinate Statement, signed with the Federation Entity Key and made at each request, so that a removal or a change of keys holds from the next one. not_found for an entity it does not speak for, invalid_request for itself. A statement already fetched lasts until it expires, which is the lifetime of this entity's own configuration
GET /federation/list§8.2: who it speaks for. ?intermediate=true filters, and so do ?trust_marked=true and ?trust_mark_type=, from the Trust Marks this entity issued, live ones only: revoked or past their exp they count for nothing. Several filters together keep what all of them keep. entity_type is refused with unsupported_parameter: an administrator gives a subordinate's keys and policy, not its types, so this entity does not know them, and ignoring the filter would return a wrong list that looks filtered
GET /federation/resolve?sub=&trust_anchor=§8.3: the subject's Resolved Metadata and Trust Chain, in a resolve-response+jwt, optionally for entity_type. For chains ending at this entity or at a Trust Anchor an administrator listed with federation add-anchor, verified with the keys it was given with, the first of several trust_anchor values it can stand behind; any other is invalid_trust_anchor, since it could be taken only on the word of whoever answers at that address. The chain ends with the anchor's own configuration, verified with those keys. trust_marks carries the subject's marks that hold under §7.3 against that anchor, as a registering client is held to them, and none that do not; the response lasts no longer than the first of them to expire

Not built: client authentication at these endpoints (§8.8). It is off by default, and a choice each federation makes per endpoint.

Where it stands

The resolution side is complete: publish, fetch, build, validate, register and resolve.

Changed Signari v0.2