SECURITY · ACCESS INSPECTION DESK

Bearer access: audience, expiry and scope

Inspect credential claims, policy gates and the resource decision. Change a condition and follow the exact denial reason.

One request · 32-second policy inspection at 1×

Your experiment

Change the token audience and expiry independently. Restore authentication, then remove the required scope. Observe the shift from invalid identity to insufficient permission.

Prediction is computed immediately; Play reveals each gate in order. A denial prevents every later gate from running. Capture a baseline before changing one field.

Illustrative claims

Decision trace

Offline policy exercise—not a JWT validator, OAuth server or production security boundary. Verification is an injected test result; no cryptography, real tokens, keys or records are used. Never rely on browser controls to enforce real authorization. Roles, gate order and strict same-tenant rules are application-specific assumptions, not universal OAuth requirements. Expiry is evaluated at a fixed instant; animation does not age the token. No revocation, clock skew or delegation is modeled. Bearer token reference · JWT claims reference.

Constrain a bearer credential to this endpoint

This page explores the resource-server side of a bearer-token policy. The API must distinguish its own audience from another service and require the action-specific scope, in addition to its local role policy. The claims shown here are synthetic inputs after authentication, not a complete OAuth exchange. A token with one useful scope is not automatically a credential for every API or every operation.

Supply the credential and resource facts

Bearer credential present and Trusted verification result control the first two authentication gates. The latter is an injected authenticator result, not an actual signature computation. Issuer selects a trusted or unknown issuer; Audience chooses this agent API or another API. Seconds until expiry is evaluated at a fixed instant, with zero already expired. Principal tenant and Resource tenant define the boundary. Role selects viewer, operator or admin; Requested action chooses read, write or delete. The read, write and delete scope checkboxes represent independently granted token scopes. Changing a fact resets inspection of the same ordered policy.

Keep audience, scope and role independent

Choose operator role, request write and enable write scope. With trusted verification, an unexpired credential and matching tenants, this API allows the write. Change Audience to other-api: the result is 401 despite the write scope and operator role. Restore agent-api and remove write scope: the result is 403. Restore the scope but choose viewer role: the request remains forbidden, now because viewer lacks the action permission. Finally choose admin and delete without delete scope. The role does not manufacture the missing grant; adding delete scope is a separate required change.

Inspect first denial and later gates

The desk evaluates token presence, verification, issuer, audience, expiry, tenant, required scope and role in that order. The first denial determines the displayed HTTP result. Later gates are not-run, not additional failures or successful checks. The credential JSON and policy preview describe the complete selected scenario before animation finishes. Play reveals eight gates over thirty-two seconds at normal speed; Pause holds progress, Step advances one gate, Restart rewinds and Speed chooses half, normal or double inspection pace. Edits start playback unless reduced motion is requested. The resource vault opens only after inspection reaches the final decision and every required policy has passed.

Keep the security boundary explicit

This is a deterministic application authorization policy over fixture claims. It does not parse a JWT, retrieve a JWK, verify a cryptographic signature, issue an OAuth token, run a real identity provider or contact a protected endpoint. The verification checkbox is evidence supplied to the policy, not a way to bypass real cryptography. Expiry is not a live countdown; no clock skew, refresh flow, revocation, multiple audiences or scope hierarchy is implemented. Admin privileges are tenant-local in this fixture. HTTP 401 and 403 are the chosen teaching policy outcomes, not a claim that every provider uses this exact gate order or error text.

Views are my own and do not represent any employer, past or present.

Search