部署指南


Red Hat Trusted Profile Analyzer 2

在 Red Hat Enterprise Linux 和 Red Hat OpenShift 上部署 Trusted Profile Analyzer 服务

Red Hat Trusted Documentation Team

摘要

此部署指南提供有关在 Red Hat Enterprise Linux 和 Red Hat OpenShift Container Platform 上安装红帽受信任的配置文件分析器服务的系统管理员信息。
红帽承诺替换我们的代码、文档和网页属性中存在问题的语言。我们从这四个术语开始:master、slave、黑名单和白名单。由于此项工作十分艰巨,这些更改将在即将推出的几个发行版本中逐步实施。详情请查看 CTO Chris Wright 信息

前言

欢迎使用红帽受信任的配置文件分析器(RHTPA)部署指南!

本指南帮助您在 Red Hat OpenShift Container Platform 或 Red Hat Enterprise Linux 上部署 Red Hat Trusted Profile Analyzer (RHTPA)软件堆栈。对于新的 RHTPA 部署,首先选择 您的目标安装平台

第 1 章 选择安装平台

作为系统管理员,您可以选择两个不同的安装平台来运行 Red Hat Trusted Profile Analyzer (RHTPA)。您可以将 RHTPA 部署到使用 Amazon Web Services (AWS)或其他红帽 Helm Chart 的 Red Hat OpenShift Container Platform。您还可以使用 Ansible 将 RHTPA 部署到 Red Hat Enterprise Linux。

注意

要使用 AWS 以外的基础架构服务,请创建一个支持问题单来帮助 集成其他兼容供应商。

选择您的目标安装平台:

1.1. 使用 Ansible 安装受信任的配置文件分析器

您可以使用红帽提供的 Ansible Playbook 在 Red Hat Enterprise Linux 上安装 Red Hat Trusted Profile Analyzer (RHTPA)。此 Ansible 部署 RHTPA 允许您指定自己的 PostgreSQL 数据库、OpenID Connect (OIDC)供应商和简单存储服务(S3)供应商。

重要

使用 Ansible 在 Red Hat Enterprise Linux 上部署 RHTPA 只是一个技术预览功能。技术预览功能不包括在红帽生产服务级别协议(SLA)中,且其功能可能并不完善。因此,红帽不建议在生产环境中使用它们。这些功能可让您尽早访问即将推出的产品功能,使客户能够在开发过程中测试并提供反馈。如需了解更多详细信息,请参阅红帽技术预览功能的支持范围。

先决条件

  • Red Hat Enterprise Linux 9.3 或更高版本。
  • 用于访问 Red Hat Hybrid Cloud 控制台的红帽用户帐户。

流程

  1. 使用您的红帽凭证登录到 Red Hat Hybrid Cloud Console
  2. 在主页中,点 Services 下拉菜单,然后点 Red Hat Ansible Automation Platform
  3. 在导航菜单中展开 Automation Hub,然后点 Collections
  4. 在搜索字段中,键入 rhtpa 并按 enter。
  5. 点 Red Hat Trusted Profile Analyzer 标题上的 trusted_profile_analyzer 链接。
  6. 单击 Documentation 选项卡,然后按照以下步骤在 Red Hat Enterprise Linux 上完成 RHTPA 安装。

    注意

    有关所有配置参数的详细概述,请单击 Roles 部分下的 tpa_single_node 链接。

1.2. 使用带有 Amazon Web Services 的 Helm 安装受信任的配置文件分析器

您可以使用来自红帽的 Helm Chart 在 OpenShift 上安装红帽受信任的配置文件分析器(RHTPA)服务。此流程指导您通过使用 Helm 的自定义值文件将 Amazon Web Services (AWS)与 RHTPA 集成。

重要

如果机密值在安装后发生变化,OpenShift 会重新部署 RHTPA。

先决条件

  • 一个运行 4.14 或更高版本的 Red Hat OpenShift Container Platform 集群。

    • 支持 Ingress 资源来提供使用 HTTPS 的公开可信证书。
  • Helm 版本 3.17 或更高版本。
  • 为 Helm 置备传输层安全(TLS)证书 的功能。
  • 可访问以下服务的 AWS 帐户:

    • 简单存储服务(S3)
    • 使用 PostgreSQL 数据库实例进行关系数据库服务(RDS)
    • Cognito 与现有 Cognito 域.
  • 创建了以下 未指定版本的 S3 存储桶名称: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-overview.html

    • trustify-UNIQUE_ID
    重要

    这个存储桶名称必须在同一分区中的所有 AWS 区域中的所有 AWS 帐户之间唯一。有关 存储桶命名规则 的更多信息,请参阅 Amazon 的 S3 文档。

  • 使用 cluster-admin 角色访问 OpenShift Web 控制台。
  • 安装了 ochelm 二进制文件的工作站。

