Skip to content

feat: Explicitly grant elasticloadbalancing:AddTags permission #382

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

Merged

Conversation

acdha
Copy link
Contributor

@acdha acdha commented May 19, 2023

As per AWS customer notifications, the elasticloadbalancing:AddTags permission will be required soon for anyone calling CreateLoadBalancer with tags:

On June 1, 2023, we will be adding an additional layer of security to ELB ‘Create*' API calls where API callers must have explicit access to add tags in their Identity and Access Management (IAM) policy [1]. Currently, access to attach tags was implicitly granted with access to 'Create*' APIs. … We will be allowing 'Create*' API calls with the current policy to be accepted until August 30, 2023. After this date, the 'Create*' API call will fail and return an error if the the attribute is specified and permission is not granted.

As per AWS customer notifications, the elasticloadbalancing:AddTags
permission will be required soon for anyone calling CreateLoadBalancer
with tags:

> On June 1, 2023, we will be adding an additional layer of security to
> ELB ‘Create*' API calls where API callers must have explicit access to
> add tags in their Identity and Access Management (IAM) policy [1].
> Currently, access to attach tags was implicitly granted with access to
> 'Create*' APIs. … We will be allowing 'Create*' API calls with the
> current policy to be accepted until August 30, 2023. After this date,
> the 'Create*' API call will fail and return an error if the the
> attribute is specified and permission is not granted.
@acdha acdha force-pushed the add-elb-tag-permission branch from 7fbe7ec to 151a60c Compare May 19, 2023 14:06
@acdha acdha changed the title Explicitly grant ELB AddTags permission chore: Explicitly grant elasticloadbalancing:AddTags permission along with Create* May 19, 2023
@bryantbiggs bryantbiggs changed the title chore: Explicitly grant elasticloadbalancing:AddTags permission along with Create* feat: Explicitly grant elasticloadbalancing:AddTags permission along with Create* May 24, 2023
@bryantbiggs bryantbiggs changed the title feat: Explicitly grant elasticloadbalancing:AddTags permission along with Create* feat: Explicitly grant elasticloadbalancing:AddTags permission May 24, 2023
@bryantbiggs bryantbiggs merged commit 9cda428 into terraform-aws-modules:master May 24, 2023
@acdha acdha deleted the add-elb-tag-permission branch May 25, 2023 14:10
@antonbabenko
Copy link
Member

This PR is included in version 5.21.0 🎉

@tomelliff
Copy link

I don't think this is the equivalent of the current upstream policy but the translation to HCL makes it a little hard to follow.

The diff between v2.4.3 and v2.5.3 is this statement block:

+        {
+            "Effect": "Allow",
+            "Action": [
+                "elasticloadbalancing:AddTags"
+            ],
+            "Resource": [
+                "arn:aws:elasticloadbalancing:*:*:targetgroup/*/*",
+                "arn:aws:elasticloadbalancing:*:*:loadbalancer/net/*/*",
+                "arn:aws:elasticloadbalancing:*:*:loadbalancer/app/*/*"
+            ],
+            "Condition": {
+                "StringEquals": {
+                    "elasticloadbalancing:CreateAction": [
+                        "CreateTargetGroup",
+                        "CreateLoadBalancer"
+                    ]
+                },
+                "Null": {
+                    "aws:RequestTag/elbv2.k8s.aws/cluster": "false"
+                }
+            }
+        },

which appears to already be in the existing policy having been added in e1403c1 in #358.

Would it make more sense to instead use the raw JSON from upstream here to make it much easier to maintain this and show the direct link to upstream?

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants