@oidfed/authority
v0.1.0
Published
Trust Anchor and Intermediate Authority operations — subordinate management, statement issuance, federation endpoint serving, and policy enforcement for the complete OpenID Federation 1.0 implementation.
Maintainers
Readme
@oidfed/authority
Trust Anchor and Intermediate Authority operations — subordinate management, statement issuance, federation endpoint serving, and policy enforcement for the complete OpenID Federation 1.0 implementation.
Status:
v0.1.0pre-release — API may change before the first stable1.0release.
Install
npm install @oidfed/core @oidfed/authorityQuick Start
import {
createAuthorityServer,
MemoryKeyStore,
MemorySubordinateStore,
} from "@oidfed/authority";
import { entityId, generateSigningKey } from "@oidfed/core";
const signingKey = await generateSigningKey("ES256");
const server = createAuthorityServer({
entityId: entityId("https://ta.example.org"),
signingKeys: [signingKey],
metadata: {
federation_entity: {
federation_fetch_endpoint: "https://ta.example.org/federation_fetch",
federation_list_endpoint: "https://ta.example.org/federation_list",
},
},
subordinateStore: new MemorySubordinateStore(),
keyStore: new MemoryKeyStore(signingKey),
});
const handler = server.handler(); // fetch-compatible (Request → Response)What's Included
- All spec-defined federation endpoints as a single fetch-compatible handler
- Subordinate management — add, update, remove, list
- Key lifecycle — pending → active → retiring → revoked
- Trust mark issuance, delegation, and status checking
- Middleware composition for logging, rate limiting, auth
- Pluggable storage interfaces (memory implementations included)
Documentation
Full API reference: docs/packages/authority.md
Part of @oidfed
| Package | Role | |---------|------| | @oidfed/core | Federation primitives | | @oidfed/authority | Trust Anchor & Intermediate operations (this package) | | @oidfed/leaf | Leaf Entity toolkit | | @oidfed/oidc | OIDC/OAuth 2.0 federation flows | | @oidfed/cli | CLI for federation debugging |
