Role and Claim Catalog
Catalog the roles and claims your test identities actually carry, so privilege tests target real system state rather than documentation
Use when: roles, scopes or tenant claims drive access decisions and you need ground truth for each test identity
Avoid when: authorization is checked against a single fixed role with no variation between accounts
Procedure
- Capture the token or session for each of your test identities and decode it locally without verifying signatures you do not need to check.
- Record every claim the system actually issues: subject, roles, scopes, tenant, elevation flags and expiry.
- Compare issued claims against the product's documented role model and note every divergence.
- Identify which claims the server appears to trust for authorization decisions, by varying them only within your own test accounts.
- Document how a role or scope changes: self-service, administrative grant or time-limited elevation.
- Keep the catalog current, since claim shapes change with releases and silently invalidate older tests.
Signals
- The token carries a privilege claim that no documented role corresponds to.
- A scope string is accepted by endpoints that never check it, which is a finding waiting to be confirmed.
- Tenant membership is expressed as a mutable claim rather than a server-side lookup.
- Expiry differs between the access token and the server-side session, creating a mismatched window.
Patterns
1. Claim record
identity=alice-test claims={sub, role:member, tenant:acme, elev:false} exp=3600s
captured=2026-10-27 source=session-cookie
2. Divergence list
documented roles: member, admin
issued roles: member, admin, billing-viewer, legacy-elevated
-> billing-viewer undocumented, legacy-elevated unused by docs
3. Change path
role change route: admin grant only, expires=none, revocation=session-restart
Pitfalls
- Decoding a token and assuming the server reads the same claims; only observed behaviour proves trust.
- Testing with your own elevated account without a peer account, so you can never show what a lower role sees.
- Letting the catalog go stale after a release that reshapes claims, which invalidates conclusions drawn earlier.
Done when
- Every test identity has a decoded claim set captured with a date, and divergences from documentation are listed.
- Claim-based trust is stated per claim with the observation that supports it.
References
1---2name: role-and-claim-catalog3description: "Catalog the roles and claims your test identities actually carry, so privilege tests target real system state rather than documentation. Use when roles, scopes or tenant claims drive access decisions and you need ground truth for each test identity"4pack: authzmap5version: 1.0.06category: api-security7tags: [roles, claims, tokens]8metadata:9 source: https://skillmd.com/skills/wsh7ash/role-and-claim-catalog10---1112# Role and Claim Catalog1314> Catalog the roles and claims your test identities actually carry, so privilege tests target real system state rather than documentation1516**Use when:** roles, scopes or tenant claims drive access decisions and you need ground truth for each test identity1718**Avoid when:** authorization is checked against a single fixed role with no variation between accounts1920## Procedure21221. Capture the token or session for each of your test identities and decode it locally without verifying signatures you do not need to check.232. Record every claim the system actually issues: subject, roles, scopes, tenant, elevation flags and expiry.243. Compare issued claims against the product's documented role model and note every divergence.254. Identify which claims the server appears to trust for authorization decisions, by varying them only within your own test accounts.265. Document how a role or scope changes: self-service, administrative grant or time-limited elevation.276. Keep the catalog current, since claim shapes change with releases and silently invalidate older tests.2829## Signals3031- The token carries a privilege claim that no documented role corresponds to.32- A scope string is accepted by endpoints that never check it, which is a finding waiting to be confirmed.33- Tenant membership is expressed as a mutable claim rather than a server-side lookup.34- Expiry differs between the access token and the server-side session, creating a mismatched window.3536## Patterns3738**1. Claim record**3940```text41identity=alice-test claims={sub, role:member, tenant:acme, elev:false} exp=3600s42captured=2026-10-27 source=session-cookie43```4445**2. Divergence list**4647```text48documented roles: member, admin49issued roles: member, admin, billing-viewer, legacy-elevated50-> billing-viewer undocumented, legacy-elevated unused by docs51```5253**3. Change path**5455```text56role change route: admin grant only, expires=none, revocation=session-restart57```5859## Pitfalls6061- Decoding a token and assuming the server reads the same claims; only observed behaviour proves trust.62- Testing with your own elevated account without a peer account, so you can never show what a lower role sees.63- Letting the catalog go stale after a release that reshapes claims, which invalidates conclusions drawn earlier.6465## Done when6667- Every test identity has a decoded claim set captured with a date, and divergences from documentation are listed.68- Claim-based trust is stated per claim with the observation that supports it.6970## References7172- [RFC 7519 - JSON web token](https://www.rfc-editor.org/rfc/rfc7519)73- [OWASP API Security Top 10](https://owasp.org/www-project-api-security/)