Skip to content

[codex] Fail closed when OIDC HTTP client build fails - #176

Merged
salasebas merged 1 commit into
mainfrom
codex/fail-closed-oidc-ssrf-client
Jul 1, 2026
Merged

[codex] Fail closed when OIDC HTTP client build fails#176
salasebas merged 1 commit into
mainfrom
codex/fail-closed-oidc-ssrf-client

Conversation

@salasebas

Copy link
Copy Markdown
Owner

Summary

  • make the SSO OIDC HTTP client cache a Result instead of falling back to an unguarded reqwest::Client
  • propagate client construction failures through registration, runtime discovery, token exchange, JWKS, and UserInfo paths
  • add focused regression coverage proving client-build/cache failures fail closed

Root Cause

Finding 2 identified a fail-open fallback in the SSO OIDC SSRF guard: if the guarded OAuthHttpClient::from_config build failed, RustAuth wrapped a plain reqwest::Client, losing the DNS resolver and redirect policy used to block private/internal targets.

Validation

  • cargo fmt --all --check
  • cargo test -p rustauth-sso --all-features oidc_http_client
  • cargo test -p rustauth-sso --all-features cached_oauth_http_client_failure_is_fail_closed
  • cargo nextest run -p rustauth-sso --all-features (338 passed)
  • cargo clippy --workspace --all-targets --all-features -- -D warnings

@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rustauth-docs-site Ready Ready Preview, Comment Jul 1, 2026 6:17am

@salasebas
salasebas force-pushed the codex/fail-closed-oidc-ssrf-client branch from b0c622b to 6dd7021 Compare July 1, 2026 06:14
@salasebas
salasebas marked this pull request as ready for review July 1, 2026 06:30
@salasebas
salasebas merged commit b4a0ae2 into main Jul 1, 2026
23 checks passed
This was referenced Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant