Chapter 18. Managing user access


Red Hat Advanced Cluster Security for Kubernetes (RHACS) includes role-based access control (RBAC) that you can use to configure roles and grant various levels of access to Red Hat Advanced Cluster Security for Kubernetes for different users.

Beginning with version 3.63, RHACS includes a scoped access control feature. You can configure fine-grained and specific sets of permissions that define how a given RHACS user or a group of users can interact with RHACS, the resources they can access, and the actions they can perform.

18.1.1. RBAC concepts overview

The role-based access control (RBAC) system in RHACS uses roles, permission sets, and access scopes to define user permissions and resource access.

  • Roles are a collection of permission sets and access scopes. You can assign roles to users and groups by specifying rules. You can configure these rules when you configure an authentication provider. There are two types of roles in Red Hat Advanced Cluster Security for Kubernetes:

    • System roles that Red Hat creates and that you cannot change.
    • Custom roles, which Red Hat Advanced Cluster Security for Kubernetes administrators can create and change at any time.

      Note
      • If you assign many roles for a user, they get access to the combined permissions of the assigned roles.
      • If you have users assigned to a custom role, and you delete that role, all associated users transfer to the minimum access role that you have configured.
  • Permission sets are a set of permissions that define what actions a role can perform on a given resource. Resources are the functionalities of Red Hat Advanced Cluster Security for Kubernetes for which you can set view (read) and change (write) permissions. There are two types of permission sets in Red Hat Advanced Cluster Security for Kubernetes:

    • System permission sets, which Red Hat creates and that you cannot change.
    • Custom permission sets, which Red Hat Advanced Cluster Security for Kubernetes administrators can create and change at any time.
  • Access scopes are a set of Kubernetes and OpenShift Container Platform resources that users can access. For example, you can define an access scope that grants access only to information about pods in a given project. There are two types of access scopes in Red Hat Advanced Cluster Security for Kubernetes:

    • System access scopes, which Red Hat creates and that you cannot change.
    • Custom access scopes, which Red Hat Advanced Cluster Security for Kubernetes administrators can create and change at any time.

18.1.2. System roles

Red Hat Advanced Cluster Security for Kubernetes (RHACS) includes some default system roles that you can apply to users when you create rules. You can also create custom roles as required.

System roleDescription

Admin

Use this role for administrators. It grants read and write access to all resources.

Analyst

Use this role for a user who cannot make any changes, but can view everything. It grants read-only access for all resources.

Continuous Integration

Use this role for CI (continuous integration) systems. It includes the permission set required to enforce deployment policies.

Network Graph Viewer

Use this role for users who need to view the network graph.

None

This role has no read and write access to any resource. You can set this role as the minimum access role for all users.

Sensor Creator

RHACS uses this role to automate new cluster setups. It includes the permission set to create Sensors in secured clusters.

Vulnerability Management Approver

Use this role to give access to approve vulnerability deferrals or false positive requests.

Vulnerability Management Requester

Use this role to give access to request vulnerability deferrals or false positives.

Vulnerability Report Creator

Use this role to create and manage vulnerability reporting configurations for scheduled vulnerability reports.

You can view the permission set and access scope for the default system roles.

Procedure

  1. In the RHACS portal, go to Platform Configuration Access control.
  2. Select Roles.
  3. Click one of the roles to view its details. The details page shows the permission set and access scope for the selected role.

    Note

    You cannot change permission set and access scope for the default system roles.

18.1.2.2. Creating a custom role

You can create new roles from the Access Control view.

Prerequisites

  • You must have the Admin role, or read and write permissions for the Access resource to create, change, and delete custom roles.
  • You must create a permissions set and an access scope for the custom role before you create the role.

Procedure

  1. In the RHACS portal, go to Platform Configuration Access Control.
  2. Select Roles.
  3. Click Create role.
  4. Enter a Name and Description for the new role.
  5. Select a Permission set for the role.
  6. Select an Access scope for the role.
  7. Click Save.

18.1.2.3. Assigning a role to a user or a group

You can use the RHACS portal to assign roles to a user or a group.

Procedure

  1. In the RHACS portal, go to Platform Configuration Access Control.
  2. From the list of authentication providers, select the authentication provider.
  3. Click Edit minimum role and rules.
  4. Under the Rules section, click Add new rule.
  5. For Key, select one of the values from userid, name, email, or groups. The available choices depend on the authentication provider.
  6. For Value, enter the value of the user ID, name, email address, or group based on the key you selected. For example, to assign the Analyst role to a user by email, after selecting email for the Key field, enter the email address of the user.
  7. Click the Role drop-down menu and select the role you want to assign. For example, to assign the Analyst role to a user whose email you have entered, select Analyst.
  8. Click Save.

    You can repeat these instructions for each user or group and assign different roles. For role aggregation, you can use the same key/value pair with many roles. For example, you can create a rule that assigns the Analyst role to the user jsmith@example.com, and then add another rule to assign the Vulnerability Report Creator role to the same user. For more information about roles, see "System roles".

18.1.3. System permission sets

Red Hat Advanced Cluster Security for Kubernetes includes some default system permission sets that you can apply to roles. You can also create custom permission sets as required.

Permission setDescription

Admin

Grants read and write access to all resources.

Analyst

Grants read-only access for all resources.

Continuous Integration

Use this permission set for CI (continuous integration) systems. It includes the permissions required to enforce deployment policies.

Network Graph Viewer

Grants the minimum permissions to view network graphs.

None

Grants no read and write permissions for any resource.

Sensor Creator

Grants permissions for resources that you need to create Sensors in secured clusters.

You can view the permissions for a system permission set in the RHACS portal.

Procedure

  1. In the RHACS portal, go to Platform Configuration Access control.
  2. Select Permission sets.
  3. Click one of the permission sets to view its details. The details page shows a list of resources and their permissions for the selected permission set.

    Note

    You cannot change permissions for a system permission set.

18.1.3.2. Creating a custom permission set

You can create new permission sets from the Access Control view.

Prerequisites

  • You must have the Admin role, or read and write permissions for the Access resource to create, change, and delete permission sets.

Procedure

  1. In the RHACS portal, go to Platform Configuration Access Control.
  2. Select Permission sets.
  3. Click Create permission set.
  4. Enter a Name and Description for the new permission set.
  5. For each resource, under the Access level column, select one of the permissions from No access, Read access, or Read and Write access.

    Warning
    • If you are configuring a permission set for users, you must grant read-only permissions for the following resources:

      • Alert
      • Cluster
      • Deployment
      • Image
      • NetworkPolicy
      • NetworkGraph
      • WorkflowAdministration
      • Secret
    • The system preselects these permissions when you create a new permission set.
    • If you do not grant these permissions, users will experience issues with viewing pages in the RHACS portal.
  6. Click Save.

18.1.4. System access scopes

Red Hat Advanced Cluster Security for Kubernetes includes some default system access scopes that you can apply on roles. You can also create custom access scopes as required.

Access scopeDescription

Unrestricted

Provides access to all clusters and namespaces that Red Hat Advanced Cluster Security for Kubernetes monitors.

Deny All

Provides no access to any Kubernetes and OpenShift Container Platform resources.

You can view the Kubernetes and OpenShift Container Platform resources that are allowed and not allowed for an access scope in the RHACS portal.

Procedure

  1. In the RHACS portal, go to Platform Configuration Access control.
  2. Select Access scopes.
  3. Click one of the access scopes to view its details. The details page shows a list of clusters and namespaces, and which ones are allowed for the selected access scope.

    Note

    You cannot change allowed resources for a system access scope.

18.1.4.2. Creating a custom access scope

You can create new access scopes from the Access Control view.

Prerequisites

  • You must have the Admin role, or a role with the permission set with read and write permissions for the Access resource to create, change, and delete permission sets.

Procedure

  1. In the RHACS portal, go to Platform Configuration Access control.
  2. Select Access scopes.
  3. Click Create access scope.
  4. Enter a Name and Description for the new access scope.
  5. Under the Allowed resources section, use the Cluster filter and Namespace filter fields to filter the list of clusters and namespaces visible in the list.
  6. Expand the Cluster name to see the list of namespaces in that cluster.
  7. To allow access to all namespaces in a cluster, toggle the switch in the Manual selection column.

    Note

    Access to a specific cluster grants users access to the following resources within the scope of the cluster:

    • OpenShift Container Platform or Kubernetes cluster metadata and security information
    • Compliance information for authorized clusters
    • Node metadata and security information
    • Access to all namespaces in that cluster and their associated security information
  8. To allow access to a namespace, toggle the switch in the Manual selection column for a namespace.

    Note

    Access to a specific namespace grants access to the following information within the scope of the namespace:

    • Alerts and violations for deployments
    • Vulnerability data for images
    • Deployment metadata and security information
    • Role and user information
    • Network graph, policy, and baseline information for deployments
    • Process information and process baseline configuration
    • Prioritized risk information for each deployment
  9. If you want to allow access to clusters and namespaces based on labels, click Add label selector under the Label selection rules section. Then click Add rule to specify Key and Value pairs for the label selector. You can specify labels for clusters and namespaces.
  10. Click Save.

18.1.4.3. Scale considerations

In large environments with thousands of namespaces, user scopes covering large numbers of namespaces can cause performance issues such as slow page rendering or timeouts.

In large environments, for example, with thousands of namespaces, the application of user scopes that cover large numbers of namespaces can cause some pages to render slowly or time out. For example, you might experience timeouts when opening the main Dashboard page.

Red Hat tested performance in a single-cluster context on an environment with 20,000 deployments across 5,000 namespaces and 80,000 alerts in one test cluster. In that testing, the load time of the main Dashboard page for scopes including up to 2,000 namespaces on that cluster was under a few seconds.

Red Hat tested performance in a multi-cluster context on an environment with 200,000 deployments across 50,000 namespaces and 800,000 alerts across 10 test clusters. In that testing, the load time of the main Dashboard page was under a few seconds for scopes including up to 500 namespaces across the 10 clusters and for scopes including up to 2,000 namespaces on a single cluster.

Red Hat cannot guarantee that the load time of RHACS portal pages for user scopes with more namespaces than the tested numbers will stay under the timeout limit.

18.1.5. Resource definitions

Red Hat Advanced Cluster Security for Kubernetes includes many resources. The following table lists the Red Hat Advanced Cluster Security for Kubernetes resources and describes the actions that users can perform with the read or write permission.

Note
  • To prevent privilege escalation, when you create a new token, your role’s permissions limit the permission you can assign to that token. For example, if you only have read permission for the Integration resource, you cannot create a token with write permission.
  • If you want a custom role to create tokens for other users to use, you must assign the required permissions to that custom role.
  • Use short-lived tokens for machine-to-machine communication, such as CI/CD pipelines, scripts, and other automation. Also, use the roxctl central login command for human-to-machine communication, such as roxctl CLI or API access.
  • The majority of cloud service providers support OIDC identity tokens, for example, Microsoft Entra ID, Google Cloud Identity Platform, and AWS Cognito. You can use OIDC identity tokens issued by these services for RHACS short-lived access.
  • You can also use third-party OIDC identity tokens directly to access the API endpoint, without an exchange, if a machine-to-machine configuration exists for the token issuer.
ResourceRead permissionWrite permission

Access

View configurations for single sign-on (SSO) and role-based access control (RBAC) rules that match user metadata to Red Hat Advanced Cluster Security for Kubernetes roles and users that have accessed your Red Hat Advanced Cluster Security for Kubernetes instance, including the metadata that the authentication providers give about them.

Create, change, or delete SSO configurations and configured RBAC rules.

Administration

View the following items:

  • Options for data retention, security notices and other related configurations
  • The current logging verbosity level in Red Hat Advanced Cluster Security for Kubernetes components
  • Manifest content for the uploaded probe files
  • Existing image scanner integrations
  • The status of automatic upgrades
  • Metadata about Red Hat Advanced Cluster Security for Kubernetes service-to-service authentication
  • The content of the scanner bundle (download)

