-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Application Load Balancer, LogAccessLogs doesnt follow best practise #2824
Comments
I would be happy to work on this if it's ok for you! |
Feel free, havnt digged down anything in it yet |
I made the change, but I was thinking if it is maybe too much restrictive then... is there any situation in which you would like to have access to multiple accountId under this? |
I think that can be up to the usre to add a less restrictive policy for those rare cases? AWS writes it like this:
Otherwise anyone can send data to the bucket |
Yes, you're right. I will open a pull request for this |
Describe the bug
The policy generated by the LogAccessLogs method allows too wide of a permission on a prefix of
loadbalancer
${log-bucket.Arn}/loadbalancer*
vs
${log-bucket.Arn}/arn:aws:s3:::${log-bucket}/loadbalancer/AWSLogs/${AWS::AccountId}/*
To Reproduce
Create a ALB and call LogAccessLogs on it, with a bucket
Generates a bucket policy with
${log-bucket.Arn}/loadbalancer*
Expected behavior
Generate a bucket policy with
${log-bucket.Arn}/arn:aws:s3:::${log-bucket}/loadbalancer/AWSLogs/${AWS::AccountId}/*
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html
Version:
The text was updated successfully, but these errors were encountered: