-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Support multiple JWT authenticators with structured authn config #123431
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
Support multiple JWT authenticators with structured authn config #123431
Conversation
/kind api-change |
/sig auth |
/assign enj liggitt |
da93751
to
266024a
Compare
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
// remove the 1 authenticator limit check and add set the limit to 64. | ||
if len(c.JWT) > 1 { | ||
allErrs = append(allErrs, field.TooMany(root, len(c.JWT), 1)) | ||
if len(c.JWT) > 64 { |
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.
Sorry, I haven't followed all the changes but why 64 ? Performance ?
Shouldn't that number rather be a documented constant such as MaximumAuthenticatorNumber
so it may be more easily changed ?
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.
See #122809 (comment) for more details.
Shouldn't that number rather be a documented constant such as
MaximumAuthenticatorNumber
so it may be more easily changed ?
I can do this.
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.
Not sure if using a documented constant here matters much since the ideal long term is to remove the limit altogether (i.e. before GA seems best). The number itself is also somewhat arbitrary since we didn't want to impact any normal use case, and just want to avoid users getting stuck in a bad edge case.
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.
I see your point, then I think it would be good to keep a comment or maybe a todo in order to not lose the link to the original decision and wonder later on why that 64.
A comment about it in the commit message would also be of value.
/hold add duplicate discovery url check after #123527 is merged. |
staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation.go
Show resolved
Hide resolved
266024a
to
0251f15
Compare
/hold cancel Added the duplicate discovery url check. |
staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation.go
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation.go
Outdated
Show resolved
Hide resolved
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.
a couple nits, lgtm otherwise. @enj, anything else from your side?
staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation.go
Outdated
Show resolved
Hide resolved
0251f15
to
7f00ade
Compare
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
7f00ade
to
39e1c91
Compare
/lgtm |
LGTM label has been added. Git tree hash: 1d9ddb730e1607dc6b5d54ff7e97546913e411c3
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aramase, liggitt 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 |
/test pull-kubernetes-e2e-gce |
/kind feature
part of #121553