Edit the following items:

  • Data retention, security notices, and related configurations
  • The logging level
  • Support packages in Central (upload)
  • Image scanner integrations (create/change/delete)
  • Automatic upgrades for secured clusters (enable/disable)
  • Service-to-service authentication credentials (revoke/re-issue)

Alert

View existing policy violations.

Resolve or edit policy violations.

CVE

Internal use only

Internal use only

Cluster

View existing secured clusters.

Add new secured clusters and change or delete existing clusters.

Compliance

View compliance standards and results, recent compliance runs, and the associated completion status.

Trigger compliance runs.

Deployment

View deployments (workloads) in secured clusters.

N/A

DeploymentExtension

View the following items:

  • Process baselines
  • Process activity in deployments
  • Risk results

Change the following items:

  • Process baselines (add or remove processes)

Detection

Check build-time policies against images or deployment YAML.

N/A

Image

View images, their components, and their vulnerabilities.

N/A

Integration

View integrations and their configuration, including backup, registry, image signature, notification systems, and API tokens.

Add, change, and delete integrations and their configurations, and API tokens.

K8sRole

View roles for Kubernetes RBAC in secured clusters.

N/A

K8sRoleBinding

View role bindings for Kubernetes RBAC in secured clusters.

N/A

K8sSubject

View users and groups for Kubernetes RBAC in secured clusters.

N/A

Namespace

View existing Kubernetes namespaces in secured clusters.

N/A

NetworkGraph

View active and allowed network connections in secured clusters.

N/A

NetworkPolicy

View existing network policies in secured clusters and simulate changes.

Apply network policy changes in secured clusters.

Node

View existing Kubernetes nodes in secured clusters.

N/A

WorkflowAdministration

View all resource collections.

Add, change, or delete resource collections.

Role

View existing Red Hat Advanced Cluster Security for Kubernetes RBAC roles and their permissions.

Add, change, or delete roles and their permissions.

Secret

View metadata about secrets in secured clusters.

N/A

ServiceAccount

List Kubernetes service accounts in secured clusters.

N/A

VulnerabilityManagementApprovals

View all pending deferral or false positive requests for vulnerabilities.

Approve or deny any pending deferral or false positive requests and move any before approved requests back to observed.

VulnerabilityManagementRequests

View all pending deferral or false positive requests for vulnerabilities.

Request a deferral on a vulnerability, mark it as a false positive, or move a pending or before approved request made by the same user back to observed.

WatchedImage

View undeployed and monitored watched images.

Configure watched images.

WorkflowAdministration

View all resource collections.

Create, change, or delete resource collections.

You can use declarative configuration for authentication and authorization resources such as authentication providers, roles, permission sets, and access scopes. For instructions on how to use declarative configuration, see "Using declarative configuration".

18.2. Enabling PKI authentication

If you use an enterprise certificate authority (CA) for authentication, you can configure Red Hat Advanced Cluster Security for Kubernetes (RHACS) to authenticate users by using their personal certificates.

18.2.1. PKI authentication overview

After you configure PKI authentication, users and API clients can authenticate using their personal certificates while other authentication methods remain available.

After you configure PKI authentication, users and API clients can log in using their personal certificates. Users without certificates can still use other authentication options, including API tokens, the local administrator password, or other authentication providers. PKI authentication is available on the same port number as the Web UI, gRPC, and REST APIs.

When you configure PKI authentication, by default, Red Hat Advanced Cluster Security for Kubernetes uses the same port for PKI, web UI, gRPC, other single sign-on (SSO) providers, and REST APIs. You can also configure a separate port for PKI authentication by using a YAML configuration file to configure and expose endpoints.

You can configure Public Key Infrastructure (PKI) authentication by using the RHACS portal.

Procedure

  1. In the RHACS portal, go to Platform Configuration Access Control.
  2. Click Create Auth Provider and select User Certificates from the drop-down list.
  3. In the Name field, specify a name for this authentication provider.
  4. In the CA certificate(s) (PEM) field, paste your root CA certificate in PEM format.
  5. Assign a Minimum access role for users who access RHACS using PKI authentication. A user must have the permissions granted to this role or a role with higher permissions to log in to RHACS.

    Tip

    For security, Red Hat recommends first setting the Minimum access role to None while you complete setup. Later, you can return to the Access Control page to set up more tailored access rules based on user metadata from your identity provider.

  6. To add access rules for users and groups accessing RHACS, click Add new rule in the Rules section. For example, to give the Admin role to a user called administrator, you can use the following key-value pairs to create access rules:

    Key

    Value

    Name

    administrator

    Role

    Admin

  7. Click Save.

You can configure PKI authentication by using the roxctl CLI.

Procedure

  • Run the following command:

    $ roxctl -e <hostname>:<port_number> central userpki create -c <ca_certificate_file> -r <default_role_name> <provider_name>

You can update your authentication keys and certificates by using the RHACS portal.

Procedure

  1. Create a new authentication provider.
  2. Copy the role mappings from your old authentication provider to the new authentication provider.
  3. Rename or delete the old authentication provider with the old root CA key.

18.2.5. Logging in by using a client certificate

After you configure PKI authentication, users see a certificate prompt in the RHACS portal login page if the user’s system has a client certificate trusted by the configured root CA.

Procedure

  1. Open the RHACS portal.
  2. Select a certificate in the browser prompt.
  3. On the login page, select the authentication provider name option to log in with a certificate.

    If you do not want to log in by using the certificate, you can also log in by using the administrator password or another login method.

    Note

    Once you use a client certificate to log in to the RHACS portal, you cannot log in with a different certificate unless you restart your browser.

18.3. Understanding authentication providers

An authentication provider connects to a third-party identity provider to validate user identity and authorize access to Red Hat Advanced Cluster Security for Kubernetes (RHACS).

18.3.1. Authentication providers overview

An authentication provider connects to a third-party identity provider, validates user identity, and issues tokens that RHACS uses for authorization.

An authentication provider connects to a third-party source of user identity (for example, an identity provider or IDP), gets the user identity, issues a token based on that identity, and returns the token to Red Hat Advanced Cluster Security for Kubernetes (RHACS). This token allows RHACS to authorize the user. RHACS uses the token within the user interface and API calls.

After installing RHACS, you must set up your IDP to authorize users.

Note

If you are using OpenID Connect (OIDC) as your IDP, RHACS relies on mapping rules that examine the values of specific claims such as groups, email, userid and name from either the user ID token or the UserInfo endpoint response to authorize the users. If these details are absent, the mapping cannot succeed and the user does not get access to the required resources. Therefore, you need to ensure that the claims required to authorize users from your IDP, for example, groups, are included in the authentication response of your IDP to enable successful mapping.

18.3.2. Claim mappings

Claim mappings allow you to customize how RHACS translates claim attributes from identity provider tokens into RHACS-issued tokens.

A claim is the data an identity provider includes about a user inside the token they issue.

Using claim mappings, you can specify if RHACS should customize the claim attribute it receives from an IDP to another attribute in the RHACS-issued token. If you do not use the claim mapping, RHACS does not include the claim attribute in the RHACS-issued token.

For example, you can map from roles in the user identity to groups in the RHACS-issued token using claim mapping.

RHACS uses different default claim mappings for every authentication provider.

18.3.2.1. OIDC default claim mappings

The following list provides the default OIDC claim mappings.

  • sub to userid
  • name to name
  • email to email
  • groups to groups

18.3.2.2. Auth0 default claim mappings

The Auth0 authentication provider maps the sub, name, email, and groups claims by default.

RHACS applies the following default claim mappings for Auth0:

  • sub to userid
  • name to name
  • email to email
  • groups to groups

18.3.2.3. SAML 2.0 default claim mappings

The following list applies to SAML 2.0 default claim mappings.

  • Subject.NameID maps to userid
  • every SAML AttributeStatement.Attribute from the response maps to its name

18.3.2.4. Google IAP default claim mappings

The following list provides the Google IAP default claim mappings.

  • sub to userid
  • email to email
  • hd to hd
  • google.access_levels to access_levels

18.3.2.5. User certificates default claim mappings

User certificates differ from all other authentication providers because instead of communicating with a third-party IDP, they get user information from certificates used by the user.

The default claim mappings for user certificates include:

  • CertFingerprint to userid
  • Subject Common Name to name
  • EmailAddresses to email
  • Subject Organizational Unit to groups

18.3.2.6. OpenShift Auth default claim mappings

The following list provides the OpenShift Auth default claim mappings.

  • groups to groups
  • uid to userid
  • name to name

18.3.3. Rules

Rules allow mapping of users who have attributes with a specific value to a specific role based on claims such as groups, email, userid, and name from the user identity.

To authorize users, RHACS relies on mapping rules that examine the values of specific claims such as groups, email, userid, and name from the user identity. Rules allow mapping of users who have attributes with a specific value to a specific role. As an example, a rule could include the following:`key` is email, value is john@redhat.com, role is Admin.

If the claim is missing, the mapping cannot succeed, and the user does not get access to the required resources. Therefore, to enable successful mapping, you must ensure that the authentication response from your IDP includes the required claims to authorize users, for example, groups.

18.3.4. Minimum access role

RHACS assigns a minimum access role to every caller with a RHACS token issued by a particular authentication provider. The minimum access role defaults to None.

For example, suppose there is an authentication provider with the minimum access role of Analyst. In that case, all users who log in using this provider will have the Analyst role assigned to them.

18.3.5. Required attributes

Required attributes can restrict issuing of the RHACS token based on whether a user identity has an attribute with a specific value.

For example, you can configure RHACS only to issue a token when the attribute with key is_internal has the attribute value true. Users with the attribute is_internal set to false or not set do not get a token.

18.4. Configuring identity providers

You can use Okta as a single sign-on (SSO) provider for Red Hat Advanced Cluster Security for Kubernetes (RHACS).

18.4.1.1. Creating an Okta app

Before you can use Okta as a SAML 2.0 identity provider for Red Hat Advanced Cluster Security for Kubernetes, you must create an Okta app.

Warning

Okta’s Developer Console does not support the creation of custom SAML 2.0 applications. If you are using the Developer Console, you must first switch to the Admin Console (Classic UI). To switch, click Developer Console in the top left of the page and select Classic UI.

Prerequisites

  • You must have an account with administrative privileges for the Okta portal.

Procedure

  1. On the Okta portal, select Applications from the menu bar.
  2. Click Add Application and then select Create New App.
  3. In the Create a New Application Integration dialog box, leave Web as the platform and select SAML 2.0 as the protocol that you want to sign in users.
  4. Click Create.
  5. On the General Settings page, enter a name for the app in the App name field.
  6. Click Next.
  7. On the SAML Settings page, set values for the following fields:

    1. Single sign on URL

      • Specify it as https://<RHACS_portal_hostname>/sso/providers/saml/acs.
      • Leave the Use this for Recipient URL and Destination URL option checked.
      • If your RHACS portal is accessible at different URLs, you can add them here by checking the Allow this app to request other SSO URLs option and add the alternative URLs using the specified format.
    2. Audience URI (SP Entity ID)

      • Set the value to RHACS or another value of your choice.
      • Remember the value you choose; you will need this value when you configure Red Hat Advanced Cluster Security for Kubernetes.
    3. Attribute Statements

      • You must add at least one attribute statement.
      • Red Hat recommends using the email attribute:

        • Name: email
        • Format: Unspecified
        • Value: user.email
  8. Verify that you have configured at least one Attribute Statement before continuing.
  9. Click Next.
  10. On the Feedback page, select an option that applies to you.
  11. Select an appropriate App type.
  12. Click Finish.

Result

After the configuration is complete, the system redirects you to the Sign On settings page for the new app. A highlighted box has links to the information that you need to configure Red Hat Advanced Cluster Security for Kubernetes.

After you have created the app, assign Okta users to this application. Go to the Assignments tab, and assign the set of individual users or groups that can access Red Hat Advanced Cluster Security for Kubernetes. For example, assign the group Everyone to allow all users in the organization to access Red Hat Advanced Cluster Security for Kubernetes.

18.4.1.2. Configuring a SAML 2.0 identity provider

Integrate a Security Assertion Markup Language (SAML) 2.0 identity provider with Red Hat Advanced Cluster Security for Kubernetes (RHACS).

Prerequisites

  • You must have permissions to configure identity providers in RHACS.
  • For Okta identity providers, you must have an Okta app configured for RHACS.

Procedure

  1. In the RHACS portal, go to Platform Configuration Access Control.
  2. Click Create auth provider and select SAML 2.0 from the drop-down list.
  3. In the Name field, enter a name to identify this authentication provider; for example, Okta or Google. The login page shows the integration name to help users select the correct sign-in option.
  4. In the ServiceProvider issuer field, enter the value that you are using as the Audience URI or SP Entity ID in Okta, or a similar value in other providers.
  5. Select the type of Configuration:

    • Option 1: Dynamic Configuration: If you select this option, enter the IdP Metadata URL, or the URL of Identity Provider metadata available from your identity provider console. The system acquires the configuration values from the URL.
    • Option 2: Static Configuration: Copy the required static fields from the View Setup Instructions link in the Okta console, or a similar location for other providers:

      • IdP Issuer
      • IdP SSO URL
      • Name/ID Format
      • IdP Certificate(s) (PEM)
  6. Assign a Minimum access role for users who access RHACS using SAML.

    Tip

    Set the Minimum access role to Admin while you complete setup. Later, you can return to the Access Control page to set up more tailored access rules based on user metadata from your identity provider.

  7. Click Save.

    Important

    If your SAML identity provider’s authentication response meets the following criteria:

    • Includes a NotValidAfter assertion: The user session remains valid until the time specified in the NotValidAfter field has elapsed. After the user session expires, users must reauthenticate.
    • Does not include a NotValidAfter assertion: The user session remains valid for 30 days, and then users must reauthenticate.

Verification

  1. In the RHACS portal, go to Platform Configuration Access Control.
  2. Select the Auth Providers tab.
  3. Click the authentication provider for which you want to verify the configuration.
  4. Select Test login from the Auth Provider section header. The Test login page opens in a new browser tab.
  5. Sign in with your credentials.

    • If you logged in successfully, RHACS shows the User ID and User Attributes that the identity provider sent for the credentials that you used to log in to the system.
    • If your login try failed, RHACS shows a message describing why the system could not process the identity provider’s response.
  6. Close the Test login browser tab.

    Note

    Even if the response indicates successful authentication, you might need to create additional access rules based on the user metadata from your identity provider.

You can use Google Workspace as a single sign-on (SSO) provider for Red Hat Advanced Cluster Security for Kubernetes.

To configure Google Workspace as an identity provider for Red Hat Advanced Cluster Security for Kubernetes, you must first configure OAuth 2.0 credentials for your GCP project.

Prerequisites

  • You must have administrator-level access to your organization’s Google Workspace account to create a new project, or permissions to create and configure OAuth 2.0 credentials for an existing project. Red Hat recommends that you create a new project for managing access to Red Hat Advanced Cluster Security for Kubernetes.

Procedure

  1. Create a new Google Cloud project. See the Google documentation topic "Creating and managing projects".
  2. After you have created the project, open the Credentials page in the Google API Console.
  3. Verify the project name listed in the upper left corner near the logo to make sure that you are using the correct project.
  4. To create new credentials, go to Create Credentials OAuth client ID.
  5. Choose Web application as the Application type.
  6. In the Name box, enter a name for the application, for example, RHACS.
  7. In the Authorized redirect URIs box, enter https://<stackrox_hostname>:<port_number>/sso/providers/oidc/callback.

    • replace <stackrox_hostname> with the hostname on which you expose your Central instance.
    • replace <port_number> with the port number on which you expose Central. If you are using the standard HTTPS port 443, you can omit the port number.
  8. Click Create. This creates an application and credentials and redirects you back to the credentials page.
  9. An information box opens, showing details about the newly created application. Close the information box.
  10. Copy and save the Client ID that ends with .apps.googleusercontent.com. You can check this client ID by using the Google API Console.
  11. Select OAuth consent screen from the navigation menu on the left.

    Note

    The OAuth consent screen configuration is valid for the entire GCP project, and not only to the application you created in the earlier steps. If you already have an OAuth consent screen configured in this project and want to apply different settings for Red Hat Advanced Cluster Security for Kubernetes login, create a new GCP project.

  12. On the OAuth consent screen page:

    1. Choose the Application type as Internal. If you select Public, anyone with a Google account can sign in.
    2. Enter a descriptive Application name. This name is displayed to users on the consent screen when they sign in. For example, use RHACS or <organization_name> SSO for Red Hat Advanced Cluster Security for Kubernetes.
    3. Verify that the Scopes for Google APIs only lists email, profile, and openid scopes. Single sign-on requires only these scopes. If you grant additional scopes it increases the risk of exposing sensitive data.

18.4.2.2. Specifying a client secret

Red Hat Advanced Cluster Security for Kubernetes supports OAuth 2.0 Authorization Code Grant authentication when you specify a client secret. With this flow, a refresh token keeps users logged in beyond the expiration time configured in your OIDC identity provider.

When users log out, Red Hat Advanced Cluster Security for Kubernetes deletes the refresh token from the client-side. Additionally, if your identity provider API supports refresh token revocation, Red Hat Advanced Cluster Security for Kubernetes also sends a request to your identity provider to revoke the refresh token.

You can specify a client secret when you configure Red Hat Advanced Cluster Security for Kubernetes to integrate with an OIDC identity provider.

Note
  • You cannot use a Client Secret with the Fragment Callback mode.
  • You cannot edit configurations for existing authentication providers.
  • You must create a new OIDC integration in Red Hat Advanced Cluster Security for Kubernetes if you want to use a Client Secret.

Red Hat recommends using a client secret when connecting Red Hat Advanced Cluster Security for Kubernetes with an OIDC identity provider. If you do not want to use a Client Secret, you must select the Do not use Client Secret (not recommended) option.

