Skip to content
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

Research if controller is able to detect and fix changes between the webhook object and its related ClusterAdmissionPolicy/AdmissionPolicy configuration. #224

Closed
Tracked by #379
jvanz opened this issue May 17, 2022 · 2 comments · Fixed by #566 or #576

Comments

@jvanz
Copy link
Member

jvanz commented May 17, 2022

Verify if the Kubewarden controller is able to detect divergences between the webhook objects and the ClusterAdmissionPolicy/AdmissionPolicy configuration. If so, try to make the controller able to restore the webhook to the expected state. This issue trys to help mitigate the threat #4

NOTE: This is an issue created from RFC discussing the admission control threat model. It's created to allow the Kubewarden team discuss the proposed mitigation further and start to work on each actionable item when possible

@flavio
Copy link
Member

flavio commented Oct 20, 2023

We want the (Validating|Mutating)WebhookConfiguration object associated to a (Cluster)|AdmissionPolicy to be like our controller originally created it.

If a user changes these low level configuration objects, the controller should revert these changes.

@flavio flavio moved this to In Progress in Kubewarden Oct 20, 2023
@flavio flavio moved this from In Progress to Todo in Kubewarden Oct 20, 2023
@viccuad viccuad moved this from Todo to In Progress in Kubewarden Oct 23, 2023
@viccuad viccuad moved this from In Progress to Pending review in Kubewarden Oct 30, 2023
@github-project-automation github-project-automation bot moved this from Pending review to Done in Kubewarden Oct 31, 2023
@viccuad
Copy link
Member

viccuad commented Nov 2, 2023

Reopening, the feature was reverted from kubewarden-controller @main with #569.

The current approach was to set OwnerReferences on the webhooks and watch them, for the controller to retrigger the reconcile of policies, eventually reconciling the webhooks too.

One cannot set an OwnerReference on a dependent across namespaces, or in our case, an OwnerReference on a cluster-wide dependant resource where the owner is a namespace. See here. If the GC would allow this, it would need for info to leak between namespaces, to allow for resources in one namespace to block deletion of resources in another one, would need to check for racing conditions, etc.

@viccuad viccuad reopened this Nov 2, 2023
@viccuad viccuad moved this from Done to In Progress in Kubewarden Nov 2, 2023
@viccuad viccuad assigned fabriziosestito and unassigned viccuad Nov 13, 2023
@fabriziosestito fabriziosestito moved this from In Progress to Pending review in Kubewarden Nov 20, 2023
@fabriziosestito fabriziosestito moved this from Pending review to In Progress in Kubewarden Nov 20, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Kubewarden Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment