7.1. Serve and retrieve Subordinate Statements
Feature guides / 7. Federation endpoints · Example context
LIGO Wiki follows Umeå University OP's authority hint to Umeå University. It needs the statement Umeå University issued about Umeå University OP, not merely the authority's own EC.
How to use it
Publish federation_fetch_endpoint in the authority metadata and register the subordinate. The authority handler serves the signed statement; getSubordinateStatement() provides the same operation in process. Core's fetchSubordinateStatement() is the client building block. Fetch endpoint.
import { entityId } from "@oidfed/core";
import type { TrustAnchor, Intermediate } from "@oidfed/authority";
export async function umeaOpStatement(authority: TrustAnchor | Intermediate) {
return authority.getSubordinateStatement(entityId("https://op.umu.example"));
}
export function serveAuthority(authority: TrustAnchor | Intermediate) {
return (request: Request) => authority.handleRequest(request);
}
What your application owns
Keep the advertised URL and the mounted route consistent, including any fixed query parameters. Authenticate requests if the federation requires it. The response still needs issuer, subject, time, and signature checks in its chain context. Fetching a JWT and decoding its payload is not chain validation. Only the host's administrative interface should alter enrollment records.
Pass authentication to fetchSubordinateStatement() when Umeå University requires it. The client sends an authenticated form POST and checks the audience against issuer when supplied. Without authentication it uses GET. A fixed selector in the advertised URL cannot be replaced with a conflicting value. The response must use HTTP 200.
Check the authority and subject
Umeå University's Fetch endpoint issues a Subordinate Statement for the requested subordinate. Its response should be evaluated as evidence from that authority about that subject. Successful transport does not make a statement from a different issuer or for a different subject interchangeable.
The public Entity Configuration endpoint remains a separate discovery operation. Configure authentication only for endpoints whose policy calls for it. If Fetch authentication fails, correct the method, client keys, or responder audience; do not retry anonymously when the federation requires authentication.