18.4.2.3. Configuring an OIDC identity provider

You can configure Red Hat Advanced Cluster Security for Kubernetes (RHACS) to use your OpenID Connect (OIDC) identity provider.

Prerequisites

  • You must have already configured an application in your identity provider, such as Google Workspace.
  • You must have permissions to configure identity providers in RHACS.

Procedure

  1. In the RHACS portal, go to Platform Configuration Access Control.
  2. Click Create auth provider and select OpenID Connect from the drop-down list.
  3. Enter information in the following fields:

    • Name: A name to identify your authentication provider; for example, Google Workspace. The integration name is displayed on the login page to help users select the correct sign-in option.
    • Callback mode: Select Auto-select (recommended), which is the default value, unless the identity provider requires another mode.

      Note

      Fragment mode works around the limitations of Single Page Applications (SPAs). Red Hat only supports the Fragment mode for early integrations and does not recommended using it for later integrations.

    • Issuer: The root URL of your identity provider; for example, https://accounts.google.com for Google Workspace. See your identity provider documentation for more information.

      Note

      If you are using RHACS version 3.0.49 and later, for Issuer you can perform these actions:

      • Prefix your root URL with https+insecure:// to skip TLS validation. This configuration is insecure and Red Hat does not recommended it. Only use it for testing purposes.
      • Specify query strings; for example, ?key1=value1&key2=value2 along with the root URL. RHACS appends the value of Issuer as you entered it to the authorization endpoint. You can use it to customize your provider’s login screen. For example, you can optimize the Google Workspace login screen to a specific hosted domain by using the hd parameter, or preselect an authentication method in PingFederate by using the pfidpadapterid parameter.
    • Client ID: The OIDC Client ID for your configured project.
    • Client Secret: Enter the client secret provided by your identity provider (IdP). If you are not using a client secret, which is not recommended, select Do not use Client Secret.
  4. Assign a Minimum access role for users who access RHACS using the selected identity provider.

    Tip

    Set the Minimum access role to Admin while you complete setup. Later, you can return to the Access Control page to set up more tailored access rules based on user metadata from your identity provider.

  5. To add access rules for users and groups accessing RHACS, click Add new rule in the Rules section. For example, to give the Admin role to a user called administrator, you can use the following key-value pairs to create access rules:

    Key

    Value

    Name

    administrator

    Role

    Admin

  6. Click Save.

Verification

  1. In the RHACS portal, go to Platform Configuration Access Control.
  2. Select the Auth providers tab.
  3. Select the authentication provider for which you want to verify the configuration.
  4. Select Test login from the Auth Provider section header. The Test login page opens in a new browser tab.
  5. Log in with your credentials.

    • If you logged in successfully, RHACS shows the User ID and User Attributes that the identity provider sent for the credentials that you used to log in to the system.
    • If your login failed, RHACS shows a message describing why it could not process the identity provider’s response.
  6. Close the Test Login browser tab.

OpenShift Container Platform includes a built-in OAuth server that you can use as an authentication provider for Red Hat Advanced Cluster Security for Kubernetes (RHACS).

18.4.3.1. Requirements and configuration notes

Before configuring OpenShift Container Platform OAuth server as an identity provider, review the following requirements and important configuration notes.

Important
  • If you use a custom TLS certificate for OpenShift Container Platform OAuth server, you must add the root certificate of the CA to Red Hat Advanced Cluster Security for Kubernetes as a trusted root CA. Otherwise, Central cannot connect to the OpenShift Container Platform OAuth server.
  • To enable the OpenShift Container Platform OAuth server integration when installing Red Hat Advanced Cluster Security for Kubernetes using the roxctl CLI, set the ROX_ENABLE_OPENSHIFT_AUTH environment variable to true in Central:

    $ oc -n stackrox set env deploy/central ROX_ENABLE_OPENSHIFT_AUTH=true
  • For access rules, the OpenShift Container Platform OAuth server does not return the key Email.

To integrate the built-in OpenShift Container Platform OAuth server as an identity provider for RHACS, complete the following procedure.

Prerequisites

  • You must have the Access permission to configure identity providers in RHACS.
  • You must have already configured users and groups in OpenShift Container Platform OAuth server through an identity provider. For information about the identity provider requirements, see "Understanding identity provider configuration".
Note

The following procedure configures only a single main route named central for the OpenShift Container Platform OAuth server.

Procedure

  1. In the RHACS portal, go to Platform Configuration Access Control.
  2. Click Create auth provider and select OpenShift Auth from the drop-down list.
  3. Enter a name for the authentication provider in the Name field.
  4. Assign a Minimum access role for users that access RHACS using the selected identity provider. A user must have the permissions granted to this role or a role with higher permissions to log in to RHACS.

    Tip

    For security, Red Hat recommends first setting the Minimum access role to None while you complete setup. Later, you can return to the Access Control page to set up more tailored access rules based on user metadata from your identity provider.

  5. Optional: To add access rules for users and groups accessing RHACS, click Add new rule in the Rules section, then enter the rule information and click Save. You will need attributes for the user or group so that you can configure access.

    Tip

    Group mappings are more robust because groups are usually associated with teams or permissions sets and require modification less often than users.

    To get user information in OpenShift Container Platform, you can use one of the following methods:

    • Click User Management Users <username> YAML.
    • Access the k8s/cluster/user.openshift.io~v1~User/<username>/yaml file and note the values for name, uid (userid in RHACS), and groups.
    • Use the OpenShift Container Platform API as described in the OpenShift Container Platform API reference.

    The following configuration example describes how to configure rules for an Admin role with the following attributes:

    • name: administrator
    • groups: ["system:authenticated", "system:authenticated:oauth", "myAdministratorsGroup"]
    • uid: 12345-00aa-1234-123b-123fcdef1234

    You can add a rule for this administrator role by using one of the following steps:

    • To configure a rule for a name, select name from the Key drop-down list, enter administrator in the Value field, then select Administrator under Role.
    • To configure a rule for a group, select groups from the Key drop-down list, enter myAdministratorsGroup in the Value field, then select Admin under Role.
    • To configure a rule for a user name, select userid from the Key drop-down list, enter 12345-00aa-1234-123b-123fcdef1234 in the Value field, then select Admin under Role.

