Skip to content

Commit c87574e

Browse files
committed
Add doc for UserAssignedIdentityCredentials
This commit adds documentation for UserAssignedIdentityCredentials. Signed-off-by: Bryan Cox <[email protected]>
1 parent 18f0244 commit c87574e

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

docs/book/src/topics/identities.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,67 @@ spec:
182182

183183
When using a user-assigned managed identity to create the workload cluster, a VM identity should also be assigned to each control plane machine in the workload cluster for Azure Cloud Provider to use. See [here](../self-managed/vm-identity.md#managed-identities) for more information.
184184

185+
## User-Assigned Identity Credentials
186+
187+
<aside class="note">
188+
189+
<h1> Note </h1>
190+
191+
This option is only available for 1st party Microsoft applications who have access to the msi data-plane.
192+
193+
</aside>
194+
195+
#### General
196+
This authentication type is similar to user assigned managed identity authentication combined with client certificate
197+
authentication. As a 1st party Microsoft application, one has access to pull a user assigned managed identity's backing
198+
certificate information from the MSI data plane. Using this data, a user can authenticate to Azure Cloud.
199+
200+
#### Prerequisites
201+
A JSON file with information from the user assigned managed identity. It should be in this format:
202+
```json
203+
{
204+
"client_id": "0998...",
205+
"client_secret": "MIIKUA...",
206+
"client_secret_url": "https://control...",
207+
"tenant_id": "93b...",
208+
"object_id": "ae...",
209+
"resource_id": "/subscriptions/...",
210+
"authentication_endpoint": "https://login.microsoftonline.com/",
211+
"mtls_authentication_endpoint": "https://login.microsoftonline.com/",
212+
"not_before": "2025-02-07T13:29:00Z",
213+
"not_after": "2025-05-08T13:29:00Z",
214+
"renew_after": "2025-03-25T13:29:00Z",
215+
"cannot_renew_after": "2025-08-06T13:29:00Z"
216+
}
217+
```
218+
219+
Note, the client secret should be a base64 encoded certificate.
220+
221+
The steps to get this information from the MSI data plane are as follows:
222+
1. Make an unauthenticated GET or POST (no Authorization request headers) on the x-ms-identity-url received from ARM to get the token authority and, on older api versions, resource.
223+
2. Get an Access Token from Azure AD using your Resource Provider applicationId and Certificate. The applicationId should match the one you added to your manifest. The response should give you an access token.
224+
3. Perform a GET or POST to MSI on the same URL from earlier to get the Credentials using this bearer token.
225+
226+
#### Creating the AzureClusterIdentity
227+
228+
The corresponding values should be used to create an `AzureClusterIdentity` resource:
229+
230+
```yaml
231+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
232+
kind: AzureClusterIdentity
233+
metadata:
234+
name: example-identity
235+
namespace: default
236+
spec:
237+
type: UserAssignedIdentityCredential
238+
tenantID: <azure-tenant-id>
239+
clientID: <client-id-of-user-assigned-identity>
240+
userAssignedIdentityCredentialsPath: <path-to-JSON-file-with-mi-certifcate-information>
241+
userAssignedIdentityCredentialsCloudType: "AzurePublicCloud"
242+
allowedNamespaces:
243+
list:
244+
- <cluster-namespace>
245+
```
185246

186247
## Azure Host Identity
187248

0 commit comments

Comments
 (0)