refactor: migrate to zitadel oidc lib - #356
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Summary by CodeRabbit
WalkthroughChangesThe PR replaces custom transport-based credential handling with Zitadel OIDC resource-server and relying-party clients. It updates OAuth2 module and gRPC wiring, migrates session authorization, token exchange, refresh, and introspection flows, and adds dynamic signed-token test fixtures with explicit claim validation. OIDC client migration
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
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. Comment |
f363faa to
b38856e
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
internal/session/manager.go (1)
174-192: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winUse the configured provider HTTP client for discovery and JWKS requests.
getOpenIDConfigandgetProviderKeySetusehttp.DefaultClient, whilecredentials.NewTLSRPstores the mTLS client onRelyingParty.HttpClient(). If either endpoint requires mTLS, discovery can fail before the token exchange, or JWKS retrieval can fail before claim validation.Obtain the relying-party client before these requests and pass it to both functions. Add an integration test that requires the configured client certificate.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f006c513-a72b-40d4-9daa-2b7e8ed8049a
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (28)
.golangci.yamlgo.modinternal/credentials/clientsecretpost.gointernal/credentials/clientsecretpost_test.gointernal/credentials/credentials.gointernal/credentials/credentials_test.gointernal/credentials/insecure.gointernal/credentials/insecure_test.gointernal/credentials/provider.gointernal/credentials/provider_test.gointernal/credentials/resourceserver.gointernal/credentials/resourceserver_test.gointernal/credentials/tls.gointernal/credentials/tls_test.gointernal/debugtools/http.gointernal/debugtools/http_test.gointernal/session/helper_test.gointernal/session/housekeeper.gointernal/session/manager.gointernal/session/manager_test.gointernal/session/openid.gointernal/session/options.gointernal/sessionwiring/sessionwiring.gomodules/credentials/oauth2/module.gomodules/credentials/oauth2/module_test.gomodules/grpc/session/module.gomodules/grpc/session/options.gomodules/grpc/session/server.go
💤 Files with no reviewable changes (5)
- internal/credentials/credentials_test.go
- internal/credentials/credentials.go
- internal/debugtools/http.go
- internal/debugtools/http_test.go
- internal/sessionwiring/sessionwiring.go
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
b38856e to
92cf59d
Compare
92cf59d to
08edd4b
Compare
dabe7ad to
9682196
Compare
9682196 to
dbbf95b
Compare
Signed-off-by: Danylo Shevchenko <danilshevchenko123456@gmail.com>
dbbf95b to
d42a55e
Compare
What this PR does / why we need it:
Migrate code exchange flow to zitadel oidc library implementation.
Credentials package has been refactored so that it's compatible with the zitadel OIDC lib.