Standards
Why PermDock is standards-first and which specification each part of the library implements or targets.
Status: planned Phase: 1
PermDock is an in-process library, not a hosted policy service. It still has to talk to the rest of an authorization stack: identity providers that issue tokens, policy decision points that already exist in an organisation, API gateways that read OpenAPI documents, database engines that enforce row-level security, and agent runtimes (MCP servers, the AI SDK, the Claude Agent SDK, A2A agents, browsers running WebMCP) that need a yes/no/ask answer for every tool call. Every one of those seams already has a specification. PermDock adopts the specification instead of inventing a wire format, a policy language or a token shape of its own.
Why standards-first
- Interop with PDPs and PEPs. The decision endpoint speaks OpenID AuthZEN 1.0, so a Cerbos, Topaz or Keycloak deployment can call PermDock, and the
pdpprovider can call any certified PDP. See AuthZEN and ADR 0011. - Interop with identity providers. Subjects carry OAuth scopes and RFC 9396
authorization_details; revocation arrives as CAEP events; MCP Enterprise-Managed Authorization tokens are consumed as-is. See OAuth for agents and Shared Signals and CAEP. - Interop with agent runtimes. Each runtime already has a permission hook (
scopeChallenge,toolApproval,canUseTool, Agent CardsecurityRequirements,document.modelContext.registerTool). PermDock translates oneDecisioninto each vocabulary rather than asking runtimes to learn a new one. - Agents can wire PermDock without bespoke formats. A coding agent that knows Standard Schema, OpenAPI, Problem Details and MCP authorization already knows most of PermDock's surface. Skills,
AGENTS.mdandllms.txtfollow the same rule: use the format agents already read. See Agent docs standards. - Fewer things to get wrong. Fail-closed defaults,
denyoverridingallow, prototype-safe paths and boundary validation are easier to audit when the inputs are well-specified formats rather than free-form objects. See the threat model.
The trade-off is that PermDock inherits the pace and gaps of each specification. Every unfinished text PermDock follows carries one of three postures (ADR 0025): build against a pinned revision when the capability is needed now and a stable twin can carry the same information (OpenAPI 3.3 Security Profiles, Overlay 1.2, WebMCP, RAR remediation, the OpenTelemetry GenAI conventions, Web Bot Auth), name when only a public identifier must be reserved (GNAP as an OpenAPI scheme, the permdock/jwt checklist drafts), or track. The watch list shows the posture per row.
Standards PermDock implements or targets
The Phase column is the first phase in which PermDock uses the standard; adapters that build on it later are listed on each page under "Adapter phases".
| Standard | Version / date | Maturity | Where PermDock uses it | Phase |
|---|---|---|---|---|
| Standard Schema | v1 (@standard-schema/spec), Standard JSON Schema | v1 | resource() definitions, boundary validation, catalog and OpenAPI schemas | 1 |
| RFC 9457 Problem Details | RFC 9457 | RFC | 403 bodies in HTTP adapters, errors | 1 |
| OpenID AuthZEN Authorization API | 1.0, final Jan 2026 | final | Decision endpoint (1), authzen adapter (2), pdp provider (4) | 2 |
| OAuth for agents | RFC 9396, RFC 8693, RFC 9449, IETF drafts | RFCs plus IETF drafts | Subject actor and delegation (1), authorizationDetails per permission (1), chain verification (4) | 1 |
| JWT authorization claims | RFC 9068 section 2.2.3.1, RFC 7643 (SCIM) encoding; AuthZEN claims draft | RFCs plus an individual draft | Default roles, groups, entitlements mapping in permdock/jwt and provider mappers (1); /search/resource as a claim source (2) | 1 |
| FAPI 2.0 Security Profile | FAPI 2.0 | final | permdock/jwt profile: 'fapi2' (1), x-permdock-securityProfile in CLI openapi (2) | 1 |
| GNAP | RFC 9635 | RFC (no mainstream AS support) | delegation.access next to authorizationDetails; no GNAP client | 4 |
| Agent docs standards | AGENTS.md, Agent Skills, llms.txt (AAIF, Dec 2025) | community conventions | Shipped skills, AGENTS.md, llms.txt, for AI agents | 1 |
| MCP authorization | Spec 2026-07-28, TS SDK v2 | released | mcp adapter: scopeChallenge, elicitation, EMA | 2 |
| OpenAPI 3.2 | 3.2, Sept 2025 (3.1 via registered x-oai-* and x-permdock-oauth2MetadataUrl) | released | openapi adapter, CLI openapi | 2 |
| OpenAPI 3.3 | 3.3, v3.3-dev; Security Profiles per Discussion #5304 | in development, built from a pinned draft | --target 3.3 emits the pinned Security Profile draft (type: profile, securityProfileRequirements) next to x-permdock-securityProfile; switches to the released construct at 3.3.0 | 2 |
| OpenAPI Overlay | 1.1.0, Jan 2026; 1.2 in development | released; 1.2 draft, built behind --overlay 1.2 | permdock openapi applies its security additions as an Overlay; --overlay 1.2 emits the pinned reusable-actions draft | 2 |
| Arazzo | 1.1.0, May 2026 | released | Permissions a multi-step workflow needs, step by step | 2 |
| OpenAPI registries | Extension and Namespace registries | living registries | Registering the x-permdock- namespace and the extensions PermDock emits | 2 |
| WebMCP | W3C WebML CG, Chrome docs | incubation | webmcp adapter | 2 |
| A2A | 1.0, Linux Foundation | 1.0 | a2a adapter | 2 |
| Postgres RLS | PostgreSQL CREATE POLICY, Supabase, Drizzle pgPolicy, Prisma 8 | shipped in PostgreSQL | rls adapter, CLI rls | 3 |
| Shared Signals and CAEP | SSF 1.0, CAEP 1.0, RISC 1.0; CAEP Interoperability Profile | final; interoperability profile is an implementer's draft | ssf adapter invalidating snapshots | 3 |
| Web Bot Auth | IETF drafts, RFC 9421 | IETF drafts | actor in HTTP adapters | 4 |
| Standards watch list | Everything above plus the specifications PermDock only follows | mixed | Reviewed each release; rows graduate to their own page | 1 |
Related security frameworks that are not wire standards but shape the design: the OWASP Top 10 for Agentic Applications and the threat model.
Status: tracking
Standards pages carry one of four Status values. planned, in progress and shipped describe the code that implements the standard. tracking is for a specification PermDock follows and has designed against but has no adapter or feature for yet: GNAP and the watch list carry it today. A tracking page still has a Phase line, naming the phase in which PermDock would first act on the specification if the trigger stated on the page occurs, and it is reviewed each release like every watch-list row. When code is scheduled the status moves to planned.
A page for an unfinished text adds a third line, Draft posture: build | name | track; a build posture names the pinned revision in the same line, as OpenAPI 3.3 does.
By phase
- Phase 1 (core + agents). Standard Schema for definitions and boundary validation; Problem Details for HTTP denials; the AuthZEN-shaped decision endpoint and batched client; the two-principal subject with
scopeandauthorizationDetailson every permission;permdock/jwtwith the FAPI 2.0 profile and the RFC 9068roles/groups/entitlementsmapping into roles and memberships; skills,AGENTS.mdandllms.txt; the watch list. - Phase 2 (surfaces).
permdock/mcpwithscopeChallenge, elicitation and EMA awareness; the fullpermdock/authzenendpoint set and a certification run; OpenAPI 3.2 emission and import, Overlay output (1.1.0, and the pinned 1.2 draft behind--overlay 1.2), the pinned OpenAPI 3.3 Security Profile draft behind--target 3.3, Arazzo input and thex-permdock-namespace registration; WebMCP and A2A adapters. - Phase 3 (data). Postgres RLS generate, import and verify; the SSF/CAEP receiver against the CAEP Interoperability Profile.
- Phase 4 (ecosystem). The
pdpAuthZEN client provider; Web Bot Auth verification in HTTP adapters; delegation-chain verification and GNAPaccessevaluation; the docs MCP server.
One decision, many vocabularies
The standards above meet in one place: a Decision from decide. Each adapter translates the same three outcomes into the vocabulary its runtime already has.
| Outcome | HTTP (RFC 9457) | MCP | AI SDK 7 | AuthZEN |
|---|---|---|---|---|
granted | Handler runs | Handler runs | 'approved' | decision: true |
denied | 403 .../denied with denials, alternatives | isError: true with reasons and alternatives | 'denied' | decision: false, context.outcome: 'denied' |
approval-required | 403 .../approval-required with token | Elicitation carrying token | 'user-approval' | decision: false, context.outcome: 'approval-required' |
No adapter ever emits an outcome outside these three; in particular the AI SDK adapter never returns 'not-applicable', the value that lets @ai-sdk/policy-opa fail open.
How to read a standards page
Every page in this section follows the same layout so an agent can scan it:
- What it is: the specification, its status and the parts PermDock cares about.
- Why it matters for PermDock: the problem it solves for a permissions library.
- How PermDock uses it: the adapter, API or CLI command that implements it, in the exact shapes from the API design.
- Mapping table: specification concept on the left, PermDock concept on the right.
- Sources: the URLs the page was written from. Nothing on a standards page is asserted without one.
- Open questions: what the plan leaves undecided.
The Status and Phase lines under each page's frontmatter follow the roadmap. Everything with code behind it is planned until Phase 1 ships; pages for specifications PermDock only follows are tracking (see above). Phase is the first phase in which PermDock uses the standard, and pages whose standard is used by several adapters add an "Adapter phases" sentence directly after it.
What PermDock deliberately does not standardise
- Policy language. Roles are TypeScript data (
role,allow,deny) and conditions are a small portable JSON AST, see conditions. PermDock does not export Cedar or Rego and does not import them. - Token issuance. PermDock consumes scopes,
authorization_details, ID-JAG-derived tokens and delegation chains; it never mints them. - Authentication. Providers (Supabase, Better Auth, Clerk, Convex) map an authenticated session to a subject. PermDock starts where authentication ends.
Sources
- Product plan, "Standards and agent runtimes (Sept 2026)" section, and the research survey.
- Each individual standards page lists its own primary sources.
Open questions
- Which standards deserve a certification or conformance run beyond AuthZEN (see AuthZEN); OpenAPI 3.2 output could be validated against the official schema in CI.
- Whether to publish PermDock's own extension vocabularies (
x-permdock-permissions, the Problem DetailstypeURIs, theauthorizationDetailstype) as a small registry page so other tools can reference them.
Next.js plugin
createPermDockPlugin runs permdock collect during next dev and next build; it is a build hook only and never wires the PermDock API.
Standard Schema
How PermDock consumes Standard Schema v1 and Standard JSON Schema so resources can be defined with Zod, Valibot, ArkType or Effect Schema without adapters.