Skip to content
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

Merged
merged 17 commits into from
Mar 1, 2023

Conversation

ritmanda
Copy link
Collaborator

teamwhitelisting based on claims present userinfo body

// continue auth with existing teammemberships for user
}

user.TeamMemberships = append(user.TeamMemberships, claimval)

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

Copy link
Collaborator Author

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)

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 ?

Copy link
Collaborator Author

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"`

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

user.PrepareUserData()
return nil
}

// appendTeamMembershipsFromCustomClaim appends teammembership values in user If

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if

Copy link
Collaborator Author

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")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this to debug

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

@ritmanda ritmanda merged commit 75074f3 into CiscoM31:integ Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants