Skip to content
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

fixed the mTLS bug https://github.com/kubernetes-sigs/aws-load-balanc… #3717

Conversation

shethyogita83
Copy link
Contributor

@shethyogita83 shethyogita83 commented May 24, 2024

Fixing mTLS bug : #3715

Issue

Description

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the docs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉
  • Refactored something and made the world a better place 🌟

Copy link

linux-foundation-easycla bot commented May 24, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: shethyogita83
Once this PR has been reviewed and has the lgtm label, please assign johngmyers for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label May 24, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @shethyogita83!

It looks like this is your first PR to kubernetes-sigs/aws-load-balancer-controller 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/aws-load-balancer-controller has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 24, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @shethyogita83. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 24, 2024
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 24, 2024
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 24, 2024
@oliviassss
Copy link
Collaborator

oliviassss commented May 28, 2024

Thanks for the fix, look good to me overall, some comments:

  1. https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/pkg/ingress/model_build_listener.go#L56, I think we need to avoid pass the MutualAuthentication obj with the API even when the value is nil
  2. https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/pkg/ingress/model_build_listener.go#L161. Need to add a nil check for mutualAuthenticationAttributes
  3. can you pls also test this manually and add the test cases in the PR description? Thanks.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels May 28, 2024
@shraddhabang
Copy link
Collaborator

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 28, 2024
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 30, 2024
@shethyogita83
Copy link
Contributor Author

Thanks for the fix, look good to me overall, some comments:

  1. https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/pkg/ingress/model_build_listener.go#L56, I think we need to avoid pass the MutualAuthentication obj with the API even when the value is nil
  2. https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/pkg/ingress/model_build_listener.go#L161. Need to add a nil check for mutualAuthenticationAttributes
  3. can you pls also test this manually and add the test cases in the PR description? Thanks.

Added tests for the same and also did manual testing by creating an alb without mutual auth annotation and with secure listeners port and protocol. Everything is working as expected.

@oliviassss
Copy link
Collaborator

@shethyogita83, thanks, how about these 2 comments?

  1. https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/pkg/ingress/model_build_listener.go#L56, I think we need to avoid pass the MutualAuthentication obj with the API even when the value is nil
  1. https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/pkg/ingress/model_build_listener.go#L161. Need to add a nil check for mutualAuthenticationAttributes

I think right now we are still passing the MutualAuthentication param (with nil value) to the API, if my understanding is correct, the param itself is not supported in the API for outposts and local zone? So it will still have issue when users deploy the controller in these zones? Unless I'm missing anything

- Both ARN and Name of trustStore are supported values.
- `trustStore` is required when mode is `verify`.
- `ignoreClientCertificateExpiry : true | false (default)`
!!!note
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please update this line as well? https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/docs/guide/ingress/annotations.md?plain=1#L61
We want to default value here to N/A since we are not setting from our side.

@shraddhabang
Copy link
Collaborator

/ok-to-test

shethyogita83 and others added 3 commits May 30, 2024 14:12
addressed comments

addressed comments

added tests

updated tests

updated tests

updated fix

updated annotation

fixed broken tests
@shraddhabang shraddhabang added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label May 30, 2024
@oliviassss oliviassss merged commit e5d625f into kubernetes-sigs:main May 31, 2024
4 of 5 checks passed
oliviassss pushed a commit to oliviassss/aws-load-balancer-controller that referenced this pull request May 31, 2024
* fixed the mTLS bug kubernetes-sigs#3715

* addressed comments

* addressed comments

* added tests

* updated tests

* updated tests

* updated fix

* updated annotation

* fixed the mTLS bug kubernetes-sigs#3715

addressed comments

addressed comments

added tests

updated tests

updated tests

updated fix

updated annotation

fixed broken tests
oliviassss added a commit that referenced this pull request May 31, 2024
* fixed the mTLS bug #3715

* addressed comments

* addressed comments

* added tests

* updated tests

* updated tests

* updated fix

* updated annotation

* fixed the mTLS bug #3715

addressed comments

addressed comments

added tests

updated tests

updated tests

updated fix

updated annotation

fixed broken tests

Co-authored-by: Yogita Sheth <30565146+shethyogita83@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants