fix(rbac): reduce pod permissions and add cert validity opt-in#892
Open
d-padmanabhan wants to merge 2 commits intoaws:mainfrom
Open
fix(rbac): reduce pod permissions and add cert validity opt-in#892d-padmanabhan wants to merge 2 commits intoaws:mainfrom
d-padmanabhan wants to merge 2 commits intoaws:mainfrom
Conversation
- Limit pods to get/list/watch - Keep only pods/status update/patch where needed - Remove unused pods/finalizers rules
Use webhookTLS.validityDays for generated webhook certificates and default to 36500 days to preserve existing behavior. Document 365-day opt-in and annual rotation guidance. Allow gen-webhook-secret.sh validity override via WEBHOOK_CERT_VALIDITY_DAYS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
bug
Which issue does this PR fix:
None linked. Split from the original hardening PR to isolate RBAC and webhook behavior changes.
What does this PR do / Why do we need it:
This PR focuses on the higher-risk changes that need deeper validation.
create/deleteand finalizer rulespods/statusupdate and patch accessWEBHOOK_ENABLEDwebhookTLS.validityDaysin Helm values36500days to preserve existing behavior365days for annual rotationscripts/gen-webhook-secret.shnow supportsWEBHOOK_CERT_VALIDITY_DAYSoverride36500365day opt-in indocs/guides/pod-readiness-gates.mdIf an issue # is not available please add repro steps and logs from aws-gateway-controller showing the issue:
Not applicable. No controller-runtime bug reproduction. This is a scoped hardening and configuration change.
Testing done on this change:
go test ./...bash -n scripts/gen-webhook-secret.shhelm template gateway-api-controller ./helmmake e2e-testattempted but blocked by environmentmake webhook-e2e-testattempted but blocked by environmente2e blocker output:
Automation added to e2e:
No.
Will this PR introduce any new dependencies?:
No.
Will this break upgrades or downgrades. Has updating a running cluster been tested?:
Default behavior remains unchanged because generated cert validity still defaults to
36500days.Clusters that opt in to
webhookTLS.validityDays=365must plan annual certificate rotation.Does this PR introduce any user-facing change?:
Yes. Helm users can now configure webhook cert validity via
webhookTLS.validityDays.Do all end-to-end tests successfully pass when running
make e2e-test?:No in this environment due missing cluster context and invalid AWS auth token.