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

Secret manager #17

Open
dbones opened this issue Jul 26, 2022 · 2 comments
Open

Secret manager #17

dbones opened this issue Jul 26, 2022 · 2 comments
Milestone

Comments

@dbones
Copy link
Member

dbones commented Jul 26, 2022

Secrets need to support

  • control cluster
  • downstream clusters
  • key encryption rotation
  • value needs to be backed-up or stored for DR
  • value can be rotated in 2 ways 1) change the value 2) create a second copy for rotation

Quick notes

secrets need to be stored in K8s (how the applications and logic access their secrets)

  • K8s Secret - good RBAC poor out-of-the-box encryption (can be set up tho) - everything supports this
  • Side Car - pulls from a KMS on the fly, input into a in-memory volume (super secure, apps need to be aware of rotation)
  • CSI - treats the KMS as a memory volume

ways to handle secrets

  • Vault / KMS - another component to manage, but does all the super hard stuff for you (CSI or Side Car)
  • Sealed Secrets / Git secrets - not as secure, as the secret will ultimately be stored as a K8s Secret, but pretty solid, real challenge is multi-cluster

design ideas

  • the Rotation should be handled by the modules that use them
  • secrets should be declared as a disired state, i.e. i want a secret which is 30 chars with nums and special chars (this will be used to create a secret by convention)

consider Hashi Vault + the library below

Image

@dbones dbones added this to the v Next milestone Jul 26, 2022
@dbones dbones moved this from 🆕 New to 📋 Backlog in dev.lab backlog Oct 15, 2022
@dbones
Copy link
Member Author

dbones commented Oct 15, 2022

@dbones
Copy link
Member Author

dbones commented Oct 19, 2022

apiVersion: lab.dev/v1
kind: Organization
metadata:
  name: dbones-labs
  namespace: lab # sets the org namespace
  labels:
    lab.dev/verison: 1
spec:
  service:
    retainFor: 300
  gitSecret:
    rotate: 43200

---

apiVersion: lab.dev/v1
kind: GitSecret
metadata:
  name: login-dbones
  namespace: spike
  labels:
    secrect.internal.lab.dev/component: postgres
    lab.dev/verison: 1
spec:
  password:
    length: 32
    azLower: true
    azUpper: true
    number: true
    special: true
    avoid: "\""

---

apiVersion: lab.dev/v1
kind: Postgres
metadata:
  name: spike
  namespace: frontier
  labels:
    lab.dev/verison: 1
spec:
  credentials: spike
  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant