examples icon indicating copy to clipboard operation
examples copied to clipboard

Security best practices: AKS example re-using existing AzureServicePrincipal rather than creating new one

Open Aaronontheweb opened this issue 5 years ago • 1 comments

From a security perspective, in order to run a Pulumi script that creates an Azure AD service principal, which all of these Azure Kubernetes Service examples do, you have to grant the service principal that is actually running the Pulumi deployment ownership permission over the entire Azure subscription. Not ideal from a "least privilege" point of view.

I would love to see some examples around AKS that try to reduce the amount of permission the Pulumi script needs in order to run - perhaps have the SP that is running the script be the owner the resources created? Something along those lines would be great.

Aaronontheweb avatar Jul 04 '20 16:07 Aaronontheweb

There's also the AKS managed identity which eliminates the need for a manual service principal, though I'm not sure which permissions you need for that: https://docs.microsoft.com/en-us/azure/aks/use-managed-identity

0x53A avatar Jul 27 '21 13:07 0x53A