Repository navigation
Add e2e tests for webhook grants passing through authz gates - #4517
Conversation
|
Hi @souvik-biswas-dev. Thanks for your PR. I'm waiting for a kcp-dev 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. DetailsInstructions 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. |
|
Once #4507 is merged this needs rebase . Moving to draft for now. 4507 is tagged so should be ok to rebase in few minutes |
Signed-off-by: Souvik Biswas <souvikbiswas.dev@gmail.com>
4d465f1 to
1425d82
Compare
|
Rebased onto main now that #4507 has merged; the PR is down to the single test file. Could someone with org access run /ok-to-test? One heads-up: these tests use framework.SerialSuite since they start their own server. I noticed a few other tests (e.g. TestMaximalPermissionPolicyWebhookEscalation) still use framework.Suite(t, "control-plane"), which I couldn't find enabled anywhere in the Makefile or CI config, so they may be getting skipped. Happy to open a separate issue if that's useful. |
|
/kind cleanup |
|
/ok-to-test |
|
LGTM label has been added. DetailsGit tree hash: f0a5222113d9e72a36954680208d3cd285788e04 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ntnn The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary
Adds e2e coverage proving that an authorization webhook decision cannot
get around the authz gates introduced in #4507:
still ends in Forbidden (required-groups gate).
apibindings/status still ends in Forbidden (system CRD gate).
(webhook ordered ahead of RBAC).
Each case has a control step showing the webhook grant works where no
gate applies. I also checked that the tests fail when the corresponding
gate is disabled.
I did not extract the closure into a
chainAuthorizerfunction (markedoptional in the issue). Happy to follow up with that and a unit test.
What Type of PR Is This?
/kind cleanup
Related Issue(s)
Fixes #4512
Release Notes