In an OpenID Connect claim set, what do _claim_names and _claim_sources indicate about where a claim came from?
answer
- some claims are not the provider's
- two members with leading underscores
- names point at sources
- one source ships values, one ships an address
- JWT means aggregated, endpoint means distributed
basics
~20 s_claim_names maps a claim to a key in _claim_sources, which says where it came from: an aggregated claim arrives as a signed JWT inside the response, a distributed claim only as an endpoint to fetch it from.
solid answer
~40 sMost claims are **normal**: the provider asserts them itself, as ordinary members of the claim set. OpenID Connect also defines two OPTIONAL kinds for claims whose authority is somebody else. An **aggregated** claim's values are collected by the provider and passed through as a signed JWT from the original issuer, so they travel with the response. A **distributed** claim is not passed through at all — the provider supplies only a reference, and the client fetches it. Both are wired up the same way: `_claim_names` maps each such claim name to a key, and `_claim_sources` maps that key to the source. An aggregated source carries a `JWT` member; a distributed source carries an `endpoint` and optionally an `access_token` to use against it. A provider advertises which kinds it can produce in `claim_types_supported`.
code
json · 17 lines{
"sub": "24400320",
"name": "Alex Moreau",
"_claim_names": {
"ringing_licence": "src1",
"species_certification": "src2"
},
"_claim_sources": {
"src1": {
"JWT": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjEifQ.eyJyaW5n.OWQzYg"
},
"src2": {
"endpoint": "https://registry.example.org/claims",
"access_token": "ksj3n283dke"
}
}
}go deeper
Know only that a claim set can point at claims held elsewhere, and that two members beginning with an underscore are how it does so.
Explain the mapping from _claim_names to _claim_sources, and distinguish an aggregated source carrying a signed JWT from a distributed source carrying an endpoint.
Argue the trade: aggregated values are self-contained but as stale as their collection, distributed values are current but add a third-party dependency on the request path. Say who verifies what, and with whose key.
Decide whether the estate takes on external claim authorities at all, and how their availability, trust and key rotation are governed before any integration depends on them.
## Not every claim belongs to the provider you are talking to The simple model of OpenID Connect is that a provider knows things about an end user and asserts them. Often that is true. But an identity provider is frequently not the authority for some attribute a client needs — a professional certification, a licence, a membership grade held by an entirely different organisation. Rather than pretend to own those, the specification provides two OPTIONAL shapes for claims that come from elsewhere. ## Three claim types | Type | Where the values are | Who asserted them | |---|---|---| | normal | in the claim set, as ordinary members | the provider itself | | aggregated | in the response, inside a signed JWT | another issuer, passed through | | distributed | not in the response — only a reference | another issuer, fetched by the client | The provider advertises which of these it can produce in the `claim_types_supported` member of its configuration document. ## The two members that wire it up Both non-normal types use the same pair of members in the claim set: - **`_claim_names`** maps each externally sourced **claim name** to a short key. It answers "which claims are not mine, and which source does each belong to?" - **`_claim_sources`** maps each key to the **source description**. It answers "what is that source, and how do I get the value?" The shape of a source entry is what distinguishes the two kinds: - An **aggregated** source carries a `JWT` member holding a signed token from the issuing authority. The values are already in the client's hands; what remains is verifying that token against the issuing authority's key. - A **distributed** source carries an `endpoint`, and optionally an `access_token` to present when calling it. The values are not in the response at all. One consequence follows directly: a claim listed under `_claim_names` is **not** also present as an ordinary member of the claim set. Client code that only reads top-level members will see the attribute as absent, which is the usual first symptom that a deployment is using these at all. ## What each shape costs the client **Aggregated claims** cost verification work. The client is receiving a signed statement from a second issuer, and it has to decide whether it trusts that issuer and check the signature against that issuer's key, not the provider's. The values are frozen at whatever moment the provider collected them; freshness is whatever the JWT itself says. **Distributed claims** cost a network dependency and a failure mode. The client now makes a second call, to a party it may not have a relationship with, at a moment the provider chose for it. That call can be slow, can fail, can require a credential the client mishandles, and turns a self-contained response into a fan-out. In exchange, the values are fetched when needed rather than when the response was assembled, and the provider never holds attributes it has no business holding. ## In the sighting recorder The nature reserve accepts records only from rangers who hold a bird-ringing licence, and the licence is issued by a national ringing registry — not by the reserve's identity provider. Two designs are available. Aggregated: the provider collects a signed statement from the registry and passes it through in the response. The recorder verifies it against the registry's key and can work offline thereafter, at the cost of a licence status that is as old as the collection. Distributed: the provider says only "the licence claim is at the registry, here is where and here is a credential". The recorder fetches it and sees current status, at the cost of being unable to record a sighting when the registry is unreachable. That trade — staleness against availability — is the whole decision, and it is why this is a design question rather than a syntax one. ## What to check before shipping either 1. **Does the provider advertise it?** Both types are OPTIONAL; read `claim_types_supported` rather than assuming. 2. **Whose key verifies an aggregated claim?** The issuing authority's, not the provider you fetched the response from. Verifying against the wrong key is the classic error here. 3. **What happens when a distributed source is down?** Decide before it happens, and do not let a third party's outage silently degrade into "the user has no licence". 4. **Is the claim name deployment-specific?** These mechanisms are usually carrying attributes outside the four standard claim sets, so the names are local to the deployment and must be agreed in writing.
- Whose key verifies an aggregated claim's JWT?The issuing authority's — the party that asserted the claim — not the provider that passed it through. The provider is a courier here; it does not vouch for the contents. A client that verifies against the provider's key has verified nothing about the claim it actually cares about.
- A client reads the claim set and cannot find an attribute it expected. What should it check?Whether the name appears under `_claim_names`. A claim delivered as aggregated or distributed is not present as an ordinary top-level member, so code that only reads top-level members reports it as missing. This is the usual first symptom of a deployment using these types.
- What breaks when a distributed claim's source is unreachable?The client has a reference and no value, and must decide what that means. The dangerous default is treating an unreachable source as an absent attribute, which silently converts a third party's outage into a negative authorisation decision. Distinguish "not held" from "could not be retrieved".
A distributed claim is a note in a personnel file saying the ringing licence is held by the national registry, with the registry's address on it. The folder carries the address, not the certificate.
saying these in an interview costs you the question
- Thinks a distributed claim's values are in the response
- Verifies an aggregated claim against the provider's key
- Expects the claim as an ordinary top-level member
- Treats an unreachable source as an absent attribute
- Assumes every provider can produce these claim types