-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
GroupClaimName not used to map user to team #19555
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
Labels
type/feature
Completely new functionality. Can only be merged if feature freeze is not active.
Comments
reference post from @zeripath: #10016 (comment) |
It never promised to do this. |
Ah, to me it gave that impression when I saw those options. Would it be hard to map the groups claim to teams? Should this be converted into a feature request then? |
Implemented this in #21441, please test it. |
lunny
added a commit
that referenced
this issue
Feb 8, 2023
Fixes #19555 Test-Instructions: #21441 (comment) This PR implements the mapping of user groups provided by OIDC providers to orgs teams in Gitea. The main part is a refactoring of the existing LDAP code to make it usable from different providers. Refactorings: - Moved the router auth code from module to service because of import cycles - Changed some model methods to take a `Context` parameter - Moved the mapping code from LDAP to a common location I've tested it with Keycloak but other providers should work too. The JSON mapping format is the same as for LDAP.  --------- Co-authored-by: Lunny Xiao <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
type/feature
Completely new functionality. Can only be merged if feature freeze is not active.
Description
Hi, I consider this a bug, but you decide:
According to this merged PR https://github.com/go-gitea/gitea/pull/16766/files#diff-190f875ffe99e881bafbd2fae54d5099c9d52bf13bd7c9a3ba434323e82078af it would now be possible to map content of OIDC claim name to teams, so that setting
GroupClaimName
to "groups", and seeing a JWT with "groups" claim containing ["bla"], would try to add the user to team bla if it exists.The
adminGroup
is correctly identified, so the parts are already working I think.Gitea Version
1.16.6
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
helm chart with image running version mentioned above.
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: