Class ExchangePrincipalClaimsSource
Default : the claims of the caller an exchange came from.
The principal is read from , i.e. a property of the exchange
that only in-process code can write — a caller cannot send it as a header, and it does not travel
to a broker. That makes it the only identity a tool requirement may be checked against: a header
naming a user (such as llm.user.id) is audit information, not proof.
Values are collected from the scope claim types issuers actually use — scope (OAuth 2.0 /
OIDC), scp and http://schemas.microsoft.com/identity/claims/scope (Microsoft Entra
ID) — split on whitespace only and de-duplicated with ordinal comparison, because one logical
set can arrive as several claims with padded values. The delimiter is space by specification
(RFC 6749 §3.3) and a comma is a legal character inside a scope token: splitting on it would
turn one granted scope into two and widen the caller's rights, which is the one direction a security
check must never fail in. A deployment whose issuer really emits comma-separated lists registers its
own . Claim values are compared as-is; scope names are case-sensitive.
A principal whose identity is not authenticated counts as no principal (null), not as
an empty set: an anonymous caller cannot satisfy a requirement. This puts a requirement on hosts: a
resolver must return an identity carrying an authentication type — new ClaimsIdentity(claims)
without one reports IsAuthenticated == false and would leave claim-required tools denied
(fail closed, but for a reason the log must make visible). A run that has no inbound request — a
scheduler-fired one, or one born after a broker hop, where properties do not survive — likewise has
no principal. A consumer that establishes identity by itself (an AS2 signature check, a bearer token
validated in a processor) must store the outcome the same way, with
— a property, never a report header the caller could have written.
Deployments with a different vocabulary register their own ; it
replaces this one.
public sealed class ExchangePrincipalClaimsSource : IToolClaimsSource
Inheritance
Implements
Methods
GetClaims(IExchange)
Returns the claims held by the principal owning exchange, or null
public IReadOnlyCollection<string>? GetClaims(IExchange exchange)