-
Notifications
You must be signed in to change notification settings - Fork 4k
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
(aws_elasticloadbalancingv2): logAccessLogs(myBucket) doesn't grant correct permissions #18367
Comments
Interestingly that first stanza, which is generated by CDK, is coming up as follows:
Note that the account in the principal does not match the account id in the resource. These are both deployed in the account identified by the resource. I'm also not sure where the Abort* comes from. |
Ah, the different account ids is intentional and correct (I read further in the docs). |
…es not grant all necessary permissions `ALB.logAccessLogs` today grants the ELB account Put/Abort on the bucket. The NLB code extends this to also grant permissions to the `delivery.logs.amazonaws.com` service principal. The ALB documentation now states that the permissions required for ALB are the same as NLB, so consolidating the code back into the base. fixes #18367
…es not grant all necessary permissions (#18558) `ALB.logAccessLogs` today grants the ELB account Put/Abort on the bucket. The NLB code extends this to also grant permissions to the `delivery.logs.amazonaws.com` service principal. The ALB documentation now states that the permissions required for ALB are the same as NLB, so consolidating the code back into the base. fixes #18367 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…es not grant all necessary permissions (aws#18558) `ALB.logAccessLogs` today grants the ELB account Put/Abort on the bucket. The NLB code extends this to also grant permissions to the `delivery.logs.amazonaws.com` service principal. The ALB documentation now states that the permissions required for ALB are the same as NLB, so consolidating the code back into the base. fixes aws#18367 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…es not grant all necessary permissions (aws#18558) `ALB.logAccessLogs` today grants the ELB account Put/Abort on the bucket. The NLB code extends this to also grant permissions to the `delivery.logs.amazonaws.com` service principal. The ALB documentation now states that the permissions required for ALB are the same as NLB, so consolidating the code back into the base. fixes aws#18367 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
What is the problem?
Permissions granted to the bucket policy by
applicationLoadBalancer.logAccessLogs(logBucket);
do not match permissions required for logging as documented at https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.htmlSpecifically, per the docs the policy needs to include
The
logAccessLogs()
method appears to be adding the first stanza to the bucket policy:Workaround is
Reproduction Steps
What did you expect to happen?
I expected the policy to be correctly configured for the log bucket.
What actually happened?
Logs did not arrive in the bucket.
CDK CLI Version
2.1.0 (build f4f18b1)
Framework Version
2.1.0
Node.js Version
v16.13.1
OS
MacOS
Language
Typescript
Language Version
4.5.2
Other information
No response
The text was updated successfully, but these errors were encountered: