The toy Basic auth example keeps its boundary narrow.

highlighted = computed this step

What this toy model checks

The trust boundary parses one GET request, one Basic Authorization header, one base-sixty-four token, one decoded credential, and one empty response.

recompute Basic auth rows\text{recompute Basic auth rows}
Basic auth honesty boundaryThe decoded credential split and empty response body are recomputed from pinned bytes.Basic auth honesty boundary - Basic token decodes to alice and a displayed passwordsectionnamevaluecheckrequest linemethodGETparsedrequest linepath/privateparsedrequest lineversionHTTP/1.1parsedheaderHostapi.exampleexactheaderAuthorization schemeBasicparsedheaderAuthorization tokenYWxpY2U6c2V2ZW4=base64 textcredentialbase64 tokenYWxpY2U6c2V2ZW4=pinned textcredentialdecoded displayalice:sevennot encryptedcredentialdecoded hex616c6963653a736576656eexact bytescredentialusernamealicebefore coloncredentialpassword displaysevenafter colonstatusversionHTTP/1.1parsedstatusstatus200 OKokheaderContent-Length0empty bodybodybyte length0countedcheckschemeBasicBasiccheckbase64 decodesyescredential textcheckcolon splityesusername/passwordchecksent body bytes0empty

Honesty boundary

NOTE: toy HTTP Basic auth only; not TLS protection, password storage, sessions, cookies, OAuth, bearer tokens, password hashing, rate limits, phishing defenses, browser prompts, proxies, HTTP/2 or HTTP/3, frameworks, or production auth config.

toy Basic auth only\text{toy Basic auth only}
Basic auth honesty boundaryThe decoded credential split and empty response body are recomputed from pinned bytes.Basic auth honesty boundary - Basic token decodes to alice and a displayed passwordsectionnamevaluecheckrequest linemethodGETparsedrequest linepath/privateparsedrequest lineversionHTTP/1.1parsedheaderHostapi.exampleexactheaderAuthorization schemeBasicparsedheaderAuthorization tokenYWxpY2U6c2V2ZW4=base64 textcredentialbase64 tokenYWxpY2U6c2V2ZW4=pinned textcredentialdecoded displayalice:sevennot encryptedcredentialdecoded hex616c6963653a736576656eexact bytescredentialusernamealicebefore coloncredentialpassword displaysevenafter colonstatusversionHTTP/1.1parsedstatusstatus200 OKokheaderContent-Length0empty bodybodybyte length0countedcheckschemeBasicBasiccheckbase64 decodesyescredential textcheckcolon splityesusername/passwordchecksent body bytes0empty

No client compute

The page shows already validated rows. It does not decode credentials in browser code.

static validated rows\text{static validated rows}
Basic auth honesty boundaryThe decoded credential split and empty response body are recomputed from pinned bytes.Basic auth honesty boundary - Basic token decodes to alice and a displayed passwordsectionnamevaluecheckrequest linemethodGETparsedrequest linepath/privateparsedrequest lineversionHTTP/1.1parsedheaderHostapi.exampleexactheaderAuthorization schemeBasicparsedheaderAuthorization tokenYWxpY2U6c2V2ZW4=base64 textcredentialbase64 tokenYWxpY2U6c2V2ZW4=pinned textcredentialdecoded displayalice:sevennot encryptedcredentialdecoded hex616c6963653a736576656eexact bytescredentialusernamealicebefore coloncredentialpassword displaysevenafter colonstatusversionHTTP/1.1parsedstatusstatus200 OKokheaderContent-Length0empty bodybodybyte length0countedcheckschemeBasicBasiccheckbase64 decodesyescredential textcheckcolon splityesusername/passwordchecksent body bytes0empty

Summary

Basic auth encoding is easy to reverse; it is not encryption.

encoding, not encryption\text{encoding, not encryption}
Basic auth honesty boundaryThe decoded credential split and empty response body are recomputed from pinned bytes.Basic auth honesty boundary - Basic token decodes to alice and a displayed passwordsectionnamevaluecheckrequest linemethodGETparsedrequest linepath/privateparsedrequest lineversionHTTP/1.1parsedheaderHostapi.exampleexactheaderAuthorization schemeBasicparsedheaderAuthorization tokenYWxpY2U6c2V2ZW4=base64 textcredentialbase64 tokenYWxpY2U6c2V2ZW4=pinned textcredentialdecoded displayalice:sevennot encryptedcredentialdecoded hex616c6963653a736576656eexact bytescredentialusernamealicebefore coloncredentialpassword displaysevenafter colonstatusversionHTTP/1.1parsedstatusstatus200 OKokheaderContent-Length0empty bodybodybyte length0countedcheckschemeBasicBasiccheckbase64 decodesyescredential textcheckcolon splityesusername/passwordchecksent body bytes0empty