-
Notifications
You must be signed in to change notification settings - Fork 0
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
Teamwhitelistsupportonclaims #3
Teamwhitelistsupportonclaims #3
Conversation
// continue auth with existing teammemberships for user | ||
} | ||
|
||
user.TeamMemberships = append(user.TeamMemberships, claimval) |
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.
append only if casting is success
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.
fixed
handlers/auth.go
Outdated
} | ||
} | ||
return false, fmt.Errorf("verifyUser: user.TeamMemberships %s not found in TeamWhiteList: %s for user %s", user.TeamMemberships, cfg.Cfg.TeamWhiteList, 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.
Is this needed when we have below return statement ?
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.
fixed
pkg/cfg/cfg.go
Outdated
Domains []string `mapstructure:"domains"` | ||
WhiteList []string `mapstructure:"whitelist"` | ||
TeamWhiteList []string `mapstructure:"teamWhitelist"` | ||
TeamWhiteListClaim string `mapstructure:"teamWhitelistclaim"` |
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.
Add description on how this attribute is used
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.
addressed
pkg/providers/openid/openid.go
Outdated
user.PrepareUserData() | ||
return nil | ||
} | ||
|
||
// appendTeamMembershipsFromCustomClaim appends teammembership values in user If |
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.
if
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.
addressed
handlers/auth.go
Outdated
if team == wl { | ||
log.Debugf("verifyUser: Success! found user.TeamWhiteList in TeamWhiteList: %s for user %s", wl, user.Username) | ||
return true, nil | ||
log.Info("User not in userwhitelist, checking in teamWhiteList") |
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.
change this to debug
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.
addressed
teamwhitelisting based on claims present userinfo body