Application Load Balancer, LogAccessLogs doesnt follow best practise
See original GitHub issueDescribe 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:
- OS - Win 10
- Programming Language - CSharp
- CDK Version - 0.28
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Access logs for your Application Load Balancer
Elastic Load Balancing publishes a log file for each load balancer node every 5 minutes. Log delivery is eventually consistent. The load balancer...
Read more >What you need to know about ELB logs - Coralogix
Elastic Load Balancing provides access logs that capture detailed information about requests sent to your load balancer. Each ELB log ...
Read more >Best Practices for Analyzing Elastic Load Balancer Logs
Learn these tips and best practices for setting up and analyzing EC2 and Elastic Load Balancer logs to optimize performance and scalability.
Read more >Manage Your AWS EKS Load Balancer Like a Pro | by Meysam
Configure your AWS Load Balancer using Kubernetes IngressClass and Ingress resources with ... This will turn on logging Load Balancer's access logs to...
Read more >Enable access logs for your Application Load Balancer
Verify bucket permissions · Select the name of the bucket that you specified for access logs. · Navigate to the test file, ELBAccessLogTestFile...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
Feel free, havnt digged down anything in it yet