Default OIDC and Google connections to openid email profile scopes - #4324
Conversation
openid email profile scopes
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughOIDC and Google connections now use ChangesOIDC scope defaults
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
9b69192 to
cb1a43f
Compare
Connections created without an explicit scopes property only received the bare openid scope, leaving the email and profile claims unavailable until an admin added them manually. Seed the full standard OIDC scope set when none is supplied, while still only ensuring openid is present when the caller provides their own scopes. OAuth and GitHub connections are unaffected since they don't use OIDC scopes.
cb1a43f to
641ed62
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| ) | ||
|
|
||
| // defaultOIDCScopes is seeded for OIDC and Google connections when no scopes are supplied. | ||
| const defaultOIDCScopes = "openid,email,profile" |
There was a problem hiding this comment.
Can we add email and profile for all the oidc providers or should it be only for known ones like Google?
There was a problem hiding this comment.
It is valid for Google and Custom OIDC providers and is gated by IdP type. When we are bringing new IdPs (not custom), we can update the gate to selectively provide default scopes to them.
Every mainstream OIDC platform supports these three, hence keeping for custom OIDC providers is fine IMO.
Purpose
Connections created without an explicit
scopesproperty only received the bareopenidscope, even for OIDC and Google. This left theemailandprofileclaims unavailable until an admin added them manually, even though the docs already describeopenid email profileas the expected scopes for a Google connection.Approach
Default OIDC and Google connections to
openid email profilewhen no scopes are supplied, while still only ensuringopenidis present when the caller provides their own scope list (existing scopes are never force-extended withemail/profile). OAuth and GitHub connections are unaffected, since they don't use OIDC scopes.Related Issues
Related PRs
Checklist
breaking changelabel added.Security checks
Summary by CodeRabbit
openid,email,profilewhen no scopes are provided.