1.6. About Lightspeed and Role Based Access Control (RBAC)


Role-Based Access Control (RBAC) is a system security approach to restricting system access to authorized users who have defined roles and permissions.

OpenShift Lightspeed RBAC is binary. By default, not all cluster users have access to the OpenShift Lightspeed interface. Access must be granted by a user who can grant permissions. All users of an OpenShift cluster with OpenShift Lightspeed installed can see the OpenShift Lightspeed button; however, only users with permissions can submit questions to OpenShift Lightspeed.

If you want to evaluate the RBAC features of OpenShift Lightspeed, your cluster will need users other than the kubeadmin account. The kubeadmin account always has access to OpenShift Lightspeed.

1.6.1. Granting access to an individual user

This procedure explains how to grant access to an individual user.

Prerequisites

  • You are logged in to the OpenShift Container Platform web console as a user with the cluster-admin role. Alternatively, you are logged in as a user with the ability to grant permissions.
  • You have deployed the OpenShift Lightspeed service.
  • You have access to the OpenShift CLI (oc).

Procedure

  • Run the following command at the command line:

    $ oc adm policy add-cluster-role-to-user \
    lightspeed-operator-query-access <user_name>

    Alternatively, you can use a YAML file when granting access to an individual user by using the following command:

    $ oc adm policy add-cluster-role-to-user lightspeed-operator-query-access <user_name> -o yaml --dry-run

    The terminal returns the following output:

    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      creationTimestamp: null
      name: lightspeed-operator-query-access
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: ClusterRole
      name: lightspeed-operator-query-access
    subjects:
    - apiGroup: rbac.authorization.k8s.io
      kind: User
      name: <user_name> 
    1
    1
    Enter the actual user name in place of <user_name> before creating the object.

    Save the output as a YAML file, and run the following command to grant user access:

    $ oc create -f <filename>

1.6.2. Granting access to a user group

This procedure explains how to grant access to a user group. If your cluster has more advanced identity management configured, including user groups, you can grant all users of a specific group access to the OpenShift Lightspeed service.

Prerequisites

  • You are logged in to the OpenShift Container Platform web console as a user with the cluster-admin role. Alternatively, you are logged in as a user with the ability to grant permissions.
  • You have deployed the OpenShift Lightspeed service.
  • You have access to the OpenShift CLI (oc).

Procedure

  • Run the following command at the command line:

    $ oc adm policy add-cluster-role-to-group \
    lightspeed-operator-query-access <group_name>

    Alternatively, you can use a YAML file when granting access to a user group by using the following command:

    $ oc adm policy add-cluster-role-to-group lightspeed-operator-query-access <group_name> -o yaml --dry-run

    The terminal returns the following output:

    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      creationTimestamp: null
      name: lightspeed-operator-query-access
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: ClusterRole
      name: lightspeed-operator-query-access
    subjects:
    - apiGroup: rbac.authorization.k8s.io
      kind: Group
      name: <user_group> 
    1
    1
    Enter the actual user group in place of <user_group> before creating the object.

    Save the output as a YAML file, and run the following command to grant access to the user group:

    $ oc create -f <filename>
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部