Skip to content

feat(idp-provider): scaffold OIDC provider with discovery + JWKS from the PKI signing cert - #13696

Merged
dezren39 merged 1 commit into
mainfrom
lane/idp-provider-scaffold
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
lane/idp-provider-scaffold

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Slice 3, step 1 of the IdP provider build (stand-up plan on #13409): scaffold the new Rust crate pkgs/idp-provider serving OIDC discovery + JWKS from the REAL Slice 2 signing certificate. First landed evidence for the provider stand-up; authorize/token/userinfo land in the next step of the slice.

What landed (pkgs/idp-provider/ only)

  • Axum 0.8 + tokio binary idp-provider. Config via env: IDP_PROVIDER_ISSUER (default http://127.0.0.1:8911), IDP_PROVIDER_BIND (default 127.0.0.1:8911), IDP_PROVIDER_OIDC_CERT (default pkgs/idp-pki/trust/oidc-signing.crt.pem relative to the repo checkout).
  • GET /healthz → {"status":"ok"}.
  • GET /.well-known/openid-configuration — discovery document: configured issuer, /authorize, /token, /userinfo, /jwks endpoints, code + authorization_code + PKCE S256, RS256, scopes openid profile.
  • GET /jwks — built at startup by PARSING the configured cert PEM (x509-cert + rsa + pkcs1 crates; no shelling out, no hardcoded key material). kid = base64url(SHA-256 of the cert DER) = the key's x5t#S256, per the convention recorded on SSO (#13658): Slice 2 — issue OIDC (JWKS) and SAML signing keys from the IdP PKI #13686. Only the PUBLIC cert is used — no private key material anywhere in this slice.
  • default.nix following the repo's small-Rust-package pattern (rustPlatform.buildRustPackage with cargoLock, as in pkgs/fleet's fleet-brokers / the atlas-search monolith), with the generated Cargo.lock committed.
  • Short README.md: config, endpoints so far, kid convention.

Test evidence (laptop, inside the worktree)

cargo test — endpoints suite against the real cert at ../idp-pki/trust/oidc-signing.crt.pem, deriving the expected thumbprint and RSA key from the cert file in-test (nothing hardcoded):

running 3 tests
test discovery_matches_configured_issuer ... ok
test healthz_ok ... ok
test jwks_matches_cert_thumbprint_and_key ... ok
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

Live run of the binary on the laptop, GET /jwks:

{"keys":[{"kty":"RSA","use":"sig","alg":"RS256","kid":"gcmSpv4Ty2DIGf4oL3F7yENhK6LujlvZi5zs70XKbIQ","x5t#S256":"gcmSpv4Ty2DIGf4oL3F7yENhK6LujlvZi5zs70XKbIQ","n":"tLKUYdGE05sgG0wpZo-SnwDvRenV7KJ6LAvWkhee42FYdOmbPxFjzmpFnSKOaDT02wnA_8PkEWZOe0lUTyGqbJ13PkabbTq4w-YOxtK26JcIYu5irqCPrs2fnsRhcTfHgNVb2LwP4nutQ6S_4tPfef85Pf5MBx_HBX_Sqi3hRFXmaZnKwFJTrlqsEiiysgv6NWZT6zOQUBcl2QBIYdBnFEo9uq-9uYouPimhOS095sMWUPtC-_WjT-yfRN0tkZ0YuIxnKD8bsRy1AzFHx9m71CQRt_SSPreTOadH4S1cAqPga-5LHO1x7IRSgkTPmv3vIfRVSKGxPKfwVGbFlnE6ZQ","e":"AQAB"}]}

The kid is the base64url form of the cert's published SHA-256 fingerprint 81:C9:92:A6:…:6C:84 (serial 1001).

No other package, door, DNS, or live surface is touched.

Refs #13409
Refs #13658


Run Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 55 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f8f40cc0-f191-4e61-a6a3-9b8e3de6f762
Commits

Reviewing files that changed from the base of the PR and between 420cdcd and aee2016.

Files ignored due to path filters: 1

  • pkgs/idp-provider/Cargo.lock is excluded by !**/*.lock
Files selected for processing: 6

  • pkgs/idp-provider/Cargo.toml
  • pkgs/idp-provider/README.md
  • pkgs/idp-provider/default.nix
  • pkgs/idp-provider/src/lib.rs
  • pkgs/idp-provider/src/main.rs
  • pkgs/idp-provider/tests/endpoints.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39
dezren39 merged commit 6d57532 into main Nov 23, 2026
2 checks passed
@dezren39
dezren39 deleted the lane/idp-provider-scaffold branch November 23, 2026 20:47
@dezren39 dezren39 added the audit:completed-later Gap completed by later merged PR label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit:completed-later Gap completed by later merged PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant