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
Copy file name to clipboardExpand all lines: README.md
+87-6Lines changed: 87 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,12 +51,6 @@ Before starting, ensure that the following requirements are met:
51
51
-[Supported cert-manager release](https://cert-manager.io/docs/releases/) installed in your cluster. Please see the [cert-manager installation](https://cert-manager.io/docs/installation/) for details.
52
52
-[Supported version of Helm](https://helm.sh/docs/topics/version_skew/) for your Kubernetes version
## Managed Identity Using Azure Entra ID Workload Identity (AKS)
173
+
174
+
Azure Entra ID workload identity in Azure Kubernetes Service (AKS) allows Command Issuer to exchange a Kubernetes ServiceAccount Token for an Azure Entra ID access token, which is then used to authenticate to Command.
175
+
176
+
1. Reconfigure the AKS cluster to enable workload identity federation.
177
+
178
+
```shell
179
+
az aks update \
180
+
--name ${CLUSTER} \
181
+
--enable-oidc-issuer \
182
+
--enable-workload-identity
183
+
```
184
+
185
+
> The [Azure Workload Identity extension can be installed on non-AKS or self-managed clusters](https://azure.github.io/azure-workload-identity/docs/installation.html) if you're not using AKS.
186
+
>
187
+
> Refer to the [AKS documentation](https://learn.microsoft.com/en-us/azure/aks/workload-identity-deploy-cluster) for more information on the `--enable-workload-identity` feature.
188
+
189
+
2. Reconfigure or deploy Command Issuer with extra labels forthe Azure Workload Identity webhook, which will resultin the Command Issuer controller Pod having an extra volume containing a Kubernetes ServiceAccount token which it will exchange for a token from Azure.
/var/run/secrets/azure/tokens from azure-identity-token (ro)
218
+
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-6rmzz (ro)
219
+
...
220
+
Volumes:
221
+
...
222
+
azure-identity-token:
223
+
Type: Projected (a volume that contains injected data from multiple sources)
224
+
TokenExpirationSeconds: 3600
225
+
```
226
+
227
+
> Refer to [Azure Workload Identity docs](https://azure.github.io/azure-workload-identity/docs/installation/mutating-admission-webhook.html) more information on the role of the Mutating Admission Webhook.
228
+
229
+
3. Create a User Assigned Managed Identity in Azure.
230
+
231
+
```shell
232
+
export IDENTITY_NAME=command-issuer
233
+
az identity create --name "${IDENTITY_NAME}"
234
+
```
235
+
236
+
> Read more about [the `az identity` command](https://learn.microsoft.com/en-us/cli/azure/identity?view=azure-cli-latest).
237
+
238
+
4. Associate a Federated Identity Credential (FIC) with the User Assigned Managed Identity. The FIC allows Command Issuer to act on behalf of the Managed Identity by telling Azure to expect:
239
+
- The `iss` claim of the ServiceAccount token to match the cluster's OIDC Issuer. Azure will also use the Issuer URL to download the JWT signing certificate.
240
+
- The `sub` claim of the ServiceAccount token to match the ServiceAccount's name and namespace.
241
+
242
+
```shell
243
+
export SERVICE_ACCOUNT_NAME=command-cert-manager-issuer # This is the default Kubernetes ServiceAccount used by the Command Issuer controller.
244
+
export SERVICE_ACCOUNT_NAMESPACE=command-issuer-system # This is the default namespace for Command Issuer used in this doc.
245
+
export SERVICE_ACCOUNT_ISSUER=$(az aks show --resource-group $AZURE_DEFAULTS_GROUP --name $CLUSTER --query "oidcIssuerProfile.issuerUrl" -o tsv)
> Read more about [Workload Identity federation](https://learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation) in the Entra ID documentation.
254
+
>
255
+
> Read more about [the `az identity federated-credential` command](https://learn.microsoft.com/en-us/cli/azure/identity/federated-credential?view=azure-cli-latest).
256
+
257
+
5. Add Microsoft Entra ID as an [Identity Provider in Command](https://software.keyfactor.com/Core-OnPrem/Current/Content/ReferenceGuide/IdentityProviders.htm?Highlight=identity%20provider), and [add the Managed Identity's Client ID as an `oid` claim to the Security Role](https://software.keyfactor.com/Core-OnPrem/Current/Content/ReferenceGuide/SecurityOverview.htm?Highlight=Security%20Roles) created/identified earlier.
258
+
178
259
# CA Bundle
179
260
180
261
If the Command API is configured to use a self-signed certificate or with a certificate whose issuer isn't widely trusted, the CA certificate must be provided as a Kubernetes secret.
0 commit comments