Repository navigation
feat(idp-provider): scaffold OIDC provider with discovery + JWKS from the PKI signing cert - #13696
Merged
Merged
Conversation
… the PKI signing cert
|
Warning Review limit reachedYou'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. View limit details
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slice 3, step 1 of the IdP provider build (stand-up plan on #13409): scaffold the new Rust crate
pkgs/idp-providerserving 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)idp-provider. Config via env:IDP_PROVIDER_ISSUER(defaulthttp://127.0.0.1:8911),IDP_PROVIDER_BIND(default127.0.0.1:8911),IDP_PROVIDER_OIDC_CERT(defaultpkgs/idp-pki/trust/oidc-signing.crt.pemrelative to the repo checkout).GET /healthz→{"status":"ok"}.GET /.well-known/openid-configuration— discovery document: configured issuer,/authorize,/token,/userinfo,/jwksendpoints,code+authorization_code+ PKCES256, RS256, scopesopenid 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'sx5t#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.nixfollowing the repo's small-Rust-package pattern (rustPlatform.buildRustPackagewithcargoLock, as in pkgs/fleet's fleet-brokers / the atlas-search monolith), with the generatedCargo.lockcommitted.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):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
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.