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

Implement client cert auth #357

Merged

Conversation

wtzhang23
Copy link
Contributor

Description

Signed-off-by: William <wtzhang23@gmail.com>
@cert-manager-prow cert-manager-prow bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 23, 2024
@cert-manager-prow
Copy link
Contributor

Hi @wtzhang23. Thanks for your PR.

I'm waiting for a cert-manager 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.

@cert-manager-prow cert-manager-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 23, 2024
@SgtCoDFish
Copy link
Member

/ok-to-test

@cert-manager-prow cert-manager-prow bot added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 30, 2024
@SgtCoDFish
Copy link
Member

Hey, thanks for raising this! I think this makes sense and it's a well made PR!

I don't really know how to evaluate the security impact of this (I'm not an istio expert). I don't know if having client cert auth enabled by default is a safe thing in all cases. It seems fairly safe in this context, though, since obviously the admin will have chosen which certs go into the trust store to use for checking client certs.

I'm reluctant to enable this by default just because it expands the auth surface area and as said above I'm nervous of that.

Do you think we could add a boolean flag (and a corresponding Helm chart bool) which allows users to opt-in to client cert auth? I feel like then it's super easy to merge this feature.

@wtzhang23
Copy link
Contributor Author

Istio's own managed CA does enable it by default here, however I agree it is something that would be useful. Will try to add it.

@cert-manager-prow cert-manager-prow bot added dco-signoff: no Indicates that at least one commit in this pull request is missing the DCO sign-off message. and removed dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. labels Jul 31, 2024
wtzhang23 and others added 2 commits July 31, 2024 05:55
Signed-off-by: William <wtzhang23@gmail.com>
Signed-off-by: William <wtzhang23@gmail.com>
@wtzhang23 wtzhang23 force-pushed the support-client-cert-auth branch from ba6ec10 to 553da99 Compare July 31, 2024 12:58
@cert-manager-prow cert-manager-prow bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. and removed dco-signoff: no Indicates that at least one commit in this pull request is missing the DCO sign-off message. labels Jul 31, 2024
Signed-off-by: William <wtzhang23@gmail.com>
Signed-off-by: William <wtzhang23@gmail.com>
Signed-off-by: William <wtzhang23@gmail.com>
Signed-off-by: William <wtzhang23@gmail.com>
Signed-off-by: William <wtzhang23@gmail.com>
@wtzhang23
Copy link
Contributor Author

wtzhang23 commented Jul 31, 2024

Added the flag in a separate authenticators block in case there comes a need for more authenticators in the future. Istio seems to support based on the highlighted code:

  • client cert
  • k8s sa token
  • jwt
  • cidrs

as well as toggles that disable authentication in a trusted network (my guess is they only need the cert for multicluster / SPIFFE federation).

Copy link
Member

@SgtCoDFish SgtCoDFish left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Thank you for this! Really appreciate the work you've put into it!

With this being gated behind a flag I think this is a really safe bet to add. I'm hoping to do an istio-csr release pretty soon, so please do test it when the release is out 🚀

@cert-manager-prow cert-manager-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2024
@cert-manager-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SgtCoDFish

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 31, 2024
@cert-manager-prow cert-manager-prow bot merged commit f919e50 into cert-manager:main Jul 31, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. ok-to-test size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Istio sidecar can only request new cert using istio-token
2 participants