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

Unbreak IAM. #2180

Merged
Merged

Conversation

paddycarver
Copy link
Contributor

I tried to reintroduce case-insensitivity for members in IAM in #2168,
but apparently only part of the members value is case-insensitive.

Members values are in the format <type>:<value> where <type> is
something like user and <value> is something like
[email protected]. The value is case-insensitive, but the type
is very much case-sensitive, and broke a bunch of our tests, namely for
the serviceAccount type.

This fixes it by only changing the case of the value, not the whole
string.

Release Note for Downstream PRs (will be copied)


@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
This PR seems not to have generated downstream PRs before, as of 061abef.

Pull request statuses

No diff detected in terraform-google-conversion.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I built this PR into one or more new PRs on other repositories, and when those are closed, this PR will also be merged and closed.
depends: hashicorp/terraform-provider-google-beta#1047
depends: hashicorp/terraform-provider-google#4257

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
This PR seems not to have generated downstream PRs before, as of 061abef.

Pull request statuses

terraform-provider-google-beta already has an open PR.
No diff detected in terraform-google-conversion.
terraform-provider-google already has an open PR.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I didn't open any new pull requests because of this PR.

@paddycarver paddycarver requested a review from danawillow August 14, 2019 20:01
// <type> is case sensitive
// <value> isn't
// so let's lowercase the value and leave the type alone
pieces := strings.Split(m, ":")
Copy link
Contributor

Choose a reason for hiding this comment

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

is it possible that the member could have a : in it? If so, I think SplitN or something like that will make it so that you only split on the first occurrence.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a good point! PR updated to use SplitN. Still look good?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yup!

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
I see that this PR has already had some downstream PRs generated. Any open downstreams are already updated to your most recent commit, ac531e3.

Pull request statuses

terraform-provider-google-beta already has an open PR.
No diff detected in terraform-google-conversion.
terraform-provider-google already has an open PR.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I didn't open any new pull requests because of this PR.

1 similar comment
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician, I work on Magic Modules.
I see that this PR has already had some downstream PRs generated. Any open downstreams are already updated to your most recent commit, ac531e3.

Pull request statuses

terraform-provider-google-beta already has an open PR.
No diff detected in terraform-google-conversion.
terraform-provider-google already has an open PR.
No diff detected in Ansible.
No diff detected in Inspec.

New Pull Requests

I didn't open any new pull requests because of this PR.

paddycarver and others added 3 commits August 14, 2019 22:58
I tried to reintroduce case-insensitivity for members in IAM in GoogleCloudPlatform#2168,
but apparently only _part_ of the members value is case-insensitive.

Members values are in the format `<type>:<value>` where `<type>` is
something like `user` and `<value>` is something like
`[email protected]`. The _value_ is case-insensitive, but the _type_
is very much case-sensitive, and broke a bunch of our tests, namely for
the `serviceAccount` type.

This fixes it by only changing the case of the value, not the whole
string.
In case values have a `:` in them.
Tracked submodules are build/terraform-beta build/terraform-mapper build/terraform build/ansible build/inspec.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants