Skip to content

v0.1.3

  • v0.1.3
  • 9c54afa
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
  • Choose a tag to compare

  • v0.1.3
  • 9c54afa
  • Choose a tag to compare

  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
@jgowdy-godaddy jgowdy-godaddy tagged this 03 Jun 08:04
A single-credential HTTP Basic AuthBackend, the browser-promptable companion to
StaticBearerBackend, for human-facing internal pages (admin/diagnostics views)
guarded by one shared password. Mirrors StaticBearerBackend's design:

- Username and password held in secrecy::SecretString (redacted from Debug,
  zeroized on drop); both compared in constant time via subtle, both evaluated
  before deciding so timing reveals neither which half failed nor the secrets.
- Parses Authorization: Basic base64(user:pass) per RFC 7617 (case-insensitive
  scheme, split on first ':'; password may contain colons). Chain contract:
  defers (Ok(None)) when no Basic credential is present, definitive
  InvalidCredentials when one is present but wrong.
- Behind the existing auth feature; adds base64. Re-exported from
  rusty_gasket::auth and the prelude.

13 backend tests (correct/wrong user+pass, defer cases, malformed base64,
missing separator, colon-in-password, case-insensitive scheme, no secret leak
in Debug). Version bumped 0.1.2 -> 0.1.3 (workspace). fmt + clippy --all-features
-D warnings + test --all-features + cargo deny all green locally.

Does not emit a WWW-Authenticate challenge header on 401 (response-layer
concern) — noted as a follow-up for a browser-native login prompt.
Assets 2
Loading