team-cert-verification

Solid

Use when implementing or reviewing AWID team-certificate authentication — verifying the request-bound v2 team-auth envelope, porting folio auth.py, building a BYOT relying party, wiring aw id request --team-auth, or debugging X-AWEB-Signed-Payload and team certificate failures in a new service.

AI & Automation 80 stars 9 forks Updated 5 days ago MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
64
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Team certificate verification Use this when your service is a BYOT relying party: agents present a DIDKey signature plus an AWID team certificate on every team-scoped request. The code ground truth is `src/folio/auth.py`; the test ground truth is `tests/test_auth_v2_envelope.py`. Port both and keep the tests green. ## Envelope contract Every team-scoped request carries four headers: ```http Authorization: DIDKey <did:key:z6Mk...> <base64url-no-padding-ed25519-signature> X-AWEB-Timestamp: <RFC3339 UTC timestamp> X-AWID-Team-Certificate: <base64-standard-json-team-certificate> X-AWEB-Signed-Payload: <base64url-no-padding canonical-JSON of the signed payload> ``` `X-AWEB-Signed-Payload` decodes to canonical JSON with these fields: ```json {"aud":"https://<service-origin>","body_sha256":"<sha256 hex of request body>","method":"<UPPER>","path":"<raw path?query>","team_id":"<team>:<namespace>","timestamp":"<RFC3339 UTC timestamp>","v":2} ``` Rules: - The signed-payload header is base64url with no padding (`=` is rejected in folio; see `src/folio/auth.py:137-146`). - Parsed JSON must round-trip to the same canonical bytes: `canonical_json(parsed) == decoded bytes` (`src/folio/auth.py:188-193`). - The Ed25519 signature verifies over those decoded presented bytes, not over a payload the server reconstructs (`src/folio/auth.py:217-220`). ## Ten verification steps Follow this implementation order when porting `src/folio/auth.py`. The cert is parsed early to obtain `tea...

Details

Author
awebai
Repository
awebai/aweb
Created
7 months ago
Last Updated
5 days ago
Language
Go
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Testing & QA Solid

byot-e2e-validation

Use when writing e2e tests for BYOT/AWID team-certificate auth, testing aw id request --team-auth, building a docker awid-service harness, or validating replay, revocation, fail-closed, and team-scoping behavior.

80 Updated 5 days ago
awebai
AI & Automation Featured

aweb-team-membership

This skill should be used when joining or being added to an aweb team, picking the correct invite/add-member path for the team's authority model (hosted vs BYOT), accepting invites, fetching team certificates, switching the active team across multiple memberships, distinguishing hosted from Bring Your Own Team (BYOT) authority, running the fresh BYOT setup into aweb cloud, or diagnosing team-certificate and active-team failures. Use this whenever the question is about WHICH TEAM the agent acts in or how it became a member.

80 Updated 5 days ago
awebai
AI & Automation Listed

auditing-jwt-verification-trust

Audit code that verifies a JSON Web Token for a signature or claims check that trusts token-supplied parameters, so an attacker can forge a token the server accepts, after the algorithm pinning and the key source are resolved. Covers an algorithm taken from the token header rather than pinned server-side, an RS256-to-HS256 key confusion where a public key is used as an HMAC secret, an accepted none algorithm or a verification call with signature checking off, a kid, jku, or x5u parameter sourcing a key from an untrusted location, audience, issuer, and expiry claims left unchecked, and an HMAC secret that is weak, guessable, or committed. Use when reviewing the verification call and its options in source, not the token-generation entropy the randomness skill owns or the OAuth flow the OIDC skill owns. A token with an attacker-chosen header or bytes is the source, a verification call that gates identity is the sink, and an unpinned algorithm or a token-sourced key is the bug.

5 Updated 2 days ago
UnboundCompute