Skip to content
Wallet and Entity Collection draft updates
Documentation menu

9.1. Update a subordinate registration

Feature guides / 9. Updates, rollover, and revocation · Example context

Umeå University OP publishes replacement federation keys and Umeå University has verified the change. The operator needs to update the attestation about Umeå University OP without accidentally registering a second identity.

How to use it

updateSubordinate() accepts changes to the existing record. Its identity is immutable. Use metadataPolicy or constraints for federation rules and metadata for values the superior supplies. Publication validation runs before a record can reach the signing path. Updates and rollover.

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

export async function updateUmeaOpKeys(authority: TrustAnchor | Intermediate, verifiedKeys: JWKSet) {
  await authority.updateSubordinate(entityId("https://op.umu.example"), {
    jwks: verifiedKeys,
  }, { eventDescription: "Approved federation key rollover" });
}

What your application owns

Authenticate and authorize the change, coordinate rollover with the subordinate, and retain the expected overlap. Updating local storage cannot erase statements already cached by other participants. If an identifier changes, treat that as a different registration rather than rewriting the old identifier. The example requires subordinate event storage (as configured in the roles guide). Omit annotations if event storage is not enabled. An annotation describes the operator decision; it does not substitute for approval.

Publish a change that consumers can observe

When Umeå rotates federation keys or updates its registered metadata, update the Superior's subordinate record through its lifecycle API. A successful write means the authority's authoritative state changed; it does not mean every consumer has refreshed its cached chain.

Fetch a newly issued Subordinate Statement and confirm the expected change, then validate the affected path. Coordinate key overlap with the subordinate so old and new statements remain usable during propagation. Use event annotations for the operational record where configured, without putting confidential incident details into publicly exposed history.

Next: 9.2. Withdraw a subordinate registration

View source on GitHub