When you configure OpenShift Container Platform OAuth server as an identity provider by using Red Hat Advanced Cluster Security for Kubernetes portal, RHACS configures only a single route for the OAuth server. However, you can create additional routes by specifying them as annotations in the Central custom resource.

Prerequisites

  • You must have configured service accounts as OAuth clients for your OpenShift Container Platform OAuth server.

Procedure

  • If you installed RHACS using the RHACS Operator:

    1. Create a CENTRAL_ADDITIONAL_ROUTES environment variable that has a patch for the Central custom resource:

      $ CENTRAL_ADDITIONAL_ROUTES='
      spec:
        central:
          exposure:
            loadBalancer:
              enabled: false
              port: 443
            nodePort:
              enabled: false
            route:
              enabled: true
          persistence:
            persistentVolumeClaim:
              claimName: stackrox-db
        customize:
          annotations:
            serviceaccounts.openshift.io/oauth-redirecturi.main: sso/providers/openshift/callback
            serviceaccounts.openshift.io/oauth-redirectreference.main: "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"central\"}}"
            serviceaccounts.openshift.io/oauth-redirecturi.second: sso/providers/openshift/callback
            serviceaccounts.openshift.io/oauth-redirectreference.second: "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"second-central\"}}"
      '

      where:

      spec.customize.annotations.serviceaccounts.openshift.io/oauth-redirecturi.main
      Specifies the redirect URI for setting the main route.
      spec.customize.annotations.serviceaccounts.openshift.io/oauth-redirectreference.main
      Specifies the redirect URI reference for the main route.
      spec.customize.annotations.serviceaccounts.openshift.io/oauth-redirecturi.second
      Specifies the redirect for setting the second route.
      spec.customize.annotations.serviceaccounts.openshift.io/oauth-redirectreference.second
      Specifies the redirect reference for the second route.
    2. Apply the CENTRAL_ADDITIONAL_ROUTES patch to the Central custom resource:

      $ oc patch centrals.platform.stackrox.io \
        -n <namespace> \
        <custom_resource> \
        --patch "$CENTRAL_ADDITIONAL_ROUTES" \
        --type=merge

      where:

      <namespace>
      Specifies the name of the project that has the Central custom resource.
      <custom_resource>
      Specifies the name of the Central custom resource.
  • Or, if you installed RHACS using Helm:

    1. Add the following annotations to your values-public.yaml file:

      customize:
        central:
          annotations:
            serviceaccounts.openshift.io/oauth-redirecturi.main: sso/providers/openshift/callback
            serviceaccounts.openshift.io/oauth-redirectreference.main: "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"central\"}}"
            serviceaccounts.openshift.io/oauth-redirecturi.second: sso/providers/openshift/callback
            serviceaccounts.openshift.io/oauth-redirectreference.second: "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"second-central\"}}"

      where:

      customize.central.annotations.serviceaccounts.openshift.io/oauth-redirecturi.main
      Specifies the redirect for setting the main route.
      customize.central.annotations.serviceaccounts.openshift.io/oauth-redirectreference.main
      Specifies the redirect reference for the main route.
      customize.central.annotations.serviceaccounts.openshift.io/oauth-redirecturi.second
      Specifies the redirect for setting the second route.
      customize.central.annotations.serviceaccounts.openshift.io/oauth-redirectreference.second
      Specifies the redirect reference for the second route.
    2. Apply the custom annotations to the Central custom resource by using helm upgrade:

      $ helm upgrade -n stackrox \
        stackrox-central-services rhacs/central-services \
        -f <path_to_values_public.yaml>

      where:

      <path_to_values_public.yaml>
      Specifies the path of the values-public.yaml configuration file.

To connect an Azure Active Directory (AD) to RHACS using Sign-On (SSO) configuration, you need to add specific claims (for example, group claim to tokens) and assign users, groups, or both to the enterprise application.

Configure the application registration in Azure AD to include group claims in tokens.

Important

Verify that you are using the latest version of Azure AD.

18.5. Removing the admin user

Red Hat Advanced Cluster Security for Kubernetes (RHACS) creates an administrator account, admin, during the installation process that you can use to log in with a user name and password. The password is dynamically generated unless you specifically override it and is unique to your RHACS instance.

In production environments, create an authentication provider and remove the admin user.

18.5.1. Removing the admin user after installation

After you successfully create an authentication provider, remove the admin user. The removal method depends on how you installed RHACS.

Procedure

  • Choose the appropriate method to remove the admin user:

    • For Operator installations, set central.adminPasswordGenerationDisabled to true in your Central custom resource.
    • For Helm installations, complete the following steps:

      1. In your Central Helm configuration, set central.adminPassword.generate to false.
      2. Follow the steps to change the configuration. See "Changing configuration options after deployment" for more information.
    • For roxctl installations, complete the following steps:

      1. When generating the manifest, set Disable password generation to false.
      2. Follow the steps to install Central by using roxctl to apply the changes. See "Install Central using the roxctl CLI" for more information.

Results

After applying the configuration changes, you cannot log in as an admin user.

Note

You can add the admin user again as a fallback by reverting the configuration changes. When you enable the admin user again, the system generates a new password.

18.6. Configuring short-lived access

Red Hat Advanced Cluster Security for Kubernetes (RHACS) provides the ability to configure short-lived access to the user interface and API calls by exchanging OpenID Connect (OIDC) identity tokens.

