-
Notifications
You must be signed in to change notification settings - Fork 890
feat: implement organization role sync #14649
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
Conversation
96e4835
to
d7e2ac0
Compare
d7e2ac0
to
12c7af7
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.
This is a lot so I'll admit some of the more detailed mapping logic I glossed over, but the tests look solid 👍 🦖
s.Logger.Debug(ctx, "OIDC roles ignored in assignment", | ||
slog.F("ignored", ignored), | ||
slog.F("assigned", filtered), | ||
slog.F("user_id", user.ID), | ||
slog.F("username", user.Username), | ||
) |
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.
👍
coderd/members.go
Outdated
@@ -215,6 +216,33 @@ func (api *API) putMemberRoles(rw http.ResponseWriter, r *http.Request) { | |||
aReq.Old = member.OrganizationMember.Auditable(member.Username) | |||
defer commitAudit() | |||
|
|||
// Keep this block scoping to prevent accidental use of the user variable. |
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.
This is basically saying this should be a function imo
What this does
Existing deployment values configure site role sync. Organizations can now configure org role sync.
Removed existing role sync, and moved all code to
idpsync
package.In support of #14203