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 DisableAnonymous to DelegatingAuthenticationOptions #112181
Conversation
Hi @xueqzhan. Thanks for your PR. I'm waiting for a kubernetes 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. |
/sig auth |
@@ -202,6 +202,9 @@ type DelegatingAuthenticationOptions struct { | |||
|
|||
// CustomRoundTripperFn allows for specifying a middleware function for custom HTTP behaviour for the authentication webhook client. | |||
CustomRoundTripperFn transport.WrapperFunc | |||
|
|||
// DisableAnonymous gives user an option to disable Anonymous authentication. | |||
DisableAnonymous bool |
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.
In this case, I think this negative phrasing is correct because it means that the zero-value of false
does the same thing the struct used to do.
A few notable things about this PR
/lgtm holding for a few days for comment. |
@deads2k not sure I follow what you mean on:
Wouldn't we want it bound to some flag so allow this to be configured? Regardless of the question above this LGTM. /ok-to-test |
By making the struct field public, the consuming code can set whatever default it likes and bind to whatever flag it prefers. All of our existing consumers are ok without being able to disallow anonymous. That makes kube-rbac-proxy look like a one-off. I'd prefer to make their use-case possible without adding unnecessary options for the majority. If enough callers want a standard flag, I'm open to adding it. /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, xueqzhan 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 |
/retest-required |
/hold cancel |
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR adds DisableAnonymous to DelegatingAuthenticationOptions. Currently, a user of DelegatingAuthenticationOptions has no option to disable Anonymous authentication. This has affected backward compatibility of some components seeking to migrate to the new apiserver functionality. kube-rbac-proxy is such an example.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: