Skip to content

Commit a5f536b

Browse files
Add workload identity support
1 parent ebaf548 commit a5f536b

File tree

1 file changed

+39
-4
lines changed

1 file changed

+39
-4
lines changed

articles/azure-app-configuration/reference-kubernetes-provider.md

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ If the `spec.auth` property isn't set, the system-assigned managed identity is u
3838
|---|---|---|---|
3939
|managedIdentityClientId|The Client ID of user-assigned managed identity|false|string|
4040
|servicePrincipalReference|The name of the Kubernetes Secret that contains the credentials of a service principal|false|string|
41+
|workloadIdentity|The settings for using workload identity|false|object|
42+
43+
The `spec.auth.workloadIdentity` property has the following child property.
44+
45+
|Name|Description|Required|Type|
46+
|---|---|---|---|
47+
|managedIdentityClientId|The Client ID of user-assigned managed identity|true|string|
4148

4249
The `spec.keyValues` has the following child properties. The `spec.keyValues.keyVaults` property is required if any Key Vault references are expected to be downloaded.
4350

@@ -74,15 +81,17 @@ If the `spec.keyValues.keyVaults.auth` property isn't set, the system-assigned m
7481
|---|---|---|---|
7582
|managedIdentityClientId|The client ID of a user-assigned managed identity used for authentication with vaults that don't have individual authentication methods specified|false|string|
7683
|servicePrincipalReference|The name of the Kubernetes Secret that contains the credentials of a service principal used for authentication with vaults that don't have individual authentication methods specified|false|string|
84+
|workloadIdentity|The settings for using workload identity for authentication with vaults that don't have individual authentication methods specified|false|object|
7785
|vaults|The authentication methods for individual vaults|false|object array|
7886

79-
The authentication method of each *vault* can be specified with the following properties. One of `managedIdentityClientId` and `servicePrincipalReference` must be provided.
87+
The authentication method of each *vault* can be specified with the following properties. One of `managedIdentityClientId`, `servicePrincipalReference` or `workloadIdentity` must be provided.
8088

8189
|Name|Description|Required|Type|
8290
|---|---|---|---|
8391
|uri|The URI of a vault|true|string|
8492
|managedIdentityClientId|The client ID of a user-assigned managed identity used for authentication with a vault|false|string|
8593
|servicePrincipalReference|The name of the Kubernetes Secret that contains the credentials of a service principal used for authentication with a vault|false|string|
94+
|workloadIdentity|The settings for using workload identity for authentication with a vault|false|object|
8695

8796
The `spec.keyValues.refresh` property has the following child properties.
8897

@@ -119,7 +128,7 @@ The `spec.keyValues.refresh.monitoring.keyValues` is an array of objects, which
119128
configMapName: configmap-created-by-appconfig-provider
120129
```
121130
122-
#### Use User-Assigned Managed Identity
131+
#### Use User-Assigned Managed Identity at cluster level
123132
124133
1. [Create a user-assigned managed identity](/azure/active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities#create-a-user-assigned-managed-identity) and note down its client ID after creation.
125134
1. [Assign the user-assigned managed identity to the virtual machine scale set](/azure/active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vmss#user-assigned-managed-identity) used by the Azure Kubernetes Service (AKS) cluster.
@@ -139,7 +148,7 @@ The `spec.keyValues.refresh.monitoring.keyValues` is an array of objects, which
139148
managedIdentityClientId: <your-managed-identity-client-id>
140149
```
141150

142-
#### Use Service Principal
151+
#### Use Service Principal at cluster level
143152

144153
1. [Create a Service Principal](/azure/active-directory/develop/howto-create-service-principal-portal)
145154
1. [Grant the service principal **App Configuration Data Reader** role](/azure/azure-app-configuration/howto-integrate-azure-managed-service-identity#grant-access-to-app-configuration) in Azure App Configuration.
@@ -159,10 +168,36 @@ The `spec.keyValues.refresh.monitoring.keyValues` is an array of objects, which
159168
servicePrincipalReference: <your-service-principal-secret-name>
160169
```
161170

171+
#### Use workload identity at pod level
172+
173+
1. [Enable Workload Identity](/azure/aks/workload-identity-deploy-cluster#update-an-existing-aks-cluster) on the Azure Kubernetes Service (AKS) cluster.
174+
1. [Get the OIDC issuer URL](/azure/aks/workload-identity-deploy-cluster#retrieve-the-oidc-issuer-url) of the AKS cluster.
175+
1. [Create a user-assigned managed identity](/azure/active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities#create-a-user-assigned-managed-identity) and note down its client ID after creation.
176+
1. Create the federated identity credential between the managed identity, OIDC issuer, and subject using the az identity federated-credential create command.
177+
``` bash
178+
az identity federated-credential create --name ${FEDERATED_IDENTITY_CREDENTIAL_NAME} --identity-name "${USER_ASSIGNED_IDENTITY_NAME}" --resource-group "${RESOURCE_GROUP}" --issuer "${AKS_OIDC_ISSUER}" --subject system:serviceaccount:azappconfig-system:az-appconfig-k8s-provider --audience api://AzureADTokenExchange
179+
```
180+
1. [Grant the user-assigned managed identity **App Configuration Data Reader** role](/azure/active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vmss#user-assigned-managed-identity) in Azure App Configuration.
181+
1. Set the `spec.auth.workloadIdentity.managedIdentityClientId` property to the client ID of the user-assigned managed identity in the following sample `AzureAppConfigurationProvider` resource and deploy it to the AKS cluster.
182+
183+
``` yaml
184+
apiVersion: azconfig.io/v1beta1
185+
kind: AzureAppConfigurationProvider
186+
metadata:
187+
name: appconfigurationprovider-sample
188+
spec:
189+
endpoint: <your-app-configuration-store-endpoint>
190+
target:
191+
configMapName: configmap-created-by-appconfig-provider
192+
auth:
193+
workloadIdentity:
194+
managedIdentityClientId: <your-managed-identity-client-id>
195+
```
196+
162197
#### Use Connection String
163198

164199
1. Create a Kubernetes Secret in the same namespace as the `AzureAppConfigurationProvider` resource and add Azure App Configuration connection string with key *azure_app_configuration_connection_string* in the Secret.
165-
2. Set the `spec.connectionStringReference` property to the name of the Secret in the following sample `AzureAppConfigurationProvider` resource and deploy it to the Kubernetes cluster.
200+
1. Set the `spec.connectionStringReference` property to the name of the Secret in the following sample `AzureAppConfigurationProvider` resource and deploy it to the Kubernetes cluster.
166201

167202
``` yaml
168203
apiVersion: azconfig.io/v1beta1

0 commit comments

Comments
 (0)