6.3. Delegate Trust Mark issuance
Feature guides / 6. Trust Marks · Example context
The Accreditation Authority owns the type and authorizes the Verifier Auditor to issue it. Delegation transfers permission to issue; ownership remains with the council.
Sign and deliver permission
When the council operates a TrustAnchor or Intermediate whose identity and keys match the declared owner, use issueTrustMarkDelegation(). The host selects its federation signer. Deliver the JWT through the agreed administrative channel, then install it on the auditor. Installing the JWT does not establish owner trust; the auditor also needs independently authenticated owner policy. Delegation; Delegation validation; Required delegation.
import type { TrustAnchor, Intermediate } from "@oidfed/authority";
import type { Leaf } from "@oidfed/leaf";
const type = "https://licence-federation.example/marks/approved-verifier";
export function authorizeAuditor(council: TrustAnchor | Intermediate) {
return council.issueTrustMarkDelegation("https://auditor.example", type, {
ttlSeconds: 86400, ref: "https://accreditation.example/authorizations/42",
});
}
// In the auditor's separate administrative process, after trusted delivery:
export function installPermission(auditor: Leaf | TrustAnchor | Intermediate, delegationJwt: string) {
return auditor.setTrustMarkDelegations({ [type]: delegationJwt });
}
Delivery is outside Federation: a signed file, an operator dashboard, or an agreed service can carry the JWT. Configure independently trusted owner keys through issuer evidence before issuance; never accept owner keys merely because an imported JWT names them. The auditor embeds the delegation in each issued mark. Consumers verify it against the owner's keys declared by their trusted framework.
Delegations accept optional expiry, ref, and extension claims. Their JWT typ is fixed. An anchor's issuer declaration does not replace owner permission, and an owner that issues its own marks still supplies a delegation to itself when owner policy requires one.
Renew the delegation through the same agreed channel and call setTrustMarkDelegations() with the replacement map. Existing mark JWTs retain their embedded delegation. When it expires, those marks cease to qualify even if their own exp is later; issue replacement marks when needed.
Owners without a federation host
Ownership does not require running an Authority. If the council manages its owner signer independently, core's signTrustMarkDelegation() is the appropriate API; it accepts the owner's identity and signer directly. The owner's public keys must still match the authenticated trust_mark_owners declaration. This is a distinct deployment, not an extra signing step after issueTrustMarkDelegation().
import type { KeyringEntry } from "@oidfed/crypto";
import { signTrustMarkDelegation } from "@oidfed/core";
export function authorizeFromOwnerService(ownerSigner: KeyringEntry) {
return signTrustMarkDelegation({
issuer: "https://accreditation.example", subject: "https://auditor.example",
trustMarkType: "https://licence-federation.example/marks/approved-verifier",
signer: ownerSigner, ttlSeconds: 86400,
});
}
Deliver delegation through the agreed channel
The council authenticates the auditor and decides what it may issue before signing the delegation. The delegation identifies the issuer and Trust Mark type; it does not transfer ownership of that type. Provide the JWT to the auditor through your administrative process, such as an authenticated operator dashboard or configuration service.
The auditor stores the original JWT and includes it when issuing the relevant marks. Coordinate renewal before it expires. A mark with a later exp does not extend the authority of an expired delegation. If the council changes its keys or policy, consumers still need the corresponding trusted owner configuration to evaluate the new evidence.