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

Leverage Authorizer instead of Admission webhook to enforce etcd cluster resource protection #1001

Open
unmarshall opened this issue Feb 13, 2025 · 0 comments
Labels
area/control-plane Control plane related kind/enhancement Enhancement, improvement, extension kind/technical-debt Something that is only solved on the surface, but requires more (re)work to be done properly

Comments

@unmarshall
Copy link
Contributor

unmarshall commented Feb 13, 2025

How to categorize this issue?

/area control-plane
/kind enhancement
/kind technical-debt
/kind task

What would you like to be added:
Currently etcd-druid provides protection against accidental or malicious attempts to update/delete etcd-cluster resources that are provisioned by etcd-druid for every Etcd custom resource. More details about it can be found here.

The initial implementation choice was to use Admission Webhook, more precisely validating webhook. While this serves the current purpose, it is not really a good fit semantically. Validating webhooks are usually meant to validate resources. In this webhook no validation of Etcd resource is done, instead it reacts on what kind of verb is invoked on a managed resource (by etcd-druid) and if that is authorized for that user.

This fits perfectly to an Authorizer.
Additional information: https://kubernetes.io/docs/reference/access-authn-authz/authorization/
Authorizers are called after Authentication and before invoking the Admission webhooks (ref: https://kubernetes.io/docs/concepts/security/controlling-access/)

We should change from using a validating admission webhook to an authorizer.

@gardener-robot gardener-robot added area/control-plane Control plane related kind/enhancement Enhancement, improvement, extension labels Feb 13, 2025
@unmarshall unmarshall added the kind/technical-debt Something that is only solved on the surface, but requires more (re)work to be done properly label Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/control-plane Control plane related kind/enhancement Enhancement, improvement, extension kind/technical-debt Something that is only solved on the surface, but requires more (re)work to be done properly
Projects
None yet
Development

No branches or pull requests

2 participants