-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Add drop_invalid_header_fields to AWS ALB Resource #11257
Add drop_invalid_header_fields to AWS ALB Resource #11257
Conversation
@bflad Any chance you could take a look at this? |
Amazon application load balancers have an option to drop invalid headers. https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html This commit adds the attribute to the aws_lb resource with its respective default (false).
This commit adds the proper acceptance tests for creating / updating load balancers with the drop invalid headers attribute.
This commit adds the data for the new drop_invalid_header_fields attribute for the aws load balancer.
This commit adds the documentation for the new drop_invalid_header_fields attribute for aws application load balancers. Sourced from https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html.
70821b4
to
fcfa5ff
Compare
|
Can this get eyes on it? We haven't heard anything back yet. |
@paultyng I saw you removed the needs-triage label. Is there anything we need to do before this can be merged? |
We came across this today after seeing a slack security bounty on http request smugging, and a comment about the implications on AWS ALBs on hackernews. Apparently the AWS ALB does not drop invalid headers by default, which opens the door for attackers to exploit vulnerable systems behind the ALB. It would be helpful if we could configure this option with terraform to prevent this kind of exploit. |
Agreed. This has been waiting for 3 months now. I'm not sure who or what needs to happen for it to get merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks @kireledan 🚀
Output from acceptance testing:
--- PASS: TestAccAWSLB_ALB_AccessLogs (300.79s)
--- PASS: TestAccAWSLB_ALB_AccessLogs_Prefix (233.57s)
--- PASS: TestAccAWSLB_ALB_basic (186.52s)
--- PASS: TestAccAWSLB_applicationLoadBalancer_updateDeletionProtection (245.95s)
--- PASS: TestAccAWSLB_applicationLoadBalancer_updateDropInvalidHeaderFields (266.58s)
--- PASS: TestAccAWSLB_applicationLoadBalancer_updateHttp2 (255.14s)
--- PASS: TestAccAWSLB_generatedName (161.51s)
--- PASS: TestAccAWSLB_generatesNameForZeroValue (175.70s)
--- PASS: TestAccAWSLB_namePrefix (164.32s)
--- PASS: TestAccAWSLB_networkLoadbalancer_subnet_change (206.46s)
--- PASS: TestAccAWSLB_networkLoadbalancer_updateCrossZone (309.71s)
--- PASS: TestAccAWSLB_networkLoadbalancerEIP (253.74s)
--- PASS: TestAccAWSLB_NLB_AccessLogs (321.22s)
--- PASS: TestAccAWSLB_NLB_AccessLogs_Prefix (294.94s)
--- PASS: TestAccAWSLB_NLB_basic (211.48s)
--- PASS: TestAccAWSLB_noSecurityGroup (259.76s)
--- PASS: TestAccAWSLB_tags (247.25s)
--- PASS: TestAccAWSLB_updatedIpAddressType (227.20s)
--- PASS: TestAccAWSLB_updatedSecurityGroups (206.30s)
--- PASS: TestAccAWSLB_updatedSubnets (207.97s)
--- PASS: TestAccDataSourceAWSLB_basic (217.50s)
--- PASS: TestAccDataSourceAWSLBBackwardsCompatibility (160.35s)
@@ -103,6 +103,11 @@ func dataSourceAwsLb() *schema.Resource { | |||
Computed: true, | |||
}, | |||
|
|||
"drop_invalid_header_fields": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new attribute is missing documentation in website/docs/d/lb.html.markdown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah looks like that data source documentation is still using the older style of referencing the resource documentation:
See the [LB Resource](/docs/providers/aws/r/lb.html) for details on the
returned attributes - they are identical.
So this is fine. 👍
This has been released in version 2.54.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Closes #10862
Release note for CHANGELOG:
Output from acceptance testing: