UiPath Documentation
automation-suite
2.2510
true
OpenShift 上的 Automation Suite 安装指南
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

配置 Insights 自定义安全上下文

为 Insights 配置自定义安全上下文,以在 OpenShift 上启用 Chromium SUID 沙盒功能。

Insights 应用程序具有多个使用 Chromium Linux SUID 沙盒的功能。 因此,虽然安装 Insights 应用程序本身并不需要提升的访问权限,但对于特定功能来说,提升的访问权限至关重要。

  1. 将配置文件另存为 YAML 文件,然后执行以下命令。 确保将<file_name.yaml>占位符替换为 YAML 文件使用的实际名称: oc apply -f <file_name.yaml> 。

    allowedCapabilities:
      - SETUID
    apiVersion: security.openshift.io/v1
    fsGroup:
      type: MustRunAs
    groups: []
    kind: SecurityContextConstraints
    metadata:
      name: insights-scc
    readOnlyRootFilesystem: false
    runAsUser:
      type: MustRunAsRange
    seLinuxContext:
      type: MustRunAs
    supplementalGroups:
      type: RunAsAny
    users: []
    volumes:
      - configMap
      - csi
      - downwardAPI
      - emptyDir
      - ephemeral
      - persistentVolumeClaim
      - projected
      - secret
    allowedCapabilities:
      - SETUID
    apiVersion: security.openshift.io/v1
    fsGroup:
      type: MustRunAs
    groups: []
    kind: SecurityContextConstraints
    metadata:
      name: insights-scc
    readOnlyRootFilesystem: false
    runAsUser:
      type: MustRunAsRange
    seLinuxContext:
      type: MustRunAs
    supplementalGroups:
      type: RunAsAny
    users: []
    volumes:
      - configMap
      - csi
      - downwardAPI
      - emptyDir
      - ephemeral
      - persistentVolumeClaim
      - projected
      - secret
    
  2. 将以下内容保存在名为<file_name.yaml>的文件中,以创建访问安全上下文约束的角色:

    kind: Role
    apiVersion: rbac.authorization.k8s.io/v1
    metadata:
      name: insights-scc-role
      namespace: <uipath>
    rules:
      - verbs:
          - use
        apiGroups:
          - security.openshift.io
        resources:
          - securitycontextconstraints
        resourceNames:
          - insights-scc
    kind: Role
    apiVersion: rbac.authorization.k8s.io/v1
    metadata:
      name: insights-scc-role
      namespace: <uipath>
    rules:
      - verbs:
          - use
        apiGroups:
          - security.openshift.io
        resources:
          - securitycontextconstraints
        resourceNames:
          - insights-scc
    

    通过执行以下命令创建一个角色以访问安全上下文约束: oc apply -f <file_name.yaml> 。 确保将<file_name.yaml>占位符替换为 YAML 文件使用的实际名称。

  3. 将以下内容保存在名为<file_name.yaml>的文件中,以创建角色绑定,进而将先前定义的角色绑定到 Insights 服务帐户:

    kind: RoleBinding
    apiVersion: rbac.authorization.k8s.io/v1
    metadata:
      name: insights-scc-rolebinding
      namespace: <uipath>
    subjects:
      - kind: ServiceAccount
        name: insightslooker-sa
        namespace: <uipath>
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: Role
      name: insights-scc-role
    kind: RoleBinding
    apiVersion: rbac.authorization.k8s.io/v1
    metadata:
      name: insights-scc-rolebinding
      namespace: <uipath>
    subjects:
      - kind: ServiceAccount
        name: insightslooker-sa
        namespace: <uipath>
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: Role
      name: insights-scc-role
    

    通过执行以下命令,创建角色绑定,以将先前定义的角色绑定到 Insights 服务帐户: oc apply -f <file_name.yaml> 。确保将<file_name.yaml>占位符替换为 YAML 文件使用的实际名称。

  4. 导航到 ArgoCD,然后禁用 Insights自动同步。

  5. 更新Insights Looker状态副本集中Insights Looker的安全上下文。添加SETUID功能:

    capabilities:
     add:
      - SETUID
     drop:
      - ALL
    capabilities:
     add:
      - SETUID
     drop:
      - ALL
    
  6. 推出restart statefulset :

    oc -n <uipath> rollout restart statefulset/insights-insightslooker
    oc -n <uipath> rollout restart statefulset/insights-insightslooker
    

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新