openfaas/openfaas-cloud

Suggestion: Clean-up orphaned secrets

Open

#255 aperta il 30 set 2018

Vedi su GitHub
 (4 commenti) (0 reazioni) (0 assegnatari)Go (222 fork)auto 404
area/securitydesign/reviewhelp wantedpriority/highskill/intermediate

Metriche repository

Star
 (770 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Expected Behaviour

When a secret is no longer bound to a function it should be reclaimed

Current Behaviour

These are removed manually

Possible Solution

Initially perhaps we could reclaim SealedSecrets on a periodic basis via cron / kubectl? this would cause the SealedSecrets controller to remove the Secret from Kubernetes.

We may also want to look into updating import-secrets so that it can remove as well as create SealedSecrets. Alternatively garbage-collect may need extending.

Please make some suggestions on pros/cons before working on this.

Also in scope is documenting the behaviour when complete in the docs/README.md file.

Steps to Reproduce (for bugs)

  1. Add a SealedSecret to your repo and function
  2. Deploy function and check it can access the secret
  3. Remove the secret from the repo (this does another push and the new version of the function will have no secrets attached, but the secret will still exist)

Guida contributor