Basic Authentication
Cheat sheet · https://pcornel.dk/topic.php?topic=5313
Answer
HTTP Basic authentication using a username/password credential encoded for transmission and protected by TLS.
Remember
- Base64 ≠ encryption; Basic credentials are trivially recoverable from the header without transport protection.
- TLS present ≠ credential least privilege; password scope, sharing and rotation still matter.
- 401 challenge ≠ credentials definitely wrong; realm, proxy or authentication routing can be involved.
- Basic auth success ≠ session isolation; every request typically carries reusable credentials.
First checks
curl -sS -u <user>:<password> <url>— basic auth- HTTPS only — transport
- Service account, not personal — identity
Verify in this order
user:pass → base64 header → TLS → API
Where it usually breaks
A successful Basic challenge proves credential acceptance for that request; it does not make Base64 confidential or prove least privilege.
Client payload/auth → HTTP transport → endpoint validation/policy → request accepted → queued/job execution → target mutation → effective state → consumer workload.
Basic Authentication API boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Caller / request | Environment/version, identity and exact request contract are attributable | Hidden defaults, wrong endpoint/version, leaked or mismatched credentials |
| Server / response | Status, headers, structured body and request ID are interpreted together | Status-only handling, ignored error body, ambiguous async result or unsafe retry |
| State / proof | Write result is reconciled with resource read-back or acceptance test | Response success treated as final target success without verification |
| Troubleshooting | First failed boundary is preserved, changed minimally and retested | Blind retries, credential rotation, replay or payload edits before evidence is captured |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5313