Code Monkey home page Code Monkey logo

Comments (4)

cknowles avatar cknowles commented on May 29, 2024 1

I've updated to title to clarify that our case the differently named secrets are always required in the same namespace. I believe some other companies deploy feature branches to new namespaces so this would not deal with that problem but it's a start.

from sealed-secrets.

anguslees avatar anguslees commented on May 29, 2024

Brainstorming:

  • we have "exact namespace/name" (default) and "cluster-wide=true" (with annotation) at present. I think it would make sense to add "namespace-wide=true", and that such an option would be reasonably easy to understand the tradeoffs.
  • we could add a pattern match/substitute for name and/or namespace, that effectively encompasses everything between "exact match" and "don't care". I like the generality, but in practice I don't know of any common RBAC policies/mechanisms that allow creating namespace/resources within specified name prefixes (or patterns) like this. Afaik, the available k8s mechanisms are either "can't create $resource", "can create $resource called $this", or "can create $resource with any name", so I share your concern that adding a pattern match adds complexity and false security.
  • we could add an annotation that enumerated specific allowed namespaces/names. This is kind of like the pattern match, but I think is closer to the capabilities of what RBAC policy can also describe. Not sure if that usefully covers your use-case though.

from sealed-secrets.

cknowles avatar cknowles commented on May 29, 2024

Out of those ideas, I think the first option about namespace wide secrets makes the most sense. That's generally how permissions are modelled anyway and the context switching to that option seems relatively straight forward from an analysis point of view. So we'd end up with 3 different permission models. Perhaps even the annotation could be something like sealedsecrets.bitnami.com/permission-model or similar with allowed values of cluster, namespace, secret (default)?

Even though it was my initial idea, I've gone off the pattern thing. I think it's too complex. I agree with your assessment about other RBAC mechanisms. Kubernetes RBAC supports exact match resourceNames and probably won't support such expressions. See kubernetes/kubernetes#56582 and kubernetes/kubernetes#56603.

The last idea sounds interesting but would not work for our particular case since the version changes frequently, for some repos on every commit. So it'd be pretty much the same in terms of how many times we need to re-seal a secret.

from sealed-secrets.

cknowles avatar cknowles commented on May 29, 2024

Will look to submit a PR for this soon to allow setting different access control modes.

from sealed-secrets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.