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
* feat: add workload identity authentication support
Add support for Azure Workload Identity authentication alongside
existing service principal authentication for Microsoft Graph API access.
* comments and empty string check
* test credential type choice
* remove debug println
Copy file name to clipboardExpand all lines: README.md
+108-4Lines changed: 108 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,12 @@ spec:
28
28
29
29
### Azure Credentials
30
30
31
+
The service principal needs the following Microsoft Graph API permissions:
32
+
- User.Read.All (for user validation)
33
+
- Group.Read.All (for group operations)
34
+
- Application.Read.All (for service principal details)
35
+
36
+
#### Client Secret Credentials
31
37
Create an Azure service principal with appropriate permissions to access Microsoft Graph API:
32
38
33
39
```yaml
@@ -47,10 +53,81 @@ stringData:
47
53
}
48
54
```
49
55
50
-
The service principal needs the following Microsoft Graph API permissions:
51
-
- User.Read.All (for user validation)
52
-
- Group.Read.All (for group operations)
53
-
- Application.Read.All (for service principal details)
56
+
#### Workload Identity Credentials
57
+
AKS cluster needs to have workload identity enabled.
58
+
The managed identity needs to have the Federated Identity Credential created: https://azure.github.io/azure-workload-identity/docs/topics/federated-identity-credential.html.
| `servicePrincipalsRef` | string | Reference to resolve a list of service principal names from `spec`, `status` or `context` (e.g., `spec.servicePrincipalConfig.names`) |
199
276
| `target` | string | Required. Where to store the query results. Can be `status.<field>` or `context.<field>` |
200
277
| `skipQueryWhenTargetHasData` | bool | Optional. When true, will skip the query if the target already has data |
278
+
| `identity.type | string | Optional. Type of identity credentials to use. Valid values: `AzureServicePrincipalCredentials`, `AzureWorkloadIdentityCredentials`. Default is `AzureServicePrincipalCredentials` |
201
279
202
280
## Result Targets
203
281
@@ -261,6 +339,32 @@ servicePrincipalsRef: "spec.servicePrincipalConfig.names" # Get service princip
261
339
target: "status.servicePrincipals"
262
340
```
263
341
342
+
## Using Different Credentials
343
+
344
+
### Using ServicePrincipal credentials
345
+
346
+
#### Explicitly
347
+
```yaml
348
+
apiVersion: msgraph.fn.crossplane.io/v1alpha1
349
+
kind: Input
350
+
identity:
351
+
type: AzureServicePrincipalCredentials
352
+
```
353
+
354
+
#### Default
355
+
```yaml
356
+
apiVersion: msgraph.fn.crossplane.io/v1alpha1
357
+
kind: Input
358
+
```
359
+
360
+
### Using Workload Identity Credentials
361
+
```yaml
362
+
apiVersion: msgraph.fn.crossplane.io/v1alpha1
363
+
kind: Input
364
+
identity:
365
+
type: AzureWorkloadIdentityCredentials
366
+
```
367
+
264
368
## References
265
369
266
370
- [Microsoft Graph API Overview](https://learn.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0)
0 commit comments