Skip to content

feat: accept Basic auth as Bearer token for pip, Maven, and Bundler#50

Merged
wolfeidau merged 1 commit into
mainfrom
feat/basic-auth-support
Mar 22, 2026
Merged

feat: accept Basic auth as Bearer token for pip, Maven, and Bundler#50
wolfeidau merged 1 commit into
mainfrom
feat/basic-auth-support

Conversation

@wolfeidau
Copy link
Copy Markdown
Member

@wolfeidau wolfeidau commented Mar 22, 2026

Tools like pip, Maven, and Bundler only support Basic auth and cannot send Authorization: Bearer headers. Accept Basic auth inbound where the password field is treated as the bearer/OIDC token, unblocking these tools when auth is enabled.

  • Extract token from Basic auth password field, enabling pip, Maven, and
    Bundler which cannot send Bearer headers to authenticate with the cache
  • Support both --auth-token (static token) and --oidc-policies (OIDC token
    as Basic auth password) flows
  • Advertise Basic scheme in WWW-Authenticate 401 responses per RFC 7235
  • Make Bearer scheme matching case-insensitive per RFC 7235
  • Add per-tool configuration examples for pip, Maven, and Bundler in README
  • Add TestExtractToken unit tests covering Bearer case variants, empty token,
    malformed base64, unknown scheme, and no header
  • Add TestOIDCMiddleware_UnknownScheme to cover unsupported auth schemes

- Extract token from Basic auth password field, enabling pip, Maven, and
  Bundler which cannot send Bearer headers to authenticate with the cache
- Support both --auth-token (static token) and --oidc-policies (OIDC token
  as Basic auth password) flows
- Advertise Basic scheme in WWW-Authenticate 401 responses per RFC 7235
- Make Bearer scheme matching case-insensitive per RFC 7235
- Add per-tool configuration examples for pip, Maven, and Bundler in README
- Add TestExtractToken unit tests covering Bearer case variants, empty token,
  malformed base64, unknown scheme, and no header
- Add TestOIDCMiddleware_UnknownScheme to cover unsupported auth schemes
@wolfeidau wolfeidau force-pushed the feat/basic-auth-support branch from e9a7a2f to d838247 Compare March 22, 2026 22:22
@wolfeidau wolfeidau merged commit f7e3ed3 into main Mar 22, 2026
1 check passed
@wolfeidau wolfeidau deleted the feat/basic-auth-support branch March 22, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant