Skip to content

refactor(oidc)!: explicit identity provider configuration - #243

Merged
baszalmstra merged 1 commit into
mainfrom
refactor/oidc-explicit-configuration
Sep 24, 2026
Merged

baszalmstra merged 1 commit into
mainfrom
refactor/oidc-explicit-configuration

Conversation

@wolfv

@wolfv wolfv commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

1.0 API work, PR O-b in the plan (follows #239). Callers see which identity provider they authenticate against, and the config type can grow.

  • OAuthConfig fields are private. Build it with OAuthConfig::new(auth_url, token_url) plus with_client_id / with_scopes, and read it with getters
  • OAuthConfig::from_oidc_url → OAuthConfig::dex: the old name implied OIDC discovery, but it appends Dex's /auth and /token paths (the layout of oauth2.sigstore.dev/auth)
  • remove the built-in provider defaults, the same pattern as refactor(rekor)!: remove built-in log URLs and fix stale docs #240 for Rekor:
    • OAuthConfig::sigstore and OAuthClient::sigstore
    • the private default OIDC URL
    • the issuers::* constants (MICROSOFT wasn't even a valid issuer)
  • get_identity_token takes the issuer URL (&str) instead of an Option that silently fell back to public-good. get_identity_token_with_callback / _with_options are removed; use OAuthClient::new(config).auth(..) / auth_with_options(..)
  • DefaultAuthCallback derives Debug, Clone, Copy and Default, and documents that it reads stdin and writes stdout
  • the examples and READMEs take the OIDC URL from the instance's signing config and error if it isn't there

The SigningContext::authenticate() flow from the #206 review builds on this in the sign PR (S-a).

Validation

  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test -p sigstore-oidc -p sigstore-sign -p sigstore-fulcio --all-features (including doctests)
  • cargo check -p sigstore-oidc --no-default-features

Signed-off-by: Wolf Vollprecht w.vollprecht@gmail.com

🤖 Generated with Claude Code

Callers should see which identity provider they authenticate against,
and configuration types should be able to grow.

- `OAuthConfig` fields are private. Build it with
  `OAuthConfig::new(auth_url, token_url)` and `with_client_id` /
  `with_scopes`, and read it with getters.
- Rename `OAuthConfig::from_oidc_url` to `OAuthConfig::dex`: it appends
  Dex's `/auth` and `/token` paths and performs no OIDC discovery.
- Remove `OAuthConfig::sigstore`, `OAuthClient::sigstore`, the built-in
  default OIDC URL and the `issuers` constants (`MICROSOFT` was not a
  valid issuer).
- `get_identity_token` takes the issuer URL instead of an `Option` that
  silently defaulted to public-good. `get_identity_token_with_callback`
  and `get_identity_token_with_options` are removed in favour of
  `OAuthClient::new(config).auth(..)` / `auth_with_options(..)`.
- `DefaultAuthCallback` derives `Debug`, `Clone`, `Copy` and `Default`,
  and documents that it uses stdin and stdout.

BREAKING CHANGE: `OAuthConfig` fields are private and `from_oidc_url` is
now `dex`; `OAuthConfig::sigstore`, `OAuthClient::sigstore`,
`sigstore_oidc::issuers`, `get_identity_token_with_callback` and
`get_identity_token_with_options` are removed; `get_identity_token`
takes `&str`.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Wolf Vollprecht <w.vollprecht@gmail.com>
@baszalmstra
baszalmstra merged commit dd0bf33 into main Sep 24, 2026
19 checks passed
@baszalmstra
baszalmstra deleted the refactor/oidc-explicit-configuration branch September 24, 2026 16:01
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.

2 participants