Skip to content

docs(connector): specify the canonicalPermissions signing contract#104

Open
seonghobae wants to merge 2 commits into
mainfrom
docs/canonical-permissions-contract
Open

docs(connector): specify the canonicalPermissions signing contract#104
seonghobae wants to merge 2 commits into
mainfrom
docs/canonical-permissions-contract

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

The buyer playbook + OpenAPI put canonicalPermissions in the HMAC payload but never define it. TenantAccessService.signClaims verifies against TenantContext.canonicalPermissions() — the header split on comma, each entry NUL-stripped + trimmed, empties dropped, de-duplicated preserving first-seen order, re-joined — and sanitizes tenant/subject too. A buyer gateway that signs the raw header value therefore gets 401 whenever its permissions config has whitespace or a duplicate (the demo string happens to be clean, hiding it).

This documents the exact derivation in both the playbook and the Permissions parameter so integrators sign what the verifier re-derives. Doc-only; no code change.

Found while building the pg-erd-cloud buyer connector (which now canonicalizes identically before signing).

🤖 Generated with Claude Code

The buyer playbook and OpenAPI referenced 'canonicalPermissions' in the HMAC payload but never defined it, so integrators that sign the raw X-Clearfolio-Permissions header get 401s whenever the config has whitespace or duplicates. Document the exact derivation TenantAccessService/TenantContext apply (split, sanitize, drop-empty, order-preserving dedup, re-join) and that tenant/subject are sanitized too, so gateways sign what the verifier re-derives. Found while building the pg-erd-cloud buyer connector.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AxU2xaupAjp912oDNFuWyd
@seonghobae seonghobae enabled auto-merge (squash) July 7, 2026 01:27
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RjGVapDZ3k7V7zKYk16P4C
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant