Skip to content
Wallet and Entity Collection draft updates
Documentation menu

1.3. Enroll a subordinate

Feature guides / 1. Federation participants · Example context

At Umeå University, the operator approves its OP's registration and records the service's exact Entity Identifier and public federation keys. The university Intermediate can then issue a Subordinate Statement about that OP.

How to use it

Use registerSubordinate(), above the storage adapter, so publication checks and configured event recording run together. The key set below must have been authenticated through the operator's enrollment process. Subordinate Statements; Statement relationships.

import { entityId, type JWKSet } from "@oidfed/core";
import type { TrustAnchor, Intermediate } from "@oidfed/authority";

export async function enrollUmeaOp(authority: TrustAnchor | Intermediate, verifiedKeys: JWKSet) {
  await authority.registerSubordinate({
    entityId: entityId("https://op.umu.example"),
    jwks: verifiedKeys,
    entityTypes: ["openid_provider"],
    isIntermediate: false,
  });
}

What your application owns

Registration is an administrative action: authenticate the operator, establish eligibility, and verify the keys before calling it. The library does not turn a submitted EC into an approved enrollment. Umeå University OP must publish the authority in its authority_hints. Supply durable transactional storage; in-memory enrollment disappears when the process ends.

Complete the enrollment outside the request path

The Umeå University operator verifies Umeå's membership and obtains its Federation Entity Keys through the agreed onboarding process. registerSubordinate() records that decision. It does not prove that whoever called an administrative dashboard owns the supplied identifier, so protect that dashboard and its approval workflow.

After enrollment, retrieve the Subordinate Statement and check its iss, sub, keys, and intended metadata policy. Then discover the OP from a consumer configured with the eduGAIN anchor. If no chain appears, compare the published authority_hints with the enrolled subject and confirm both entities' public endpoints are reachable. Changing a record only affects newly issued evidence; older signed statements retain their own lifetimes.

Next: 2. Entity Statements

View source on GitHub