Technical Reference: Offline JWT & OIDC Security Auditing
JSON Web Tokens (RFC 7519) and OpenID Connect ID tokens carry identity assertions, authorization scopes, and session lifetimes across API gateways, single-page applications, and service meshes. Because production bearer tokens grant immediate access to protected endpoints, pasting an active token into a hosted web decoder creates a severe credential-exfiltration hazard. The ZERO.OPS JWT & OIDC Inspector decodes, parses, and audits tokens completely inside local browser memory while enforcing zero outbound network transmission.
1. Base64URL Decoding & UTF-8 Serialization
Compact JWS tokens concatenate three dot-separated Base64URL segments representing the JOSE header, the JSON claims payload, and the cryptographic signature. Unlike standard RFC 4648 Base64, Base64URL replaces plus and slash characters with hyphen and underscore and omits trailing padding characters. The inspector normalizes URL-safe characters, validates the Base64URL alphabet, restores quartet alignment for binary decoding, and decodes UTF-8 bytes with strict error checking so multi-byte Unicode claims render cleanly without Mojibake.
2. Header Algorithm & Key Injection Hazards
Insecure JWT libraries historically trusted the untrusted header alg field before verifying keys. The inspector immediately flags alg: none tokens and empty signature segments as critical defects, because accepting unsigned payloads lets attackers forge arbitrary subjects and roles. It also evaluates symmetric HMAC algorithms (HS256, HS384, HS512) for missing key identifiers (kid) or OIDC usage where asymmetric RS256, ES256, or EdDSA with JWKS rotation eliminates shared-secret distribution and RS-to-HS key-confusion attacks. Dangerous header parameters such as remote key URLs (jku, x5u) and embedded public keys (jwk) are highlighted because unvalidated verifiers can be tricked into fetching attacker-hosted key sets or trusting embedded keys.
3. NumericDate Lifecycle & Clock Skew Verification
Registered timestamp claims exp (Expiration Time), nbf (Not Before), iat (Issued At), and OIDC auth_time are encoded as integer seconds since the Unix epoch. The clock engine evaluates expiration relative to the local system clock, flagging expired tokens, missing exp claims that grant indefinite token lifetime, excessive durations beyond thirty days, future nbf activation windows, and iat timestamps drifting more than five minutes ahead due to distributed clock skew.
4. Recursive PII & Credential Exposure Analysis
A common architectural mistake is treating signed JWS payloads as confidential storage. Signature verification guarantees integrity and authenticity, not secrecy: any client browser, proxy cache, or browser history entry holding a JWS can decode its middle segment. The inspector recursively traverses nested payload objects and arrays to flag both high-risk claim keys—such as email, phone_number, address, ssn, tax_id, ip_address, password, and api_key—and claim values matching email, IPv4, or cloud secret prefixes. Moving sensitive attributes behind opaque reference tokens or encrypted JWE envelopes prevents unintended data leakage across client logs and telemetry pipelines.
5. Operational Guidance for Safe Token Triage
When diagnosing authentication failures in staging or production, strip bearer tokens from HAR captures before sharing traces, verify that identity providers publish minimal sub and scope claims, and enforce explicit server-side algorithm allowlists rather than inferring verification behavior from incoming token headers. In multi-tenant OIDC architectures, inspect both iss and aud claims on every request so a token issued for one downstream resource server cannot be replayed against another microservice sharing the same identity provider. Always rotate symmetric signing secrets immediately if an unredacted token or debug header ever leaks into an external ticket queue, browser extension log, or third-party observability sink.