19.3. Configuring Microsoft Entra ID federation
RHACS integrations can authenticate to Microsoft Azure by using managed or workload identities. Select the Use workload identity checkbox during the creation of a new Microsoft Azure Container Registry (ACR) integration, if you want to enable authentication by using managed or workload identities in a Microsoft Azure integration.
For more information about Azure managed identities, see What are managed identities for Azure resources? (Microsoft Azure documentation).
For more information about Azure workload identities, see Workload identity federation (Microsoft Azure documentation).
The identity associated with the RHACS pod through the workload identity must have the IAM permissions for the integration. For example, to set up a workload identity for integrating with Microsoft ACR, assign the Reader role over a scope that includes the registry.
For more information about Microsoft Azure IAM roles, see Azure RBAC documentation (Microsoft Azure documentation).
19.3.1. Configuring Microsoft Azure Kubernetes Service 링크 복사링크가 클립보드에 복사되었습니다!
By running Red Hat Advanced Cluster Security for Kubernetes (RHACS) on Microsoft Azure Kubernetes Service (AKS), you can configure short-lived tokens by using Microsoft Entra ID managed identities.
If you use Kubernetes, enter kubectl instead of oc.
Prerequisites
- You have access to the cluster and integration resources within Microsoft Azure.
Procedure
Create a trust relationship between the external IdP and a user-assigned managed identity or application in Microsoft Entra ID.
For more information, see Workload identity federation (Microsoft Azure documentation).
Annotate the RHACS service account by running the following command:
중요When setting up the delegated scanning, use sensor instead of central.
$ oc annotate serviceaccount \ central \ --namespace stackrox \ azure.workload.identity/client-id=<CLIENT_ID>where:
<CLIENT_ID>- Specifies the client ID of the associated identity.
Example output
serviceaccount/central annotated
19.3.2. Configuring OpenShift Container Platform 링크 복사링크가 클립보드에 복사되었습니다!
By running Red Hat Advanced Cluster Security for Kubernetes (RHACS) on OpenShift Container Platform, you can configure short-lived tokens by using Microsoft Entra ID managed identities.
Prerequisites
You have a public OpenID Connect (OIDC) configuration bucket with the OpenShift Container Platform service account signer key.
For more information, see "Manual mode with short-term credentials for components" in OpenShift Container Platform documentation.
- You have a Microsoft Entra ID user-assigned managed identity.
- You have access to a Microsoft Azure subscription with the permission to assign role assignments.
Procedure
To add the federated identity credentials to a user-assigned managed identity, run the following command, for example:
중요When setting up the delegated scanning, set the subject to system:serviceaccount:stackrox:sensor.
$ az identity federated-credential create \ --name "${FEDERATED_CREDENTIAL_NAME}" \ --identity-name "${MANAGED_IDENTITY_NAME}" \ --resource-group "${RESOURCE_GROUP}" \ --issuer "${OIDC_ISSUER_URL}" \ --subject system:serviceaccount:stackrox:central \ --audience openshiftwhere:
--identity-name- Specifies the identity name. The managed identity must have all the permissions for federation.
--issuer- Specifies the issuer. The issuer must match the service account token issuer of the OpenShift Container Platform cluster.
For more information about how to configure short-lived tokens by using Microsoft Entra ID managed identities, see Configure a user-assigned managed identity to trust an external identity provider (Microsoft Azure documentation).