流程

  1. 在工作站中,打开一个终端,然后使用命令行界面登录到 OpenShift:

    语法

    oc login --token=TOKEN --server=SERVER_URL_AND_PORT

    Example

    $ oc login --token=sha256~ZvFDBvoIYAbVECixS4-WmkN4RfnNd8Neh3y1WuiFPXC --server=https://example.com:6443

    注意

    您可以从 OpenShift Web 控制台找到要在命令行中使用的登录令牌和 URL。登录 OpenShift Web 控制台。点您的用户名,然后点 Copy login 命令。再次提供您的用户名和密码,然后单击 Display Token 以查看该命令。

  2. 为 RHTPA 部署创建一个新项目:

    语法

    oc new-project PROJECT_NAME

    Example

    $ oc new-project trusted-profile-analyzer

  3. 打开新文件进行编辑:

    Example

    $ vi values-rhtpa-aws.yaml

  4. RHTPA 值文件模板 复制并粘贴到新 values-rhtpa-aws.yaml 文件中。
  5. 使用相关的 AWS 信息更新 values-rhtpa-aws.yaml 文件。

    1. REGION,USER_POOL_ID,FRONTEND_CLIENT_ID, 和 WALKER_CLIENT_ID 替换为相关的 Amazon Cognito 信息。您可以在 User pool overview 部分的 AWS Cognito Console 中找到此信息。
    2. UNIQUE_ID 替换为您的 trustify- S3 存储桶的唯一存储桶名称。
    3. 保存文件并退出编辑器。
  6. 使用您的 AWS 凭证创建 S3 存储 secret 资源:

    语法

    apiVersion: v1
    kind: Secret
    metadata:
      name: storage-credentials
      namespace: PROJECT_NAME
    type: Opaque
    data:
      aws_access_key_id: AWS_ACCESS_KEY
      aws_secret_access_key: AWS_SECRET_KEY

    Example

    $ cat <<EOF | oc apply -f -
    apiVersion: v1
    kind: Secret
    metadata:
      name: storage-credentials
      namespace: trusted-profile-analyzer
    type: Opaque
    data:
      aws_access_key_id: RHTPASTORAGE1EXAMPLE
      aws_secret_access_key: xBalrKUtnFEMI/K7RDENG/aPxRfzCYEXAMPLEKEY
    EOF

  7. 创建 OpenID Connect (OIDC)指导客户端 secret 资源:

    语法

    apiVersion: v1
    kind: Secret
    metadata:
      name: oidc-walker
      namespace: PROJECT_NAME
    type: Opaque
    data:
      client-secret: SECRET

    Example

    $ cat <<EOF | oc apply -f -
    apiVersion: v1
    kind: Secret
    metadata:
      name: oidc-walker
      namespace: trusted-profile-analyzer
    type: Opaque
    data:
      client-secret: 5460cc91-4e20-4edd-881c-b15b169f8a79
    EOF

  8. 使用您的 Amazon RDS 凭据创建两个 PostgreSQL 数据库机密资源。

    1. PostgreSQL 标准用户 secret 资源:

      语法

      apiVersion: v1
      kind: Secret
      metadata:
        name: postgresql-credentials
        namespace: PROJECT_NAME
      type: Opaque
      data:
        db.host: DB_HOST
        db.name: DB_NAME
        db.user: USERNAME
        db.password: PASSWORD
        db.port: PORT

      Example

      $ cat <<EOF | oc apply -f -
      apiVersion: v1
      kind: Secret
      metadata:
        name: postgresql-credentials
        namespace: trusted-profile-analyzer
      type: Opaque
      data:
        data:
        db.host: rds.us-east-1.amazonaws.com
        db.name: rhtpadb
        db.user: jdoe
        db.password: example1234
        db.port: 5432
      EOF

    2. PostgreSQL 管理员 secret 资源:

      语法

      apiVersion: v1
      kind: Secret
      metadata:
        name: postgresql-admin-credentials
        namespace: PROJECT_NAME
      type: Opaque
      data:
        db.host: DB_HOST
        db.name: DB_NAME
        db.user: USERNAME
        db.password: PASSWORD
        db.port: PORT

      Example

      $ cat <<EOF | oc apply -f -
      apiVersion: v1
      kind: Secret
      metadata:
        name: postgresql-admin-credentials
        namespace: trusted-profile-analyzer
      type: Opaque
      data:
        data:
        db.host: rds.us-east-1.amazonaws.com
        db.name: rhtpadb
        db.user: admin
        db.password: example1234
        db.port: 5432
      EOF

    3. 在 AWS 管理控制台中配置 Amazon Virtual Private Cloud (VPC)安全组,以允许端口 5432。
  9. 打开新文件进行编辑:

    Example

    $ vi values-importers.yaml

  10. RHTPA importers 值文件模板 复制并粘贴到新 values-importers.yaml 文件中。
  11. 保存文件并退出编辑器。
  12. 设置 shell 环境:

    语法

    export NAMESPACE=PROJECT_NAME
    export APP_DOMAIN_URL=-$NAMESPACE.$(oc -n openshift-ingress-operator get ingresscontrollers.operator.openshift.io default -o jsonpath='{.status.domain}')

    Example

    $ export NAMESPACE=trusted-profile-analyzer
    $ export APP_DOMAIN_URL=-$NAMESPACE.$(oc -n openshift-ingress-operator get ingresscontrollers.operator.openshift.io default -o jsonpath='{.status.domain}')

  13. 添加 OpenShift Helm Chart 仓库:

    Example

    $ helm repo add openshift-helm-charts https://charts.openshift.io/

  14. 从 Helm Chart 仓库中获取最新的 Chart 信息:

    Example

    $ helm repo update

  15. 运行 Helm Chart:

    语法

    helm upgrade redhat-trusted-profile-analyzer openshift-helm-charts/redhat-trusted-profile-analyzer -n $NAMESPACE --values PATH_TO_VALUES_FILE --values PATH_TO_IMPORTER_VALUES_FILE --set-string appDomain=$APP_DOMAIN_URL

    Example

    $ helm upgrade redhat-trusted-profile-analyzer openshift-helm-charts/redhat-trusted-profile-analyzer -n $NAMESPACE --values values-rhtpa-aws.yaml --values values-importers.yaml --set-string appDomain=$APP_DOMAIN_URL

    注意

    您可以多次运行此 Helm Chart,从 values 文件中应用当前配置的状态。

  16. 安装完成后,您可以使用 Cognito 用户池中的用户凭据来登录 RHTPA 控制台。您可以运行以下命令来找到 RHTPA 控制台 URL:

    Example

    $ oc -n $NAMESPACE get route --selector app.kubernetes.io/name=server -o jsonpath='https://{.items[0].status.ingress[0].host}{"\n"}'

