Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

Use case insensitive equals in IAM revoke. #191

Merged

Conversation

daniel-cit
Copy link
Contributor

When removing an external user from the project IAM policy it is necessary to use a case insensitive equals.

for example, added external user jane.doe@example.com would be Jane.Doe@example.com in the project policy, which would cause the code not to remove her from the policy.

@daniel-cit daniel-cit added the bug Something isn't working label Jun 12, 2020
@daniel-cit daniel-cit changed the title Use case insensitive equals in IMA revoke. Use case insensitive equals in IAM revoke. Jun 12, 2020
@@ -68,7 +68,7 @@ func TestIAMRevoke(t *testing.T) {
folderIDs: []string{"folderID"},
projectIDs: []string{},
externalMembers: []string{"user:tom@gmail.com"},
Copy link
Contributor

Choose a reason for hiding this comment

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

its the external users (finding) that allows caps. initial users on the iam policy are alway slower

$ gcloud projects get-iam-policy tom-foo | grep gmail
  - user:my-email@gmail.com

image

@daniel-cit daniel-cit merged commit 389648d into master Jun 15, 2020
@ghost ghost deleted the bugfix/iam-revoke-needs-to-check-user-with-case-insensitive branch June 15, 2020 12:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants