New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth: Add OrgRoleMapper service #86973
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good 🙂
I left a couple of questions for us to think through, wdyt?
4d497cc
to
dc77536
Compare
dc77536
to
242d74c
Compare
242d74c
to
2423f46
Compare
Found other issues, removing the approval to make sure nobody merge this accidentally
0438541
to
03498fe
Compare
66f50fb
to
de1d94b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job Misi! And very well tested!
expected: map[int64]org.RoleType{2: org.RoleEditor}, | ||
}, | ||
{ | ||
name: "should return nil if the org mapping contains at least one invalid setting and directly mapped role is empty and strict role mapping is enabled", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting case as well 😮
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
…ettings Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
What is this feature?
This PR adds an OrgRoleMapper that will be used by the OAuth connectors to implement OrgRole mapping. This mapper meets all of the OrgRole mapping requirements that is implemented by SAML.
Why do we need this feature?
Prerequisite for implementing OrgRole mapping for OAuth providers. It's extracted from #77683.
Who is this feature for?
#77683
Which issue(s) does this PR fix?:
Fixes #
Special notes for your reviewer:
Please check that: