cluster-api-provider-azure icon indicating copy to clipboard operation
cluster-api-provider-azure copied to clipboard

Secure sensitive bootstrap data

Open CecileRobertMichon opened this issue 5 years ago • 14 comments

/kind feature

Describe the solution you'd like [A clear and concise description of what you want to happen.]

CAPI generates sensitive cluster data (such as private keys) for the apiserver, etcd, etc. These are stored as secrets in Kubernetes. The kubeadm bootstrapper copies the contents of the secrets into bootstrap data in the KubeadmConfig resource, which is then copied into the Machine resource. from https://github.com/kubernetes-sigs/cluster-api/issues/1739

CAPZ uses this bootstrap data as the user data for the VM/VMSS. If a user has read-only access to the VM via Azure API, this could grant them access to the user data, and therefore access to the sensitive data.

Azure recommends not placing any sensitive values in custom data https://docs.microsoft.com/en-us/azure/virtual-machines/custom-data#can-i-place-sensitive-values-in-custom-data.

We should secure the bootstrap data, for example by using Azure keyvault storage to store the data such that only the VM has access to that data, but not a user that has access to the VM.

/priority important-longterm /milestone next

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment:

  • cluster-api-provider-azure version:
  • Kubernetes version: (use kubectl version):
  • OS (e.g. from /etc/os-release):

CecileRobertMichon avatar Aug 31 '20 23:08 CecileRobertMichon

for example by using Azure keyvault storage to store the data such that only the VM has access to that data, but not a user that has access to the VM.

By "user that has access to the VM", do you mean access to the physical VM or the azure resource via the ARM api? I believe the files would still need to have to live on the VM it's self for kubeadm to do it's job?

jsturtevant avatar Sep 01 '20 00:09 jsturtevant

By "user that has access to the VM", do you mean access to the physical VM or the azure resource via the ARM api? I believe the files would still need to have to live on the VM it's self for kubeadm to do it's job?

The latter. Updated that sentence for clarity, thanks!

CecileRobertMichon avatar Sep 01 '20 00:09 CecileRobertMichon

/assign

devigned avatar Sep 25 '20 16:09 devigned

/milestone next

CecileRobertMichon avatar Oct 01 '20 15:10 CecileRobertMichon

/assign

shysank avatar Nov 16 '20 18:11 shysank

@shysank prefer starting work on this I would recommend reaching out to @randomvariable because some of this work might overlap with https://github.com/kubernetes-sigs/cluster-api/issues/3761

CecileRobertMichon avatar Nov 16 '20 18:11 CecileRobertMichon

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale

fejta-bot avatar Feb 14 '21 19:02 fejta-bot

/remove-lifecycle stale

CecileRobertMichon avatar Feb 16 '21 18:02 CecileRobertMichon

/remove-lifecycle stale

CecileRobertMichon avatar Feb 16 '21 18:02 CecileRobertMichon

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale

fejta-bot avatar May 17 '21 19:05 fejta-bot

/remove-lifecycle stale /lifecycle frozen

Handled as part of https://github.com/kubernetes-sigs/cluster-api/pull/4219

CecileRobertMichon avatar May 18 '21 18:05 CecileRobertMichon

/assign sonasingh46

sonasingh46 avatar Jul 25 '22 16:07 sonasingh46

/milestone v1.6

mboersma avatar Sep 29 '22 16:09 mboersma

@sonasingh46 - where are we at with this one?

dtzar avatar Apr 04 '23 21:04 dtzar