You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# How to Use workload identity with Blob CSI driver
1
+
# workload identity support
2
+
> Note:
3
+
> - supported version: v1.22.0
4
+
> - workload identity is supported on OpenShift, capz and other self-managed clusters
5
+
> - workload identity is NOT supported on AKS **managed** Blob CSI driver since the driver controller is managed by AKS control plane which is already using [managed identity](https://learn.microsoft.com/en-us/azure/aks/use-managed-identity) by default, it's not necessary to use workload identity for AKS managed Blob CSI driver.
2
6
3
7
## Prerequisites
4
8
5
-
This document is mainly refer to [Azure AD Workload Identity Quick Start](https://azure.github.io/azure-workload-identity/docs/quick-start.html). Please Complete the [Installation guide](https://azure.github.io/azure-workload-identity/docs/installation.html) before the following steps.
9
+
Before proceeding with the following steps, please ensure that you have completed the [Workload Identity installation guide](https://azure.github.io/azure-workload-identity/docs/installation.html). After completing the installation, you should have already installed the mutating admission webhook and obtained the OIDC issuer URL for your cluster.
6
10
7
-
After you finish the Installation guide, you should have already:
If you are using AKS, you can get the resource group where Blob storage class reside by running:
40
-
41
-
```shell
42
-
export AZURE_BLOB_RESOURCE_GROUP="$(az aks show --name $CLUSTER_NAME --resource-group $CLUSTER_RESOURCE_GROUP --query "nodeResourceGroup" -o tsv)"
43
-
```
44
-
45
-
You can also create resource group by yourself, but you must [specify the resource group](https://github.com/cvvz/blob-csi-driver/blob/workload_identity/docs/driver-parameters.md) in the storage class while using Blob CSI driver:
36
+
## 2. Create an AAD application or user-assigned managed identity and grant required permissions
46
37
47
38
```shell
48
-
az group create -n $AZURE_BLOB_RESOURCE_GROUP -l $LOCATION
49
-
```
50
-
51
-
## 3. Create an AAD application or user-assigned managed identity and grant required permissions
52
-
53
-
```shell
54
-
# create an AAD application if using Azure AD Application for this tutorial
39
+
# create an AAD application if you are using Azure AD Application
55
40
az ad sp create-for-rbac --name "${APPLICATION_NAME}"
56
41
```
57
42
58
43
```shell
59
-
# create a user-assigned managed identity if using user-assigned managed identity for this tutorial
44
+
# create a user-assigned managed identity if you are using user-assigned managed identity
60
45
az group create -n ${IDENTITY_RESOURCE_GROUP} -l $LOCATION
61
46
az identity create --name "${USER_ASSIGNED_IDENTITY_NAME}" --resource-group "${IDENTITY_RESOURCE_GROUP}"
62
47
```
63
48
64
49
Grant required permission to the AAD application or user-assigned managed identity, for simplicity, we just assign Contributor role to the resource group where Blob storage class reside:
65
50
66
-
If using Azure AD Application:
51
+
- if you are using Azure AD Application:
67
52
68
53
```shell
69
54
export APPLICATION_CLIENT_ID="$(az ad sp list --display-name "${APPLICATION_NAME}" --query '[0].appId' -otsv)"
70
55
export AZURE_BLOB_RESOURCE_GROUP_ID="$(az group show -n $AZURE_BLOB_RESOURCE_GROUP --query 'id' -otsv)"
71
56
az role assignment create --assignee $APPLICATION_CLIENT_ID --role Contributor --scope $AZURE_BLOB_RESOURCE_GROUP_ID
72
57
```
73
58
74
-
if using user-assigned managed identity:
59
+
- if you are using user-assigned managed identity:
0 commit comments