Skip to content

Commit 39e90a8

Browse files
Merge pull request #259968 from nathaniel-msft/csi-driver-2
SEO changes to CSI Driver Step 2
2 parents 4266b1c + 8345346 commit 39e90a8

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

articles/aks/csi-secrets-store-identity-access.md

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,38 @@
11
---
2-
title: Provide an access identity to the Azure Key Vault provider for Secrets Store CSI Driver for Azure Kubernetes Service (AKS) secrets
3-
description: Learn how to integrate the Azure Key Vault provider for Secrets Store CSI Driver with your Azure key vault.
2+
title: Access Azure Key Vault with the CSI Driver Identity Provider
3+
description: Learn how to integrate the Azure Key Vault Provider for Secrets Store CSI Driver with your Azure credentials and user identities.
44
author: nickomang
55
ms.author: nickoman
66
ms.topic: article
7-
ms.date: 10/19/2023
7+
ms.date: 12/01/2023
88
ms.custom: devx-track-azurecli, devx-track-linux
99
---
1010

11-
# Provide an identity to access the Azure Key Vault provider for Secrets Store CSI Driver in Azure Kubernetes Service (AKS)
11+
# Connect your Azure identity provider to the Azure Key Vault Secrets Store CSI Driver in Azure Kubernetes Service (AKS)
1212

13-
The Secrets Store CSI Driver on Azure Kubernetes Service (AKS) provides various methods of identity-based access to your Azure Key Vault. This article outlines these methods and how to use them to access your key vault and its contents from your AKS cluster.
13+
The Secrets Store Container Storage Interface (CSI) Driver on Azure Kubernetes Service (AKS) provides various methods of identity-based access to your Azure Key Vault. This article outlines these methods and best practices for when to use Role-based access control (RBAC) or OpenID Connect (OIDC) security models to access your key vault and AKS cluster.
1414

1515
You can use one of the following access methods:
1616

1717
- [Microsoft Entra Workload ID](#access-with-a-microsoft-entra-workload-id)
1818
- [User-assigned managed identity](#access-with-a-user-assigned-managed-identity)
1919

20-
## Prerequisites
20+
## Prerequisites for CSI Driver
2121

22-
- Before you begin, make sure you followed the steps in [Use the Azure Key Vault provider for Secrets Store CSI Driver in an Azure Kubernetes Service (AKS) cluster][csi-secrets-store-driver] to create an AKS cluster with Azure Key Vault provider for Secrets Store CSI Driver support.
22+
- Before you begin, make sure you finish the steps in [Use the Azure Key Vault provider for Secrets Store CSI Driver in an Azure Kubernetes Service (AKS) cluster][csi-secrets-store-driver] to enable the Azure Key Vault Secrets Store CSI Driver in your AKS cluster.
2323

2424
<a name='access-with-an-azure-ad-workload-identity'></a>
2525

2626
## Access with a Microsoft Entra Workload ID
2727

28-
A [Microsoft Entra Workload ID][workload-identity] is an identity that an application running on a pod uses that authenticates itself against other Azure services that support it, such as Storage or SQL. It integrates with the native Kubernetes capabilities to federate with external identity providers. In this security model, the AKS cluster acts as token issuer. Microsoft Entra ID then uses OpenID Connect (OIDC) to discover public signing keys and verify the authenticity of the service account token before exchanging it for a Microsoft Entra token. Your workload can exchange a service account token projected to its volume for a Microsoft Entra token using the Azure Identity client library using the Azure SDK or the Microsoft Authentication Library (MSAL).
28+
A [Microsoft Entra Workload ID][workload-identity] is an identity that an application running on a pod uses to authenticate itself against other Azure services, such as workloads in software. The Storage Store CSI Driver integrates with native Kubernetes capabilities to federate with external identity providers.
29+
30+
In this security model, the AKS cluster acts as token issuer. Microsoft Entra ID then uses OIDC to discover public signing keys and verify the authenticity of the service account token before exchanging it for a Microsoft Entra token. For your workload to exchange a service account token projected to its volume for a Microsoft Entra token, you need the Azure Identity client library in the Azure SDK or the Microsoft Authentication Library (MSAL)
2931

3032
> [!NOTE]
3133
>
3234
> - This authentication method replaces Microsoft Entra pod-managed identity (preview). The open source Microsoft Entra pod-managed identity (preview) in Azure Kubernetes Service has been deprecated as of 10/24/2022.
33-
> - Microsoft Entra Workload ID is supported on both Windows and Linux clusters.
35+
> - Microsoft Entra Workload ID is supports both Windows and Linux clusters.
3436
3537
### Configure workload identity
3638

@@ -70,7 +72,7 @@ A [Microsoft Entra Workload ID][workload-identity] is an identity that an applic
7072
echo $AKS_OIDC_ISSUER
7173
```
7274
73-
5. Establish a federated identity credential between the Microsoft Entra application and the service account issuer and subject. Get the object ID of the Microsoft Entra application using the following commands. Make sure to update the values for `serviceAccountName` and `serviceAccountNamespace` with the Kubernetes service account name and its namespace.
75+
5. Establish a federated identity credential between the Microsoft Entra application, service account issuer, and subject. Get the object ID of the Microsoft Entra application using the following commands. Make sure to update the values for `serviceAccountName` and `serviceAccountNamespace` with the Kubernetes service account name and its namespace.
7476
7577
```bash
7678
export SERVICE_ACCOUNT_NAME="workload-identity-sa" # sample name; can be changed
@@ -126,7 +128,7 @@ A [Microsoft Entra Workload ID][workload-identity] is an identity that an applic
126128
```
127129
128130
> [!NOTE]
129-
> If you use `objectAlias` instead of `objectName`, make sure to update the YAML script.
131+
> If you use `objectAlias` instead of `objectName`, update the YAML script to account for it.
130132
131133
8. Deploy a sample pod using the `kubectl apply` command and the following YAML script.
132134
@@ -161,9 +163,17 @@ A [Microsoft Entra Workload ID][workload-identity] is an identity that an applic
161163
EOF
162164
```
163165
164-
## Access with a user-assigned managed identity
166+
<a name='access-with-a-user-assigned-managed-identity'></a>
167+
168+
## Access with managed identity
169+
170+
A [Microsoft Entra Managed ID][managed-identity] is an identity that an administrator uses to authenticate themselves against other Azure services. The managed identity uses RBAC to federate with external identity providers.
171+
172+
In this security model, you can grant access to your cluster's resources to team members or tenants sharing a managed role. The role is checked for scope to access the keyvault and other credentials. When you [enabled the Azure Key Vault provider for Secrets Store CSI Driver on your AKS Cluster](./csi-secrets-store-driver.md#create-an-aks-cluster-with-azure-key-vault-provider-for-secrets-store-csi-driver-support), it created a user identity.
173+
174+
### Configure managed identity
165175
166-
1. Access your key vault using the [`az aks show`][az-aks-show] command and the user-assigned managed identity created by the add-on when you [enabled the Azure Key Vault provider for Secrets Store CSI Driver on your AKS Cluster](./csi-secrets-store-driver.md#create-an-aks-cluster-with-azure-key-vault-provider-for-secrets-store-csi-driver-support).
176+
1. Access your key vault using the [`az aks show`][az-aks-show] command and the user-assigned managed identity created by the add-on.
167177
168178
```azurecli-interactive
169179
az aks show -g <resource-group> -n <cluster-name> --query addonProfiles.azureKeyvaultSecretsProvider.identity.clientId -o tsv
@@ -177,7 +187,7 @@ A [Microsoft Entra Workload ID][workload-identity] is an identity that an applic
177187
az vm identity assign -g <resource-group> -n <agent-pool-vm> --identities <identity-resource-id>
178188
```
179189
180-
2. Create a role assignment that grants the identity permission to access the key vault secrets, access keys, and certificates using the [`az role assignment create`][az-role-assignment-create] command.
190+
2. Create a role assignment that grants the identity permission access to the key vault secrets, access keys, and certificates using the [`az role assignment create`][az-role-assignment-create] command.
181191
182192
```azurecli-interactive
183193
export IDENTITY_CLIENT_ID="$(az identity show -g <resource-group> --name <identity-name> --query 'clientId' -o tsv)"
@@ -258,9 +268,9 @@ A [Microsoft Entra Workload ID][workload-identity] is an identity that an applic
258268
kubectl apply -f pod.yaml
259269
```
260270
261-
## Validate the secrets
271+
## Validate Key Vault secrets
262272
263-
After the pod starts, the mounted content at the volume path that you specified in your deployment YAML is available. Use the following commands to validate your secrets and print a test secret.
273+
After the pod starts, the mounted content at the volume path specified in your deployment YAML is available. Use the following commands to validate your secrets and print a test secret.
264274
265275
1. Show secrets held in the secrets store using the following command.
266276
@@ -276,7 +286,7 @@ After the pod starts, the mounted content at the volume path that you specified
276286
277287
## Obtain certificates and keys
278288
279-
The Azure Key Vault design makes sharp distinctions between keys, secrets, and certificates. The certificate features of the Key Vault service were designed to make use of key and secret capabilities. When you create a key vault certificate, it creates an addressable key and secret with the same name. The key allows key operations, and the secret allows the retrieval of the certificate value as a secret.
289+
The Azure Key Vault design makes sharp distinctions between keys, secrets, and certificates. The certificate features of the Key Vault service are designed to make use of key and secret capabilities. When you create a key vault certificate, it creates an addressable key and secret with the same name. This key allows authentication operations, and the secret allows the retrieval of the certificate value as a secret.
280290
281291
A key vault certificate also contains public x509 certificate metadata. The key vault stores both the public and private components of your certificate in a secret. You can obtain each individual component by specifying the `objectType` in `SecretProviderClass`. The following table shows which objects map to the various resources associated with your certificate:
282292
@@ -286,7 +296,7 @@ A key vault certificate also contains public x509 certificate metadata. The key
286296
|`cert`|The certificate, in PEM format.|No|
287297
|`secret`|The private key and certificate, in PEM format.|Yes|
288298
289-
## Disable the Azure Key Vault provider for Secrets Store CSI Driver on an existing AKS cluster
299+
## Disable the addon on existing clusters
290300
291301
> [!NOTE]
292302
> Before you disable the add-on, ensure that *no* `SecretProviderClass` is in use. Trying to disable the add-on while a `SecretProviderClass` exists results in an error.
@@ -313,6 +323,7 @@ In this article, you learned how to create and provide an identity to access you
313323
[az-aks-show]: /cli/azure/aks#az-aks-show
314324
[az-identity-federated-credential-create]: /cli/azure/identity/federated-credential#az-identity-federated-credential-create
315325
[workload-identity]: ./workload-identity-overview.md
326+
[managed-identity]:/entra/identity/managed-identities-azure-resources/overview
316327
[az-account-set]: /cli/azure/account#az-account-set
317328
[az-identity-create]: /cli/azure/identity#az-identity-create
318329
[az-role-assignment-create]: /cli/azure/role/assignment#az-role-assignment-create

0 commit comments

Comments
 (0)