Download jwt-claims-reference.json from aptdot/jwt-claims-reference: direct link, hf CLI and curl.
- Browser
- Download file 25 kB
-
https://huggingface.co/datasets/aptdot/jwt-claims-reference/resolve/main/jwt-claims-reference.json
- Command line
-
hf download hf://datasets/aptdot/jwt-claims-reference/jwt-claims-reference.json
-
curl -L -o jwt-claims-reference.json https://huggingface.co/datasets/aptdot/jwt-claims-reference/resolve/main/jwt-claims-reference.json
25 kB
| { | |
| "$schema": "https://www.aptdot.com/data/v1/jwt-claims-reference.schema.json", | |
| "metadata": { | |
| "name": "JWT Claims Reference & Signed Test Token Fixtures", | |
| "version": "1.0.0", | |
| "date_modified": "2026-10-20", | |
| "license": "CC0-1.0", | |
| "license_url": "https://creativecommons.org/publicdomain/zero/1.0/", | |
| "schema": "https://www.aptdot.com/data/v1/jwt-claims-reference.schema.json", | |
| "source": "https://www.aptdot.com/datasets/jwt-claims-reference/", | |
| "reference_time": "2026-10-20T10:00:00Z", | |
| "reference_time_epoch": 1792490400, | |
| "specifications": { | |
| "jwt": "https://www.rfc-editor.org/rfc/rfc7519", | |
| "jwt_access_token_profile": "https://www.rfc-editor.org/rfc/rfc9068", | |
| "oidc_core": "https://openid.net/specs/openid-connect-core-1_0.html", | |
| "amr_values": "https://www.rfc-editor.org/rfc/rfc8176" | |
| }, | |
| "test_signing_key": { | |
| "kid": "aptdot-test-hs256-01", | |
| "alg": "HS256", | |
| "secret": "aptdot-public-test-key-NEVER-use-in-production-2026", | |
| "warning": "Public test-only key. Every token in this file is signed with it (except the bad-signature and alg-none vectors). Never use it, or tokens signed with it, outside tests." | |
| }, | |
| "related_datasets": [ | |
| "https://www.aptdot.com/datasets/synthetic-rbac-users/" | |
| ], | |
| "persona_note": "sub, email, org_id, workspace_roles and scope match user usr_002 (sarah.lead@example.com) in the Synthetic RBAC dataset.", | |
| "total_registered_claims": 7, | |
| "total_token_fixtures": 8, | |
| "description": "RFC 7519 registered claims with per-profile requirement levels (base JWT, OIDC ID token, RFC 9068 access token), plus signed, ready-to-verify valid tokens and 6 negative test vectors with the exact error each major JWT library raises." | |
| }, | |
| "registered_claims_dictionary": [ | |
| { | |
| "claim": "iss", | |
| "name": "Issuer", | |
| "type": "StringOrURI", | |
| "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.1", | |
| "required_in": { | |
| "rfc7519": "optional", | |
| "oidc_id_token": "required", | |
| "rfc9068_access_token": "required" | |
| }, | |
| "description": "Identifies the principal that issued the JWT, usually the authorization server's HTTPS issuer URL.", | |
| "security_considerations": "Compare with exact string equality against an allow-list of trusted issuers, and select verification keys per issuer, to block tokens from other identity providers." | |
| }, | |
| { | |
| "claim": "sub", | |
| "name": "Subject", | |
| "type": "StringOrURI", | |
| "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.2", | |
| "required_in": { | |
| "rfc7519": "optional", | |
| "oidc_id_token": "required", | |
| "rfc9068_access_token": "required" | |
| }, | |
| "description": "Identifies the principal the JWT is about, such as a user ID or service account ID.", | |
| "security_considerations": "Must be unique within the issuer. Key user records on iss + sub, never on email, because emails can change or be reassigned." | |
| }, | |
| { | |
| "claim": "aud", | |
| "name": "Audience", | |
| "type": "StringOrURI or array of StringOrURI", | |
| "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3", | |
| "required_in": { | |
| "rfc7519": "optional", | |
| "oidc_id_token": "required", | |
| "rfc9068_access_token": "required" | |
| }, | |
| "description": "Identifies the recipients the JWT is intended for: an API identifier for access tokens, the client_id for ID tokens.", | |
| "security_considerations": "A resource server must reject tokens that do not list its own identifier in aud, to prevent token pass-through between APIs." | |
| }, | |
| { | |
| "claim": "exp", | |
| "name": "Expiration Time", | |
| "type": "NumericDate (seconds since Unix epoch)", | |
| "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.4", | |
| "required_in": { | |
| "rfc7519": "optional", | |
| "oidc_id_token": "required", | |
| "rfc9068_access_token": "required" | |
| }, | |
| "description": "The time on or after which the JWT must not be accepted for processing.", | |
| "security_considerations": "Keep access tokens short-lived (commonly 5 to 60 minutes). Allow only a small clock-skew leeway, typically 60 seconds or less." | |
| }, | |
| { | |
| "claim": "nbf", | |
| "name": "Not Before", | |
| "type": "NumericDate (seconds since Unix epoch)", | |
| "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.5", | |
| "required_in": { | |
| "rfc7519": "optional", | |
| "oidc_id_token": "not_defined", | |
| "rfc9068_access_token": "optional" | |
| }, | |
| "description": "The time before which the JWT must not be accepted for processing.", | |
| "security_considerations": "Reject when current_time + leeway < nbf. Useful for scheduled or deferred activation." | |
| }, | |
| { | |
| "claim": "iat", | |
| "name": "Issued At", | |
| "type": "NumericDate (seconds since Unix epoch)", | |
| "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.6", | |
| "required_in": { | |
| "rfc7519": "optional", | |
| "oidc_id_token": "required", | |
| "rfc9068_access_token": "required" | |
| }, | |
| "description": "The time at which the JWT was issued.", | |
| "security_considerations": "Lets a verifier compute token age and reject tokens issued before a password reset or session-revocation event." | |
| }, | |
| { | |
| "claim": "jti", | |
| "name": "JWT ID", | |
| "type": "string (case-sensitive, unique per token)", | |
| "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.7", | |
| "required_in": { | |
| "rfc7519": "optional", | |
| "oidc_id_token": "not_defined", | |
| "rfc9068_access_token": "required" | |
| }, | |
| "description": "A unique identifier for the token.", | |
| "security_considerations": "Enables replay detection and revocation: store seen or revoked jti values until the token's exp passes." | |
| } | |
| ], | |
| "token_fixtures": { | |
| "enterprise_access_token": { | |
| "fixture_id": "tok_access_valid_01", | |
| "description": "RFC 9068 OAuth 2.0 access token for a multi-tenant API: space-delimited scope, client_id, workspace roles and MFA evidence (amr). Valid at reference_time.", | |
| "intended_outcome": "valid", | |
| "expected_error": null, | |
| "verification": { | |
| "algorithms": [ | |
| "HS256" | |
| ], | |
| "issuer": "https://auth.example.com/", | |
| "audience": "https://api.example.com/v1", | |
| "required_claims": [ | |
| "iss", | |
| "sub", | |
| "aud", | |
| "exp", | |
| "iat", | |
| "jti", | |
| "client_id" | |
| ], | |
| "required_typ": "at+jwt" | |
| }, | |
| "header": { | |
| "alg": "HS256", | |
| "typ": "at+jwt", | |
| "kid": "aptdot-test-hs256-01" | |
| }, | |
| "payload": { | |
| "iss": "https://auth.example.com/", | |
| "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", | |
| "aud": "https://api.example.com/v1", | |
| "client_id": "client_web_app_991823", | |
| "iat": 1792490100, | |
| "nbf": 1792490100, | |
| "exp": 1792493700, | |
| "jti": "6f1c2a9e-3b7d-4e0f-9a8c-1d2e3f4a5b60", | |
| "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", | |
| "auth_time": 1792490080, | |
| "amr": [ | |
| "pwd", | |
| "otp", | |
| "mfa" | |
| ], | |
| "org_id": "org_enterprise_01", | |
| "workspace_roles": { | |
| "ws_prod_eu": "workspace_editor", | |
| "ws_staging": "workspace_editor" | |
| } | |
| }, | |
| "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEiLCJjbGllbnRfaWQiOiJjbGllbnRfd2ViX2FwcF85OTE4MjMiLCJpYXQiOjE3OTI0OTAxMDAsIm5iZiI6MTc5MjQ5MDEwMCwiZXhwIjoxNzkyNDkzNzAwLCJqdGkiOiI2ZjFjMmE5ZS0zYjdkLTRlMGYtOWE4Yy0xZDJlM2Y0YTViNjAiLCJzY29wZSI6ImRhdGE6cmVjb3JkczpyZWFkIGRhdGE6cmVjb3Jkczp3cml0ZSBkYXRhOnJlY29yZHM6ZXhwb3J0IHdvcmtzcGFjZTpzZXR0aW5nczpyZWFkIHRlYW06bWVtYmVyczpyZWFkIiwiYXV0aF90aW1lIjoxNzkyNDkwMDgwLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl0sIm9yZ19pZCI6Im9yZ19lbnRlcnByaXNlXzAxIiwid29ya3NwYWNlX3JvbGVzIjp7IndzX3Byb2RfZXUiOiJ3b3Jrc3BhY2VfZWRpdG9yIiwid3Nfc3RhZ2luZyI6IndvcmtzcGFjZV9lZGl0b3IifX0.9vfl5EINUfLQvs3kO3LJv6ByGFOSPIpeWNmoAuXMGuA" | |
| }, | |
| "oidc_id_token": { | |
| "fixture_id": "tok_id_valid_02", | |
| "description": "OpenID Connect ID token for the same user, issued to the web client (aud = client_id), with nonce and auth_time. Valid at reference_time.", | |
| "intended_outcome": "valid", | |
| "expected_error": null, | |
| "verification": { | |
| "algorithms": [ | |
| "HS256" | |
| ], | |
| "issuer": "https://auth.example.com/", | |
| "audience": "client_web_app_991823", | |
| "required_claims": [ | |
| "iss", | |
| "sub", | |
| "aud", | |
| "exp", | |
| "iat" | |
| ] | |
| }, | |
| "header": { | |
| "alg": "HS256", | |
| "typ": "JWT", | |
| "kid": "aptdot-test-hs256-01" | |
| }, | |
| "payload": { | |
| "iss": "https://auth.example.com/", | |
| "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", | |
| "aud": "client_web_app_991823", | |
| "iat": 1792490100, | |
| "exp": 1792493700, | |
| "auth_time": 1792490080, | |
| "nonce": "n-0S6_WzA2Mj", | |
| "email": "sarah.lead@example.com", | |
| "email_verified": true, | |
| "name": "Sarah Lead", | |
| "amr": [ | |
| "pwd", | |
| "otp", | |
| "mfa" | |
| ] | |
| }, | |
| "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiSldUIn0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiY2xpZW50X3dlYl9hcHBfOTkxODIzIiwiaWF0IjoxNzkyNDkwMTAwLCJleHAiOjE3OTI0OTM3MDAsImF1dGhfdGltZSI6MTc5MjQ5MDA4MCwibm9uY2UiOiJuLTBTNl9XekEyTWoiLCJlbWFpbCI6InNhcmFoLmxlYWRAZXhhbXBsZS5jb20iLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwibmFtZSI6IlNhcmFoIExlYWQiLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl19.NS02x3zPhI338zN-m6L-DKP9p3rbZpo3xh767OXaw9I" | |
| }, | |
| "test_vector_expired": { | |
| "fixture_id": "tok_test_expired_03", | |
| "description": "Access token whose exp is 2 hours before reference_time. Must be rejected as expired.", | |
| "intended_outcome": "invalid_expired", | |
| "expected_error": { | |
| "pyjwt": "ExpiredSignatureError", | |
| "jsonwebtoken": "TokenExpiredError", | |
| "jsonwebtoken_message": "jwt expired" | |
| }, | |
| "verification": { | |
| "algorithms": [ | |
| "HS256" | |
| ], | |
| "issuer": "https://auth.example.com/", | |
| "audience": "https://api.example.com/v1", | |
| "required_claims": [ | |
| "iss", | |
| "sub", | |
| "aud", | |
| "exp", | |
| "iat", | |
| "jti", | |
| "client_id" | |
| ], | |
| "required_typ": "at+jwt" | |
| }, | |
| "header": { | |
| "alg": "HS256", | |
| "typ": "at+jwt", | |
| "kid": "aptdot-test-hs256-01" | |
| }, | |
| "payload": { | |
| "iss": "https://auth.example.com/", | |
| "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", | |
| "aud": "https://api.example.com/v1", | |
| "client_id": "client_web_app_991823", | |
| "iat": 1792479600, | |
| "nbf": 1792479600, | |
| "exp": 1792483200, | |
| "jti": "0a7e4c1b-5d2f-4a9e-8b3c-7f6e5d4c3b21", | |
| "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", | |
| "auth_time": 1792479580, | |
| "amr": [ | |
| "pwd", | |
| "otp", | |
| "mfa" | |
| ], | |
| "org_id": "org_enterprise_01", | |
| "workspace_roles": { | |
| "ws_prod_eu": "workspace_editor", | |
| "ws_staging": "workspace_editor" | |
| } | |
| }, | |
| "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEiLCJjbGllbnRfaWQiOiJjbGllbnRfd2ViX2FwcF85OTE4MjMiLCJpYXQiOjE3OTI0Nzk2MDAsIm5iZiI6MTc5MjQ3OTYwMCwiZXhwIjoxNzkyNDgzMjAwLCJqdGkiOiIwYTdlNGMxYi01ZDJmLTRhOWUtOGIzYy03ZjZlNWQ0YzNiMjEiLCJzY29wZSI6ImRhdGE6cmVjb3JkczpyZWFkIGRhdGE6cmVjb3Jkczp3cml0ZSBkYXRhOnJlY29yZHM6ZXhwb3J0IHdvcmtzcGFjZTpzZXR0aW5nczpyZWFkIHRlYW06bWVtYmVyczpyZWFkIiwiYXV0aF90aW1lIjoxNzkyNDc5NTgwLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl0sIm9yZ19pZCI6Im9yZ19lbnRlcnByaXNlXzAxIiwid29ya3NwYWNlX3JvbGVzIjp7IndzX3Byb2RfZXUiOiJ3b3Jrc3BhY2VfZWRpdG9yIiwid3Nfc3RhZ2luZyI6IndvcmtzcGFjZV9lZGl0b3IifX0.4r0RPI39n0glHgJyrbsqqMskGNSQtzX8Y0tJK35w0wA" | |
| }, | |
| "test_vector_nbf_future": { | |
| "fixture_id": "tok_test_premature_04", | |
| "description": "Access token with nbf 2 hours after reference_time (scheduled activation). Must be rejected as not yet valid.", | |
| "intended_outcome": "invalid_premature", | |
| "expected_error": { | |
| "pyjwt": "ImmatureSignatureError", | |
| "jsonwebtoken": "NotBeforeError", | |
| "jsonwebtoken_message": "jwt not active" | |
| }, | |
| "verification": { | |
| "algorithms": [ | |
| "HS256" | |
| ], | |
| "issuer": "https://auth.example.com/", | |
| "audience": "https://api.example.com/v1", | |
| "required_claims": [ | |
| "iss", | |
| "sub", | |
| "aud", | |
| "exp", | |
| "iat", | |
| "jti", | |
| "client_id" | |
| ], | |
| "required_typ": "at+jwt" | |
| }, | |
| "header": { | |
| "alg": "HS256", | |
| "typ": "at+jwt", | |
| "kid": "aptdot-test-hs256-01" | |
| }, | |
| "payload": { | |
| "iss": "https://auth.example.com/", | |
| "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", | |
| "aud": "https://api.example.com/v1", | |
| "client_id": "client_web_app_991823", | |
| "iat": 1792490100, | |
| "nbf": 1792497600, | |
| "exp": 1792501200, | |
| "jti": "1b8f5d2c-6e3a-4b0f-9c4d-8a7f6e5d4c32", | |
| "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", | |
| "auth_time": 1792490080, | |
| "amr": [ | |
| "pwd", | |
| "otp", | |
| "mfa" | |
| ], | |
| "org_id": "org_enterprise_01", | |
| "workspace_roles": { | |
| "ws_prod_eu": "workspace_editor", | |
| "ws_staging": "workspace_editor" | |
| } | |
| }, | |
| "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEiLCJjbGllbnRfaWQiOiJjbGllbnRfd2ViX2FwcF85OTE4MjMiLCJpYXQiOjE3OTI0OTAxMDAsIm5iZiI6MTc5MjQ5NzYwMCwiZXhwIjoxNzkyNTAxMjAwLCJqdGkiOiIxYjhmNWQyYy02ZTNhLTRiMGYtOWM0ZC04YTdmNmU1ZDRjMzIiLCJzY29wZSI6ImRhdGE6cmVjb3JkczpyZWFkIGRhdGE6cmVjb3Jkczp3cml0ZSBkYXRhOnJlY29yZHM6ZXhwb3J0IHdvcmtzcGFjZTpzZXR0aW5nczpyZWFkIHRlYW06bWVtYmVyczpyZWFkIiwiYXV0aF90aW1lIjoxNzkyNDkwMDgwLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl0sIm9yZ19pZCI6Im9yZ19lbnRlcnByaXNlXzAxIiwid29ya3NwYWNlX3JvbGVzIjp7IndzX3Byb2RfZXUiOiJ3b3Jrc3BhY2VfZWRpdG9yIiwid3Nfc3RhZ2luZyI6IndvcmtzcGFjZV9lZGl0b3IifX0.dAddr7k4423BVnUrsTns5aZD3hFVY_tD4C042hAOZ7I" | |
| }, | |
| "test_vector_missing_iss": { | |
| "fixture_id": "tok_test_missing_iss_05", | |
| "description": "Access token with no iss claim. Must be rejected when the verifier requires a trusted issuer.", | |
| "intended_outcome": "invalid_missing_claim", | |
| "expected_error": { | |
| "pyjwt": "MissingRequiredClaimError", | |
| "jsonwebtoken": "JsonWebTokenError", | |
| "jsonwebtoken_message": "jwt issuer invalid. expected: https://auth.example.com/" | |
| }, | |
| "verification": { | |
| "algorithms": [ | |
| "HS256" | |
| ], | |
| "issuer": "https://auth.example.com/", | |
| "audience": "https://api.example.com/v1", | |
| "required_claims": [ | |
| "iss", | |
| "sub", | |
| "aud", | |
| "exp", | |
| "iat", | |
| "jti", | |
| "client_id" | |
| ], | |
| "required_typ": "at+jwt" | |
| }, | |
| "header": { | |
| "alg": "HS256", | |
| "typ": "at+jwt", | |
| "kid": "aptdot-test-hs256-01" | |
| }, | |
| "payload": { | |
| "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", | |
| "aud": "https://api.example.com/v1", | |
| "client_id": "client_web_app_991823", | |
| "iat": 1792490100, | |
| "nbf": 1792490100, | |
| "exp": 1792493700, | |
| "jti": "2c9a6e3d-7f4b-4c1a-8d5e-9b8a7f6e5d43", | |
| "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", | |
| "auth_time": 1792490080, | |
| "amr": [ | |
| "pwd", | |
| "otp", | |
| "mfa" | |
| ], | |
| "org_id": "org_enterprise_01", | |
| "workspace_roles": { | |
| "ws_prod_eu": "workspace_editor", | |
| "ws_staging": "workspace_editor" | |
| } | |
| }, | |
| "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJzdWIiOiI4YjRhNWYzYy05ZDJlLTRiMGEtOGY3Yy02ZDFlM2E4ZjBiMDIiLCJhdWQiOiJodHRwczovL2FwaS5leGFtcGxlLmNvbS92MSIsImNsaWVudF9pZCI6ImNsaWVudF93ZWJfYXBwXzk5MTgyMyIsImlhdCI6MTc5MjQ5MDEwMCwibmJmIjoxNzkyNDkwMTAwLCJleHAiOjE3OTI0OTM3MDAsImp0aSI6IjJjOWE2ZTNkLTdmNGItNGMxYS04ZDVlLTliOGE3ZjZlNWQ0MyIsInNjb3BlIjoiZGF0YTpyZWNvcmRzOnJlYWQgZGF0YTpyZWNvcmRzOndyaXRlIGRhdGE6cmVjb3JkczpleHBvcnQgd29ya3NwYWNlOnNldHRpbmdzOnJlYWQgdGVhbTptZW1iZXJzOnJlYWQiLCJhdXRoX3RpbWUiOjE3OTI0OTAwODAsImFtciI6WyJwd2QiLCJvdHAiLCJtZmEiXSwib3JnX2lkIjoib3JnX2VudGVycHJpc2VfMDEiLCJ3b3Jrc3BhY2Vfcm9sZXMiOnsid3NfcHJvZF9ldSI6IndvcmtzcGFjZV9lZGl0b3IiLCJ3c19zdGFnaW5nIjoid29ya3NwYWNlX2VkaXRvciJ9fQ.K1kI-xc8ihSEkiyTOnsKDkzB7TIi24vv_lCIFuwPUNk" | |
| }, | |
| "test_vector_wrong_audience": { | |
| "fixture_id": "tok_test_wrong_aud_06", | |
| "description": "Access token issued for a different API (billing). A resource server for api.example.com must reject it (token pass-through / confused deputy).", | |
| "intended_outcome": "invalid_audience", | |
| "expected_error": { | |
| "pyjwt": "InvalidAudienceError", | |
| "jsonwebtoken": "JsonWebTokenError", | |
| "jsonwebtoken_message": "jwt audience invalid. expected: https://api.example.com/v1" | |
| }, | |
| "verification": { | |
| "algorithms": [ | |
| "HS256" | |
| ], | |
| "issuer": "https://auth.example.com/", | |
| "audience": "https://api.example.com/v1", | |
| "required_claims": [ | |
| "iss", | |
| "sub", | |
| "aud", | |
| "exp", | |
| "iat", | |
| "jti", | |
| "client_id" | |
| ], | |
| "required_typ": "at+jwt" | |
| }, | |
| "header": { | |
| "alg": "HS256", | |
| "typ": "at+jwt", | |
| "kid": "aptdot-test-hs256-01" | |
| }, | |
| "payload": { | |
| "iss": "https://auth.example.com/", | |
| "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", | |
| "aud": "https://billing.example.com/v1", | |
| "client_id": "client_web_app_991823", | |
| "iat": 1792490100, | |
| "nbf": 1792490100, | |
| "exp": 1792493700, | |
| "jti": "3d0b7f4e-8a5c-4d2b-9e6f-0c9b8a7f6e54", | |
| "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", | |
| "auth_time": 1792490080, | |
| "amr": [ | |
| "pwd", | |
| "otp", | |
| "mfa" | |
| ], | |
| "org_id": "org_enterprise_01", | |
| "workspace_roles": { | |
| "ws_prod_eu": "workspace_editor", | |
| "ws_staging": "workspace_editor" | |
| } | |
| }, | |
| "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9iaWxsaW5nLmV4YW1wbGUuY29tL3YxIiwiY2xpZW50X2lkIjoiY2xpZW50X3dlYl9hcHBfOTkxODIzIiwiaWF0IjoxNzkyNDkwMTAwLCJuYmYiOjE3OTI0OTAxMDAsImV4cCI6MTc5MjQ5MzcwMCwianRpIjoiM2QwYjdmNGUtOGE1Yy00ZDJiLTllNmYtMGM5YjhhN2Y2ZTU0Iiwic2NvcGUiOiJkYXRhOnJlY29yZHM6cmVhZCBkYXRhOnJlY29yZHM6d3JpdGUgZGF0YTpyZWNvcmRzOmV4cG9ydCB3b3Jrc3BhY2U6c2V0dGluZ3M6cmVhZCB0ZWFtOm1lbWJlcnM6cmVhZCIsImF1dGhfdGltZSI6MTc5MjQ5MDA4MCwiYW1yIjpbInB3ZCIsIm90cCIsIm1mYSJdLCJvcmdfaWQiOiJvcmdfZW50ZXJwcmlzZV8wMSIsIndvcmtzcGFjZV9yb2xlcyI6eyJ3c19wcm9kX2V1Ijoid29ya3NwYWNlX2VkaXRvciIsIndzX3N0YWdpbmciOiJ3b3Jrc3BhY2VfZWRpdG9yIn19.SOCFZH04GcAYJhRIGLlagGF7dsm55r6G_6qXBCTmKmA" | |
| }, | |
| "test_vector_bad_signature": { | |
| "fixture_id": "tok_test_bad_signature_07", | |
| "description": "Valid-looking access token signed with a different key. Signature verification must fail.", | |
| "intended_outcome": "invalid_signature", | |
| "expected_error": { | |
| "pyjwt": "InvalidSignatureError", | |
| "jsonwebtoken": "JsonWebTokenError", | |
| "jsonwebtoken_message": "invalid signature" | |
| }, | |
| "verification": { | |
| "algorithms": [ | |
| "HS256" | |
| ], | |
| "issuer": "https://auth.example.com/", | |
| "audience": "https://api.example.com/v1", | |
| "required_claims": [ | |
| "iss", | |
| "sub", | |
| "aud", | |
| "exp", | |
| "iat", | |
| "jti", | |
| "client_id" | |
| ], | |
| "required_typ": "at+jwt" | |
| }, | |
| "header": { | |
| "alg": "HS256", | |
| "typ": "at+jwt", | |
| "kid": "aptdot-test-hs256-01" | |
| }, | |
| "payload": { | |
| "iss": "https://auth.example.com/", | |
| "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", | |
| "aud": "https://api.example.com/v1", | |
| "client_id": "client_web_app_991823", | |
| "iat": 1792490100, | |
| "nbf": 1792490100, | |
| "exp": 1792493700, | |
| "jti": "4e1c8a5f-9b6d-4e3c-8f7a-1d0c9b8a7f65", | |
| "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", | |
| "auth_time": 1792490080, | |
| "amr": [ | |
| "pwd", | |
| "otp", | |
| "mfa" | |
| ], | |
| "org_id": "org_enterprise_01", | |
| "workspace_roles": { | |
| "ws_prod_eu": "workspace_editor", | |
| "ws_staging": "workspace_editor" | |
| } | |
| }, | |
| "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEiLCJjbGllbnRfaWQiOiJjbGllbnRfd2ViX2FwcF85OTE4MjMiLCJpYXQiOjE3OTI0OTAxMDAsIm5iZiI6MTc5MjQ5MDEwMCwiZXhwIjoxNzkyNDkzNzAwLCJqdGkiOiI0ZTFjOGE1Zi05YjZkLTRlM2MtOGY3YS0xZDBjOWI4YTdmNjUiLCJzY29wZSI6ImRhdGE6cmVjb3JkczpyZWFkIGRhdGE6cmVjb3Jkczp3cml0ZSBkYXRhOnJlY29yZHM6ZXhwb3J0IHdvcmtzcGFjZTpzZXR0aW5nczpyZWFkIHRlYW06bWVtYmVyczpyZWFkIiwiYXV0aF90aW1lIjoxNzkyNDkwMDgwLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl0sIm9yZ19pZCI6Im9yZ19lbnRlcnByaXNlXzAxIiwid29ya3NwYWNlX3JvbGVzIjp7IndzX3Byb2RfZXUiOiJ3b3Jrc3BhY2VfZWRpdG9yIiwid3Nfc3RhZ2luZyI6IndvcmtzcGFjZV9lZGl0b3IifX0.bM5CeUDWyYjqR7DdhPHgHT0EBc5cTbEmGyHENSMgucE" | |
| }, | |
| "test_vector_alg_none": { | |
| "fixture_id": "tok_test_alg_none_08", | |
| "description": "Unsigned token with alg none (CVE-2015-9235 class). Verifiers must only accept the algorithms they expect.", | |
| "intended_outcome": "invalid_algorithm", | |
| "expected_error": { | |
| "pyjwt": "InvalidAlgorithmError", | |
| "jsonwebtoken": "JsonWebTokenError", | |
| "jsonwebtoken_message": "jwt signature is required" | |
| }, | |
| "verification": { | |
| "algorithms": [ | |
| "HS256" | |
| ], | |
| "issuer": "https://auth.example.com/", | |
| "audience": "https://api.example.com/v1", | |
| "required_claims": [ | |
| "iss", | |
| "sub", | |
| "aud", | |
| "exp", | |
| "iat", | |
| "jti", | |
| "client_id" | |
| ], | |
| "required_typ": "at+jwt" | |
| }, | |
| "header": { | |
| "alg": "none", | |
| "typ": "at+jwt" | |
| }, | |
| "payload": { | |
| "iss": "https://auth.example.com/", | |
| "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", | |
| "aud": "https://api.example.com/v1", | |
| "client_id": "client_web_app_991823", | |
| "iat": 1792490100, | |
| "nbf": 1792490100, | |
| "exp": 1792493700, | |
| "jti": "5f2d9b6a-0c7e-4f4d-9a8b-2e1d0c9b8a76", | |
| "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", | |
| "auth_time": 1792490080, | |
| "amr": [ | |
| "pwd", | |
| "otp", | |
| "mfa" | |
| ], | |
| "org_id": "org_enterprise_01", | |
| "workspace_roles": { | |
| "ws_prod_eu": "workspace_editor", | |
| "ws_staging": "workspace_editor" | |
| } | |
| }, | |
| "token": "eyJhbGciOiJub25lIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEiLCJjbGllbnRfaWQiOiJjbGllbnRfd2ViX2FwcF85OTE4MjMiLCJpYXQiOjE3OTI0OTAxMDAsIm5iZiI6MTc5MjQ5MDEwMCwiZXhwIjoxNzkyNDkzNzAwLCJqdGkiOiI1ZjJkOWI2YS0wYzdlLTRmNGQtOWE4Yi0yZTFkMGM5YjhhNzYiLCJzY29wZSI6ImRhdGE6cmVjb3JkczpyZWFkIGRhdGE6cmVjb3Jkczp3cml0ZSBkYXRhOnJlY29yZHM6ZXhwb3J0IHdvcmtzcGFjZTpzZXR0aW5nczpyZWFkIHRlYW06bWVtYmVyczpyZWFkIiwiYXV0aF90aW1lIjoxNzkyNDkwMDgwLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl0sIm9yZ19pZCI6Im9yZ19lbnRlcnByaXNlXzAxIiwid29ya3NwYWNlX3JvbGVzIjp7IndzX3Byb2RfZXUiOiJ3b3Jrc3BhY2VfZWRpdG9yIiwid3Nfc3RhZ2luZyI6IndvcmtzcGFjZV9lZGl0b3IifX0." | |
| } | |
| } | |
| } | |