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
[StructuredAuthorizationConfig] - CEL integration #121223
Conversation
0fb33d4
to
e3eb5ab
Compare
/retest |
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.
Initial feedback, still looking through the PR.
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
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
Hello! |
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
@MaryamTavakkoli Yes it is. |
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
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
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
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
staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation_test.go
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation_test.go
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/pkg/authorization/cel/compile_test.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
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_test.go
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook_v1_test.go
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook_v1_test.go
Show resolved
Hide resolved
/test pull-kubernetes-e2e-kind-ipv6 |
staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
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
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
Show resolved
Hide resolved
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
staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
Comments in WebhookAuthorizer#match are the only ones where the current behavior doesn't look correct and needs to be fixed up and tested. Other comments are tweaks / suggestions about naming, feature gate checking, micro-optimizations, etc. I'm open to discussion on those or if you want to follow-up. In a follow-up (ideally before test freeze), it would also be good to add a benchmark around compilation and evaluation in a follow-up so we can quantify the cost of putting match expressions of a few different levels of complexity in a webhook and make sure our evaluation is as cheap / fast as we think it is. |
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
/retest |
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go
Outdated
Show resolved
Hide resolved
can go ahead and squash down when you address the last couple comments, and we'll be all set 🎉 |
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
/lgtm |
LGTM label has been added. Git tree hash: 482814d076dfb1332a0d1b48686acb0fca044648
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, ritazh 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 |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Add functions to authorization for validating / compiling / evaluating expressions with subjectAccessReview context
Which issue(s) this PR fixes:
Fixes #118873
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
/sig auth
/triage accepted
/milestone v1.29
/priority important-soon