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

Fix default permissions to be able to read secrets cluster wide #62

Closed
chrisdoherty4 opened this issue Aug 30, 2022 · 4 comments
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@chrisdoherty4
Copy link
Member

chrisdoherty4 commented Aug 30, 2022

The default RBAC deployed with Rufio doesn't let it read secrets across namespaces. This is problematic as secrets containing BMC credentials are referenced by Machine resources and could reside in a different namespace.

Kubernetes doesn't currently offer a way to model access to secrets referenced from existing objects so its common practice to allow cluster wide reads and let consumers reconfigure the RBAC to their needs on deployment.

@chrisdoherty4 chrisdoherty4 changed the title Fix default permissions to be able to read secrets Fix default permissions to be able to read secrets cluster wide Aug 30, 2022
@chrisdoherty4 chrisdoherty4 added this to the 0.2 milestone Aug 30, 2022
@pokearu
Copy link
Contributor

pokearu commented Aug 30, 2022

Is the idea to have cluster wide Secret read as the default RBAC or can we instead have the default manifest that Rufio generates to have everything namespaced?
This allows the users to modify the manifest to how they want their cluster permissions to looks like.

@chrisdoherty4
Copy link
Member Author

chrisdoherty4 commented Aug 30, 2022

I'm proposing cluster wide read access by default to enable a functional out of the box Rufio.

Trying to restrict to a subset of namespaces requires knowing what those namespaces are which isn't possible (for codification purposes) as the operator defines them. This approach is adopted by several open source projects already because Kubernetes doesn't offer a way to model transitive access.

I've been told transitive access is in the works upstream in Kubernetes and will allow operators to define I can read B if B is referenced by A and I have read access to A semantics which is really what we want.

@chrisdoherty4 chrisdoherty4 added the kind/bug Categorizes issue or PR as related to a bug. label Aug 30, 2022
@pokearu
Copy link
Contributor

pokearu commented Aug 31, 2022

I am fine with having cluster wide read on Secrets by default 👍 I see we do that on CAPT at the moment as well.
I believe that's how we had it originally but we wanted to make it namespaced, as discussed here.
Will update my PR to give cluster wide reads for now.

@chrisdoherty4
Copy link
Member Author

Fixed in #63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants