fix(security): delegate dangerous CR controls#499
Merged
Conversation
Signed-off-by: Roel de Cort <roel.decort@adfinis.com>
Signed-off-by: Roel de Cort <roel.decort@adfinis.com>
Signed-off-by: Roel de Cort <roel.decort@adfinis.com>
Signed-off-by: Roel de Cort <roel.decort@adfinis.com>
Signed-off-by: Roel de Cort <roel.decort@adfinis.com>
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.
Summary
This PR adds delegated RBAC checks for CR fields that let a CR author influence custom executables, restore executables, or Hardened image-verification trust roots.
The main behavior change is that ordinary
OpenBaoCluster/OpenBaoRestorewrite access is no longer enough to configure these dangerous controls:spec.initContainer.imagespec.backup.imagespec.upgrade.imageprePromotionHookspec.plugins[].imagespec.plugins[].commandOpenBaoRestore.spec.imagespec.imageVerification/spec.operatorImageVerificationtrust-root materialNew delegated verbs:
usecustomexecutablesfor custom helper, hook, plugin, upgrade, backup, and restore executablesuseimagetrustrootsfor custom Hardened image-verification trust rootsusehelperimagesremains accepted as a compatibility alias for existing delegated helper-image RBAC, but new bindings should useusecustomexecutables.The docs and RBAC samples were updated to describe the new delegation model and the migration impact.
Related Issues
Security audit follow-up. No public issue linked yet.
Type of Change
Risk and Compatibility
This is intentional security hardening with compatibility impact.
Existing workloads are not changed by this PR, but future creates or updates are denied when a dangerous field is present and the requesting identity lacks the delegated verb. This applies even if the update changes an unrelated field, because the dangerous field remains part of the persisted spec.
Operational impact:
usecustomexecutableson the targetOpenBaoCluster.usehelperimagesgrants continue to authorize the executable controls as a compatibility alias.useimagetrustroots.This should be called out in the release notes for the release line.
Verification
Ran:
Broader e2e was not run for this slice. The change is admission/RBAC/docs focused, and the envtest coverage exercises the deny/allow paths for the new delegated verbs.
Reviewer Notes
Before merge, double-check:
usecustomexecutablesplususehelperimagescompatibility is the intended RBAC contractuseimagetrustrootsis scoped correctly to custom Hardened trust roots while preserving official defaultsChecklist