Day 076 / Security / Untrusted Claims

JWT Claim Inspector

View source ↗Scroll to explore ↓
JWT Claim Inspector project cover
/ Overview

Inspect synthetic JWT headers, payloads and time claims locally with a dependency-free Python CLI.

NameJWT Claim Inspector

ClientIndependent daily build

IndustriesSecurity education

DateDay 076 · November 18, 2026

/ Challenge

Readable claims can look authoritative even when nobody has checked their signature. A small learning tool needs to reveal token structure without presenting decoded fields as proof of identity or permission.

/ Provided services

Clear thinking.
Practical delivery.

01

Inspect structure

Canonical base64url and JSON-object checks make malformed inputs visible without treating decoding as verification.

02

Compare time claims

Expiration is reached at the exact exp boundary. Not-before becomes reached at its boundary; future issued-at is an observation. Missing or wrongly typed time claims receive separate labels, with zero leeway.

03

Preserve the trust boundary

Exit zero means inspection completed. It never means the token should authorize a request. Use synthetic tokens because the report prints decoded claims.

JWT Claim Inspector feature visual
/ Solution

The Python CLI reads one local UTF-8 file capped at 16 KiB and decodes a three-part compact token. It preserves header and payload values, rejects duplicate JSON keys and malformed base64url, and reports exp, nbf and iat relative to a supplied or current Unix clock. Every report labels the claims untrusted. It makes no network requests and performs no signature, issuer, audience, algorithm or authorization validation. Encrypted five-part tokens are outside scope. The included sample is synthetic and unsigned; output is not redacted.

/ Impact

Sixteen passing tests

Repeatable clock input

Explicit unverified status

Bounded local file input

No external dependencies

/ Tech stack

Python standard library

Argparse, base64 and JSON support local parsing and readable escaped output.

Sixteen tests

Tests exercise time boundaries, malformed segments, claim types, duplicate keys, nonfinite constants, unverified signatures and CLI behavior.

Next project

PII Redaction Playground

View case study ↗