-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add support for enabling AWS Shield Advanced protection #1126
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
Conversation
Welcome @hhamalai! |
Hi @hhamalai. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
Wow, thanks so much for contributing! looks really good :D |
11f32ba
to
351012a
Compare
7132f35
to
f8857a9
Compare
/assign @bigkraig |
cab3849
to
aa16612
Compare
Hi, can @bigkraig give any feedback how to take this proposed change further? Should try to drag more review feedback or assign this into some person to review? |
I'll test this out today |
/lgtm I'll approve this first sine it looks good at itself.
|
Thanks for the great feedback, I'm happy to implement your suggestions and ping you once ready. |
aa16612
to
b8a68ea
Compare
881226b
to
73d2c42
Compare
Shield Advanced improvements - Add caching of AWS API requests - Add feature gate - When deleting protection, check protection name to match one indicating it was created by alb-ingress-controller alb-ingress-controller - Changed annotation semantics of shield-advanced-protection to: - 'true': enables protection - 'false': disables protection created by alb-ingress-controller - missing annoation: immediately returns from reconcile skipping all Shield related API calls
73d2c42
to
34b43e6
Compare
@M00nF1sh I've implemented & tested your proposed changes. Regarding the last one, it's now as you suggested, i.e. when the annotation is missing no Shield Advanced API calls are made. This means, as you noticed, that when annotation is absent, when it previously was present with shield protection enabled, the protection is left present. Other than leaving it as is, one option would be to go through the current protections in the cache (no API calls made before and will be made if the cache is empty). If there are cache items, then these would be tried to remove. Few issues with this:
|
@M00nF1sh Any comments on the suggested changes / how to push this forward? |
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hhamalai, M00nF1sh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thanks for making these changes, i think it's good enough to merge for now. |
Does this work for NLBs as well? |
@geofflancaster , aws-alb-ingress-controller project is about ALBs, not NLBs. If you need NLBs with Shield Advanced enabled, you can use Elastic IPs, enable Shield Advanced protection on those IPs, and associate the IPs with your NLB. |
Now that the load balancer controller supports NLBs, is there an NLB annotation to enable Shield Advanced? |
AFAIK Shield Advanced cannot be enabled directly on NLB, but for Elastic IPs attached to NLB instance with |
@hhamalai Since the Controller allows you to pass these EIPs as an optional parameter, Can we have |
Add support for enabling AWS Shield Advanced protection
When subscribed to AWS Shield Advanced service, the Shield protection must be turned on for each Application Load Balancer resource. While AWS offers automation to do this via services like Firewall Manager, their use cases are limited by their constraints (e.g., impossible to utilize rate-based WAF rules 1).
The proposed change adds an annotation for the ingress resource, which can is used to turn on the Shield Advanced protection for the load balancers created by aws-alb-ingress-controller.