Skip to content
This repository has been archived by the owner on Jul 5, 2021. It is now read-only.

Introduce namespace restriction #10

Closed
riccardomc opened this issue May 7, 2019 · 5 comments
Closed

Introduce namespace restriction #10

riccardomc opened this issue May 7, 2019 · 5 comments
Labels

Comments

@riccardomc
Copy link
Contributor

riccardomc commented May 7, 2019

It would be useful to restrict secrets injections to specific namespaces. Possibilities are:

  1. allow/deny regex in ExternalSecretBackend CR definition (depends on ExternalSecretBackend implementation Introduce Secret Backends implementation and CRDs #6 ) in metadata or parameters
  2. allow/deny regex in ExternalSecret CR definition
  3. Annotation in namespaces

1 should give more flexibility.

@iakat
Copy link
Contributor

iakat commented May 20, 2019

This is useful to @frankscholten when implementing 1Password, although might be a bit more dynamic #11 #12

@riccardomc
Copy link
Contributor Author

I'd like to have a discussion about this. Simplifying the architecture of the operator would also have a simpler security model and we could rely on RBAC to limit access.

We could drop the CRD introudced by #15 and limit an operator instance to one backend and let it watch only one namespace.

In this way we scope operator per namespace by RBAC and by Watch operation and avoid the risk of injecting, for example, prod secret into dev. If you want an additional backend, just run another operator with different backend type. I believe this is easier to reason about, but might be more resource intensive.

Notice that only the operator with the right backend type will actually create the Secret, all the other will gracefully fail with "backend not found".

@frankscholten
Copy link
Collaborator

I like this approach as it would simplify things a lot.

@riccardomc
Copy link
Contributor Author

I will try to implement this in #4 .

@riccardomc
Copy link
Contributor Author

This need to be documented, but it is implemented in #4 as RBAC roles.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants