Skip to content

Commit 2ff72db

Browse files
committed
chore(docs): Refine the examples
1 parent 56376d2 commit 2ff72db

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

docs/ambient-providers/azure.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ This documentation is for instructions on using ambient credentials within Azure
1212

1313
There are two types of [managed identities](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview#managed-identity-types) that your Azure AKS workload may use:
1414
- System-assigned managed identity (MSI)
15-
- Automatically created and managed by Azure at the cluster level. This identity **can not** be shared with other Azure resources.
15+
- Automatically created and managed by Azure at the cluster level. This identity **can not** be shared with other Azure resources. This is used by default.
1616
- User-assigned managed identity (UAMI)
17-
- Created and managed by you. Identity **can** be shared with other Azure resources and associated with Kubernetes ServiceAccounts via Azure AD Workload Identity.
17+
- Created and managed by you. Identity **can** be shared with other Azure resources and associated with Kubernetes ServiceAccounts via Azure AD Workload Identity. Requires explicit workload identity configuration (show below).
1818

1919
Since you are using ambient credentials generated by your Azure AKS workload and targeting these credentials for your Command instance, you will need to create an [Azure App Registration](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app). We will walk through App Registration configuration in this document.
2020

@@ -27,7 +27,12 @@ By default, your AKS cluster is configured to use system-assigned managed identi
2727
1. Create an Azure App Registration. [Installation steps](#azure-app-registration)
2828
1. Deploy Issuer or ClusterIssuer Resource. [Installation steps](../../README.md#creating-issuer-and-clusterissuer-resources)
2929
- To use ambient credentials, do not supply a `commandSecretName` to your issuer's specification.
30-
- **IMPORTANT**: Fill in the `scopes` in your issuer's specification with the Application ID URI of your App Registration, suffixed with `./default`. (i.e. `scopes: api://your-app-registration-endpoint/.default`)
30+
- **IMPORTANT**: Fill in the `scopes` in your issuer's specification with the Application ID URI of your App Registration, suffixed with `./default`. Example:
31+
```yaml
32+
# Example issuer configuration
33+
spec:
34+
scopes: "api://your-app-registration-id/.default"
35+
```
3136
1. Add the system-assigned managed identity object ID to a security claim in Keyfactor Command
3237
```bash
3338
export AKS_CLUSTER_RESOURCE_GROUP="" # the resource group your AKS cluster is deployed to
@@ -46,6 +51,8 @@ By default, your AKS cluster is configured to use system-assigned managed identi
4651
echo "Authority: https://login.microsoftonline.com/$CURRENT_TENANT/v2.0"
4752
```
4853
54+
> **Note**: AKS workloads inherit the kubelet's managed identity, not the cluster's control plane identity. This is why we use `identityProfile.kubeletidentity.objectId` rather than `identity.principalId`.
55+
4956
You can map the object ID to an OAuth Subject or OAuth Object ID security claim in Keyfactor Command. Make sure the [security claim is associated to a security role](https://software.keyfactor.com/Core-OnPrem/Current/Content/ReferenceGuide/SecurityOverview.htm?Highlight=Security%20Roles) with the required permissions. Please refer to the [Configuring Command](../../README.md#configuring-command) **Configure Command Security Roles and Claims** section for security role requirements.
5057

5158
Make sure an identity provider is configured in Keyfactor Command with the authority set to the authority output above.
@@ -156,7 +163,12 @@ User-assigned managed identity configuration is more involved, but allows the id
156163
1. Create an Azure App Registration. [Installation steps](#azure-app-registration)
157164
1. Deploy Issuer or ClusterIssuer Resource. [Installation steps](../../README.md#creating-issuer-and-clusterissuer-resources)
158165
- To use ambient credentials, do not supply a `commandSecretName` to your issuer's specification.
159-
- **IMPORTANT**: Fill in the `scopes` in your issuer's specification with the Application ID URI of your App Registration, suffixed with `./default`. (i.e. `scopes: api://your-app-registration-endpoint/.default`)
166+
- **IMPORTANT**: Fill in the `scopes` in your issuer's specification with the Application ID URI of your App Registration, suffixed with `./default`. Example:
167+
```yaml
168+
# Example issuer configuration
169+
spec:
170+
scopes: "api://your-app-registration-id/.default"
171+
```
160172
1. Add the user-assigned managed identity principal ID to a security claim in Keyfactor Command
161173
```shell
162174
export UAMI_PRINCIPAL_ID=$(az identity show --name $UAMI_IDENTITY_NAME --resource-group $AKS_CLUSTER_RESOURCE_GROUP --query principalId --output tsv)

0 commit comments

Comments
 (0)