feat: basic auth identity support #288
All Vouch review confidence checks passed
Residual risk 0.36 = Change Risk (0.63) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.63 · 304 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.342
Sensitive Paths
sensitive_paths
0.063
Real PR Conversation Timeline
1 comments
"Review active on #288"
general
weight: 0.35
guicassolato
Summary
Implements U1 and U2 of the Basic Auth plan for #189: RFC 7617 credential decoding, a Basic-specific directory contract, and a username-indexed
.htpasswdbackend. Resolver wiring, facade registration, the YAML and HTTP providers, the benchmark, and the operator recipe are later work units.Changes
CredentialLocationgate for case-insensitiveBasicscheme matching and1SP, then decodes canonical STANDARD base64, splits on the first colon, normalizes the user ID to NFC, and rejects malformed credentials. The password and decoded intermediates are zeroized; the password cannot be formatted or serialized, and decode errors do not expose credential bytes or offsets. Adds thebasicfeature and per-feature check..htpasswdbackend: Adds username-indexed bcrypt and Argon2 verification, dummy verification on a miss, bounded blocking verification, and atomic file refresh with a required staleness ceiling. Refuses weak and malformed hashes, duplicate normalized user IDs, and files mixing hash schemes. Tests cover decoding, verification, file reloads, rejection paths, and concurrency limits.Refs #189
Closes #293
Closes #294
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Added optional HTTP Basic credential decoding with normalized user IDs and configurable size limits.
Added password verification for bcrypt, Argon2, and SHA-crypt hashes, with configurable parameter limits.
Added an
.htpasswddirectory backend with automatic refresh, stale-data limits, and bounded concurrent verification.These APIs are available through the built-ins
basicfeature; a by-kind factory is not yet registered.Documentation
Added guidance that Basic credentials require TLS and that hosts should handle credential headers carefully.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->