其他资源

附录 A. 使用 AWS 值文件模板的 Red Hat Trusted Profile Analyzer

红帽的 Trusted Profile Analyzer (RHTPA)带有 Amazon Web Services (AWS)值文件模板,供 RHTPA Helm Chart 使用。

模板

appDomain: $APP_DOMAIN_URL

ingress:
  className: openshift-default
  additionalAnnotations:
    "haproxy.router.openshift.io/timeout": "5m"

authenticator:
  type: cognito

storage:
  type: s3
  region: REGION
  bucket: trustify-UNIQUE_ID
  accessKey:
    valueFrom:
      secretKeyRef:
        name: storage-credentials
        key: aws_access_key_id
  secretKey:
    valueFrom:
      secretKeyRef:
        name: storage-credentials
        key: aws_secret_access_key

database:
  sslMode: require
  host:
    valueFrom:
      secretKeyRef:
        name: postgresql-credentials
        key: db.host
  port:
    valueFrom:
      secretKeyRef:
        name: postgresql-credentials
        key: db.port
  name:
    valueFrom:
      secretKeyRef:
        name: postgresql-credentials
        key: db.name
  username:
    valueFrom:
      secretKeyRef:
        name: postgresql-credentials
        key: db.user
  password:
    valueFrom:
      secretKeyRef:
        name: postgresql-credentials
        key: db.password

createDatabase:
  name:
    valueFrom:
      secretKeyRef:
        name: postgresql-admin-credentials
        key: db.name
  username:
    valueFrom:
      secretKeyRef:
        name: postgresql-admin-credentials
        key: db.user
  password:
    valueFrom:
      secretKeyRef:
        name: postgresql-admin-credentials
        key: db.password

migrateDatabase:
  username:
    valueFrom:
      secretKeyRef:
        name: postgresql-admin-credentials
        key: db.user
  password:
    valueFrom:
      secretKeyRef:
        name: postgresql-admin-credentials
        key: db.password

modules:
  createDatabase:
    enabled: true
  migrateDatabase:
    enabled: true

oidc:
  issuerUrl: https://cognito-idp.REGION.amazonaws.com/USER_POOL_ID
  clients:
    frontend:
      clientId: FRONTEND_CLIENT_ID
    cli:
      clientId: WALKER_CLIENT_ID
      clientSecret:
        valueFrom:
          secretKeyRef:
            name: oidc-cli
            key: client-secret

附录 B. Red Hat Trusted Profile Analyzer importer 值文件模板

红帽的受信任的配置文件分析器(RHTPA)值文件模板包含 RHTPA Helm Chart 使用的默认导入器。

模板

$schema: "charts/trustify/values.schema.json"

appDomain: asdf
tracing: {}

modules:
  createImporters:
    enabled: true
    importers:
      redhat-sboms:
        sbom:
          description: All Red Hat SBOMs
          period: 1d
          source: https://access.redhat.com/security/data/sbom/beta/
          keys:
            - https://access.redhat.com/security/data/97f5eac4.txt#77E79ABE93673533ED09EBE2DCE3823597F5EAC4
          disabled: true
          fetchRetries: 50
      redhat-csaf:
        csaf:
          description: All Red Hat CSAF data
          period: 1d
          source: redhat.com
          disabled: true
          fetchRetries: 50
      cve:
        cve:
          description: CVE list v5
          period: 1d
          source: https://github.com/CVEProject/cvelistV5
          disabled: false
      osv-github:
        osv:
          description: GitHub Advisory Database
          period: 1d
          source: https://github.com/github/advisory-database
          path: advisories
          disabled: false

法律通告

Copyright © 2025 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat, Inc.