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

Avoid putting secrets to ETCD #46

Closed
max-lobur opened this issue Apr 16, 2019 · 11 comments
Closed

Avoid putting secrets to ETCD #46

max-lobur opened this issue Apr 16, 2019 · 11 comments
Labels
core General to KES and not backend specific enhancement New feature or request Stale

Comments

@max-lobur
Copy link

max-lobur commented Apr 16, 2019

Current implementation creates an etcd object with base64 encoded secret, which may potentially leak later.

Allow to put secrets to a volume, e.g. add a mutation webhook which adds an initContainer, which fetches & writes secrets to a volume shared with a container.

Pros:

  • no secrets in etcd
  • iam role can be granularly assigned to each initContainer (based on namespace annotation for example) when using https://github.com/uswitch/kiam , no need to give access to all secrets to the controller
@silasbw
Copy link
Contributor

silasbw commented Apr 16, 2019

Hey @max-lobur, how much does using encryption at rest mitigate your concerns around etcd storage?

@max-lobur
Copy link
Author

max-lobur commented Apr 16, 2019

@silasbw
Copy link
Contributor

silasbw commented Apr 16, 2019

Thanks, that's helpful for understanding the potential priority of an addition like this.

@JacopoDaeli JacopoDaeli added the enhancement New feature or request label May 30, 2019
silasbw added a commit that referenced this issue Jun 2, 2019
Inlcude an example of using `npm run poll` as an Init Container. Part of the
design proposed here:

#46
silasbw added a commit that referenced this issue Jun 2, 2019
Inlcude an example of using `npm run poll` as an Init Container. Part of the
design proposed here:

#46
@silasbw
Copy link
Contributor

silasbw commented Jun 3, 2019

I did some planning for this and some initial implementation work:

Feel free to jump in a give feedback (especially on #78) or help out with coding 😛

@gazal-k
Copy link

gazal-k commented Feb 27, 2020

If etcd is encrypted does all of this still matter? My understanding is that EKS does encrypt etcd; aws/containers-roadmap#263 (comment). I haven't verified, but I assume EKS uses KMS to encrypt etcd.

@max-lobur
Copy link
Author

Yes it matters because it's unencrypted in etcd api / k8s api.

Implementation example https://github.com/cruise-automation/daytona
(fetching to in-mem volume)

@gazal-k
Copy link

gazal-k commented Feb 28, 2020

Can't K8s API access be controlled using rbac?

I understand that there are integrations for vault that don't store secrets in etcd. This one: https://github.com/banzaicloud/bank-vaults uses a mutating admission webhook.

I'm not suggesting that they're all getting it wrong. I'm just trying to fully understand it if I can.

@kuuji
Copy link

kuuji commented Mar 6, 2020

Yes it matters because it's unencrypted in etcd api / k8s api.

Implementation example https://github.com/cruise-automation/daytona
(fetching to in-mem volume)

You can encrypt the actual value in etcd on EKS this way -> https://aws.amazon.com/blogs/containers/using-eks-encryption-provider-support-for-defense-in-depth/

Note that this is not at rest, the kms encryption happens at the k8s api level, before it's stored in etcd.

I believe other k8s implementations should support envelope encryption with a CMK as well.

@IamViditAgarwal
Copy link

Hi,
Any update on this, when it will come live. Waiting to see it

@Flydiverny Flydiverny added the core General to KES and not backend specific label Jan 21, 2021
@github-actions
Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Apr 22, 2021
@github-actions
Copy link

This issue was closed because it has been stalled for 30 days with no activity.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
core General to KES and not backend specific enhancement New feature or request Stale
Projects
None yet
Development

No branches or pull requests

7 participants