gnap
Skill1 starsChanged 31 days agoMITView on GitHub
GNAP (RFC 9635): request, issue and verify access tokens. Covers the Grant Negotiation and Authorization Protocol core: grant requests, the access rights array, interaction start and finish modes with the interaction hash, continuation, token rotation and revocation, key binding with httpsig, mtls, jwsd and jws proofs, and RS-first discovery. Also covers RFC 9767 GNAP resource server connections: the token model, token formats, /.well-known/gnap-as-rs discovery, introspection, resource registration and derived tokens, and how the access array relates to OAuth Rich Authorization Requests (authorization_details, RFC 9396). Use when building a GNAP client, authorization server or resource server, validating key-bound GNAP tokens, writing WWW-Authenticate: GNAP challenges, designing access types, or comparing GNAP with OAuth 2.0.
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 59
Connect the RS to the AS: if they are loosely coupled: discovery, signed introspection, resource registration and derived tokens.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GNAP
The Grant Negotiation and Authorization Protocol (GNAP, RFC 9635) is an IETF protocol in which a client instance negotiates access with an authorization server (AS) through one JSON grant endpoint, with key-bound tokens by default. RFC 9767 defines how resource servers (RS) connect to the AS. With this skill the agent builds or reviews a GNAP client, AS or RS, and designs access rights that also fit OAuth Rich Authorization Requests.
Follow the workflow below step by step. Every rule here comes from a source in Sources, with the section it cites. When a rule and the pinned source disagree, the source wins; when the source has a newer revision than the pin, follow the refresh steps.
Inputs (fill in, or ask before starting)
- Role: client instance, authorization server, resource server, or an RS that derives tokens for another RS.
- Coupling: whether the AS and RS share storage, or the RS uses RFC 9767 discovery, introspection and registration.
- Proofing method:
httpsig,mtls,jwsdorjws. - Revision: the pinned revisions in Sources, unless the user names another.
- Sources: when refreshing this skill or when a rule looks out of date, re-read every URL in Sources first, check the RFC Editor for errata or updating RFCs, and update the pins.
Invariants
- Every client request to the AS is signed with the client instance's key, and every presented key is validated in the request that presents it (RFC 9635 § 2.3, § 7.3).
- Tokens are key-bound unless the
bearerflag is set. A bound token is sent withAuthorization: GNAPand a proof of the bound key (RFC 9635 § 2.1.1, § 7.2). - Bearer GNAP tokens go only in the
Authorizationheader, never in a form body or query (RFC 9635 § 7.2). - The interaction hash is always sent by the AS and always validated by the client (RFC 9635 § 4.2.3).
- Continuation tokens only continue grants. They MUST NOT work at resource servers, and access tokens MUST NOT work for continuation (RFC 9635 § 5).
- Clients wait
waitseconds before continuing, 5 when absent (RFC 9635 § 3.1). - Access types are compared by exact byte match, and the AS keeps them collision-free (RFC 9635 § 8).
- The
accessreturned with a token reflects what the token actually allows (RFC 9635 § 3.2.1). - JWK keys carry
algandkid, andalgis nevernone(RFC 9635 § 7.1). - The RS validates both the token and the key proof on every request, and never reuses a proof result for another message (RFC 9767 § 6.2, § 6.4).
- Introspection reports a token active only when every criterion holds, never for the AS's own continuation or management tokens (RFC 9767 § 3.3, § 2.1.14).
- Clients check that a challenge's
referrerequals the RS URI before using it (RFC 9635 § 9.1).
Workflow
- Fix roles and coupling. Decide who signs what, with which proofing method, and whether the RS validates self-contained tokens or introspects. ✓ Each party has a key and a proofing method, and the RS's validation path is chosen.
- Design the access types. Define each
type, its fields and their cross-product meaning, plus any reference strings. -> references/access-rights.md ✓ Every type is a URI or otherwise collision-free, and the same definition serves RAR if OAuth is also in use. - Build the grant request and key proof on the client.
-> references/grant-flow.md
✓ The request has
client.keywithproof, and thehttpsigsignature covers@method,@target-uriandcontent-digestwithtag="gnap". - Handle interaction with the start and finish modes both sides support, and verify the hash.
-> references/grant-flow.md
✓ A finish redirect with a wrong
hashis rejected before continuation. - Continue and manage the grant: polling with
wait, modification, revocation, and token rotation or revocation throughmanage. -> references/grant-flow.md ✓ Continuation calls carry the continuation token and a fresh proof, and never go faster thanwait. - Validate tokens at the RS and answer with
WWW-Authenticate: GNAPwhen access is missing. -> references/resource-servers.md ✓ A valid token with a missing or wrong proof, a token for another RS, and a continuation token are each refused. - Connect the RS to the AS if they are loosely coupled: discovery, signed introspection, resource registration and derived tokens.
-> references/resource-servers.md
✓ The RS reads
/.well-known/gnap-as-rs, signs introspection with its own key, and derives downstream tokens instead of forwarding the client's token.
Verify before done
- Grant requests, continuation calls and RS calls to the AS are all signed, and the signatures are verified.
- Bound tokens are refused without a valid proof; bearer tokens are accepted only in the
Authorizationheader. - The client computes and checks the interaction hash from both nonces,
interact_refand the grant endpoint. accessobjects all havetype, and type comparison is exact with no normalization.- Introspection requests carry
resource_server, andactive: falseresponses carry no other fields. - Token formats named anywhere come from the GNAP Token Formats registry.
Reference index
references/grant-flow.md: the grant request, client keys and proofing methods, interaction and its hash, the grant response and errors, continuation, token use and management, and discovery.references/access-rights.md: theaccessarray, reference strings, granted versus requested rights, and the comparison with RARauthorization_details.references/resource-servers.md: the RFC 9767 token model with JWT and introspection names, token formats, RS-facing discovery, introspection, resource registration, derived tokens and RS validation.
Related skills
oauthfor OAuth 2.0 and 2.1, including Rich Authorization Requests:npx skills add ScaleDockHQ/scaledock-skills --skill oauthjwtfor JWT-formatted GNAP tokens and the JOSE verification checklist:npx skills add ScaleDockHQ/scaledock-skills --skill jwt
Sources
Status uses the publishing body's own maturity term. Checked is the date the source was last read.
- RFC 9635: Grant Negotiation and Authorization Protocol (GNAP): RFC (Proposed Standard), RFC 9635, checked 2026-10-02.
- RFC 9767: GNAP Resource Server Connections: RFC (Proposed Standard), RFC 9767, checked 2026-10-02.
- RFC 9396: OAuth 2.0 Rich Authorization Requests: RFC (Proposed Standard), RFC 9396, checked 2026-10-02.
In this repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- find-skillsSkill
- a2aSkill
- ag-uiSkill
- ap2Skill
- asyncapiSkill
- authzenSkill
- cedarSkill
- cloudeventsSkill
- eu-ai-actSkill
- fapiSkill
- jwtSkill
- mcp-authorizationSkill
- oauthSkill
- ocsfSkill
- openapi-arazzoSkill
- openapi-overlaySkill
- openapiSkill
- openfeatureSkill
- openid4vcSkill
- openid-connectSkill
- openid-federationSkill
- openidSkill
- opentelemetry-genaiSkill
- owasp-agenticSkill
- problem-detailsSkill
- ratelimit-headersSkill
- scaledock-agent-permissionsSkill
- scaledock-enterprise-identitySkill
- scaledock-http-apiSkill
- scaledock-mcp-serverSkill
- scaledock-repo-standardSkill
- scimSkill
- shared-signalsSkill
- spiffeSkill
- standard-schemaSkill
- typespecSkill
- web-bot-authSkill
- webmcpSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