Note
  • To prevent privilege escalation, when you create a new token, your role’s permissions limit the permission you can assign to that token. For example, if you only have read permission for the Integration resource, you cannot create a token with write permission.
  • If you want a custom role to create tokens for other users to use, you must assign the required permissions to that custom role.
  • Use short-lived tokens for machine-to-machine communication, such as CI/CD pipelines, scripts, and other automation. Also, use the roxctl central login command for human-to-machine communication, such as roxctl CLI or API access.
  • The majority of cloud service providers support OIDC identity tokens, for example, Microsoft Entra ID, Google Cloud Identity Platform, and AWS Cognito. You can use OIDC identity tokens issued by these services for RHACS short-lived access.
  • You can also use third-party OIDC identity tokens directly to access the API endpoint, without an exchange, if a machine-to-machine configuration exists for the token issuer.

18.6.1. Short-lived access overview

You can configure short-lived access by exchanging OpenID Connect (OIDC) identity tokens for RHACS-issued tokens, enabling secure machine-to-machine authentication.

Red Hat recommends this especially for Continuous Integration (CI) usage, where short-lived access is preferable over long-lived API tokens.

The following steps outline the high-level workflow on how to configure short-lived access to the user interface and API calls:

  1. Configure RHACS to trust OIDC identity token issuers for exchanging short-lived RHACS-issued tokens.
  2. Exchange an OIDC identity token for a short-lived RHACS-issued token by calling the API.

Start configuring short-lived access for an OpenID Connect (OIDC) identity token issuer.

Procedure

  1. In the RHACS portal, go to Platform Configuration Integrations.
  2. Scroll to the Authentication Tokens category, and then click Machine access configuration.
  3. Click Create configuration.
  4. Select the configuration type, choosing one of the following:

    • Generic if you use an arbitrary OIDC identity token issuer.
    • GitHub Actions if you plan to access RHACS from GitHub Actions.
  5. Enter the OIDC identity token issuer.
  6. Enter the token lifetime for tokens issued by the configuration.

    Note

    The format for the token lifetime is XhYmZs and you cannot set it for longer than 24 hours.

  7. Add rules to the configuration:

    • The Key is the OIDC token’s claim to use.
    • The Value is the expected OIDC token claim value.
    • The Role is the role to assign to the token if the OIDC token claim and value exist.

      Note

      Rules are similar to Authentication Provider rules to assign roles based on claim values.

      As a general rule, Red Hat recommends to use unique, immutable claims within Rules. The general recommendation is to use the sub claim within the OIDC identity token. For more information about OIDC token claims, see the "Standard OIDC claims" documentation.

  8. Click Save.

18.6.3. Exchanging an identity token

You can exchange a valid OpenID Connect (OIDC) identity token for a short-lived RHACS-issued access token by sending a POST request to the API.

Prerequisites

  • You have a valid OpenID Connect (OIDC) token.
  • You added a Machine access configuration for the RHACS instance you want to access.

Procedure

  1. Prepare the POST request’s JSON data:

    {
        "idToken": "<id_token>"
    }
  2. Send a POST request to the API /v1/auth/m2m/exchange.
  3. Wait for the API response:

    {
        "accessToken": "<access_token>"
    }
  4. Use the returned access token to access the RHACS instance.

    Note

    If you are using GitHub Actions, you can use the "stackrox/central-login GitHub Action".

18.7. Understanding multi-tenancy

Red Hat Advanced Cluster Security for Kubernetes provides ways to implement multi-tenancy within a Central instance by using role-based access control (RBAC) and access scopes.

18.7.1. Understanding resource scoping

RHACS resources use global, cluster, or namespace scoping levels, which determines how you can use them in custom access scopes for multi-tenancy.

RHACS includes resources that RBAC uses. In addition to associating permissions for a resource, RHACS also scopes each resource.

In RHACS, resources use the following scope types:

  • Global scope, where the resource does not assign to any cluster or namespace
  • Cluster scope, where you assign the resource to particular clusters
  • Namespace scope, where you assign the resource to particular namespaces

The scope of resources is important when creating custom access scopes. Custom access scopes create multi-tenancy within RHACS.

Only resources that use cluster or namespace scoping are applicable for scoping in access scopes. Access scopes do not scope globally scoped resources. Therefore, you can only achieve multi-tenancy within RHACS for resources that use either cluster or namespace scoping.

A common multi-tenancy pattern associates users with specific namespaces, allowing them access only to their designated namespace through a combination of custom permission sets, access scopes, and roles.

A common example for multi-tenancy within RHACS is associating users with a specific namespace and only allowing them access to their specific namespace.

The following example combines a custom permission set, access scope, and role. The user or group assigned with this role can only see CVE information, violations, and information about deployments in the particular namespace or cluster scoped to them.

18.7.2.1. Configuring multi-tenancy per namespace

You can configure multi-tenancy by creating a custom permission set, access scope, and role that restricts user access to a specific namespace.

Procedure

  1. In the RHACS portal, select Platform Configuration Access Control.
  2. Select Permission Sets.
  3. Click Create permission set.
  4. Enter a Name and Description for the permission set.
  5. Select the following resources and access level and click Save:

    • READ Alert
    • READ Deployment
    • READ DeploymentExtension
    • READ Image
    • READ K8sRole
    • READ K8sRoleBinding
    • READ K8sSubject
    • READ NetworkGraph
    • READ NetworkPolicy
    • READ Secret
    • READ ServiceAccount
  6. Select Access Scopes.
  7. Click Create access scope.
  8. Enter a Name and Description for the access scope.
  9. In the Allowed resources section, select the namespace you want to use for scoping and click Save.
  10. Select Roles.
  11. Click Create role.
  12. Enter a Name and Description for the role.
  13. Select the Permission Set and Access scope that you created before for the role and click Save.
  14. Assign the role to your required user or group.

    Note

    The RHACS dashboard options for users with the sample role are minimal compared to options available to an administrator. Only relevant pages are visible for the user.

18.7.3. Limitations

Multi-tenancy within RHACS is not possible for resources with a global scope, which all users within a Central instance share.

Achieving multi-tenancy within RHACS is not possible for resources with a global scope.

The following resources have a global scope:

  • Access
  • Administration
  • Detection
  • Integration
  • VulnerabilityManagementApprovals
  • VulnerabilityManagementRequests
  • WatchedImage
  • WorkflowAdministration

All users within a RHACS Central instance share these resources and you cannot scope them.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top