Deployment Guide
Deploying the Trusted Profile Analyzer service on Red Hat Enterprise Linux and Red Hat OpenShift
Abstract
Preface Copy linkLink copied to clipboard!
Welcome to the Red Hat Trusted Profile Analyzer (RHTPA) Deployment Guide!
This guide helps you with deploying the Red Hat Trusted Profile Analyzer (RHTPA) software stack on Red Hat OpenShift Container Platform or on Red Hat Enterprise Linux. For new RHTPA deployments, start by choosing your target installation platform.
You can view the official RHTPA Release Notes here.
Chapter 1. Select your installation platform Copy linkLink copied to clipboard!
As as systems administrator, you can select two different installation platforms to run Red Hat Trusted Profile Analyzer (RHTPA). You can deploy RHTPA to Red Hat OpenShift Container Platform or Red Hat Enterprise Linux. You also can select to use Red Hat services, such as single sign-on (SSO) and OpenShift Data Foundation, or you can use Amazon Web Services (AWS) as the infrastructure for authentication, storage, and database access.
Select your target installation platform:
1.1. Installing Trusted Profile Analyzer by using Ansible Copy linkLink copied to clipboard!
You can install the Red Hat Trusted Profile Analyzer (RHTPA) on Red Hat Enterprise Linux by using a Red Hat provided Ansible Playbook. This Ansible deployment of RHTPA allows you to specify your own PostgreSQL database, OpenID Connect (OIDC) provider, and a Simple Storage Service (S3) provider.
Prerequisites
- Red Hat Enterprise Linux version 9.3 or later.
- A Red Hat user account to access the Red Hat Hybrid Cloud Console.
- A configured OIDC provider, either Red Hat’s SSO or Amazon Cognito.
- A storage provider, either Red Hat OpenShift Data Foundation or Amazon S3.
- An available PostgreSQL or Amazon RDS database instance.
Procedure
- Log in to the Red Hat Hybrid Cloud Console with your Red Hat credentials.
- From the home page, click the Services drop-down menu, and click Red Hat Ansible Automation Platform.
- From the navigational menu, expand Automation Hub, and click Collections.
- In the search field type rhtpa and press enter.
- Click the trusted_profile_analyzer link on the Red Hat Trusted Profile Analyzer tile.
Click the Documentation tab, and follow the steps there to complete the installation of RHTPA on Red Hat Enterprise Linux.
NoteFor a detailed overview of all the configuration parameters, click the tpa_single_node link under the Roles section.
1.2. Resource recommendations for deploying on OpenShift Copy linkLink copied to clipboard!
Understanding how to size the infrastructure resources before deploying Red Hat Trusted Profile Analyzer (RHTPA) on Red Hat OpenShift is important for running an optimal service under load. The key infrastructure pieces to consider are persistent storage for the PostgreSQL database, which stores the supply chain metadata, and object storage for storing Software Bill of Material (SBOM) and Vulnerability Exploitability eXchange (VEX) documents. The size of your object store depends on how many SBOM and VEX documents you plan to initially upload to RHTPA. Also consider your projected storage growth as you add or update your documents, and then include a buffer for unexpected growth into your storage estimate.
For example, if you upload 10,000 SBOM documents, with an average document size of 500 KB, your initial object storage size is 5 GB. Over the next year, you create new SBOM documents, or update your existing SBOM documents 100 times a day, then you can estimate your object storage growth. In this example, you can plan on a growth in storage of 18.25 GB over the next year. Adding in some buffer, say 20%, your estimated total object storage allocation would be roughly 28 GB.
Here are the baseline CPU, memory, and storage resources you can start with:
- 4 CPU cores
- 8 GB of RAM
- 45 GB of storage for database
- 45 GB of storage for objects
1.3. Installing Trusted Profile Analyzer using the Operator Lifecycle Manager Copy linkLink copied to clipboard!
You can install the Red Hat Trusted Profile Analyzer (RHTPA) Operator, and deploy the RHTPA service by using OpenShift’s Operator Lifecycle Manager (OLM). This deployment gives you a basic RHTPA environment, and a web-based user interface (UI) to manage the service. You can configure either Red Hat’s single sign-on (SSO) technology or Amazon Web Services' (AWS) Cognito as an OpenID Connect (OIDC) provider. You can configure either Red Hat’s OpenShift Data Foundation or AWS S3 for storage. You can also configure either a PostgreSQL database or use Amazon’s Relational Database Service (RDS) to store advisory and analytical data.
Deploying the RHTPA operator on OpenShift is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs), might not be functionally complete, and Red Hat does not recommend to use them for production. These features give early access to upcoming product features, enabling customers to test functionality and give their feedback during the development process. See the support scope for Red Hat Technology Preview features for more details.
Prerequisites
- Red Hat OpenShift Container Platform 4.16 or later.
-
Access to the OpenShift web console with the
cluster-admin
role. - A configured OIDC provider, either Red Hat’s SSO or Amazon Cognito.
- A storage provider, either Red Hat OpenShift Data Foundation or Amazon S3.
- An available PostgreSQL or Amazon RDS database instance.
Procedure
-
Log in to the OpenShift web console with a user that has the
cluster-admin
role. - From the Administrator perspective, expand the Operators navigation menu, and click OperatorHub.
- In the search field, type trusted, and click the Red Hat Trusted Profile Analyzer tile.
- Click the Install button to show the operator details.
- On the Install Operator page, select your installation namespace from the drop-down menu, or create a new project namespace. Accept the rest of the default values, and click the Install button. Wait for the installation to finish.
- Once the installation of the RHTPA operator finishes, click the View Operator button.
To deploy the Trusted Profile Analyzer service.
- On the Red Hat Trusted Profile Analyzer Operator page, under the Details tab, click the Create instance link on the TrustedProfileAnalyzer tile.
- On the Create TrustedProfileAnalyzer page, select YAML view.
-
Copy the OIDC provider, storage, and importer sections from the Helm chart for AWS services or Red Hat services, and paste them under the
spec
section. - Update the OIDC provider, storage, and importer values for your environment.
- Click the Create button.
- You can check on the health of the new Trusted Profile Analyzer service by checking that the pods are up and running. You can also verify the exposure of the access route URL, and that the Trusted Profile Analyzer service is accessible.
1.4. Installing Trusted Profile Analyzer by using Helm with Amazon Web Services Copy linkLink copied to clipboard!
You can install Red Hat’s Trusted Profile Analyzer (RHTPA) service on OpenShift by using a Helm chart from Red Hat. This procedure guides you on integrating Amazon Web Services (AWS) with RHTPA by using a customized values file for Helm.
If the secret values change after the installation, OpenShift redeploys RHTPA.
Prerequisites
A Red Hat OpenShift Container Platform cluster running version 4.15 or later.
- Support for the Ingress resource to serve publicly trusted certificates that use HTTPS.
- Helm version 3.17 or higher.
- The ability to provision Transport Layer Security (TLS) certificates for Helm.
An AWS account with access to the following services:
- Simple Storage Service (S3)
- Relational Database Service (RDS) using a PostgreSQL database instance.
- Cognito with an existing Cognito domain.
Have the following unversioned S3 bucket name created:
-
trustify-UNIQUE_ID
ImportantThis bucket name must be unique across all AWS accounts in all AWS regions within the same partition. See Amazon’s S3 documentation for more information on bucket naming rules.
-
-
Access to the OpenShift web console with the
cluster-admin
role. -
A workstation with the
oc
, and thehelm
binaries installed.
Procedure
On your workstation, open a terminal, and log in to OpenShift by using the command-line interface:
oc login --token=TOKEN --server=SERVER_URL_AND_PORT
oc login --token=TOKEN --server=SERVER_URL_AND_PORT
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc login --token=sha256~ZvFDBvoIYAbVECixS4-WmkN4RfnNd8Neh3y1WuiFPXC --server=https://example.com:6443
$ oc login --token=sha256~ZvFDBvoIYAbVECixS4-WmkN4RfnNd8Neh3y1WuiFPXC --server=https://example.com:6443
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteYou can find your login token and URL from the OpenShift web console to use on the command line. Log in to the OpenShift web console. Click your user name, and click Copy login command. Offer your user name and password again, and click Display Token to view the command.
Create a new project for the RHTPA deployment:
oc new-project PROJECT_NAME
oc new-project PROJECT_NAME
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc new-project trusted-profile-analyzer
$ oc new-project trusted-profile-analyzer
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Open a new file for editing:
vi values-rhtpa.yaml
$ vi values-rhtpa.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Copy and paste the RHTPA values file template into the new
values-rhtpa.yaml
file. Update the
values-rhtpa.yaml
file with your relevant AWS information.- Replace REGION, USER_POOL_ID, FRONTEND_CLIENT_ID, and CLI_CLIENT_ID with your relevant Amazon Cognito information. You can find this information in the AWS Cognito Console, in the User pool overview section.
-
Replace UNIQUE_ID with your unique bucket name for the
trustify-
S3 bucket. - Save the file, and quit the editor.
Create the S3 storage secret resource by using your AWS credentials:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a OpenID Connect (OIDC) client secret resource:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create two PostgreSQL database secret resources by using your Amazon RDS credentials.
A PostgreSQL standard user secret resource:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow A PostgreSQL administrator secret resource:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow - From the AWS Management Console, configure the Amazon Virtual Private Cloud (VPC) security group to allow port 5432.
Open a new file for editing:
vi values-importers.yaml
$ vi values-importers.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Copy and paste the RHTPA importers values file template into the new
values-importers.yaml
file. - Save the file, and quit the editor.
-
Copy and paste the RHTPA importers values file template into the new
Set up your shell environment:
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}')
$ 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}')
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add the OpenShift Helm chart repository:
helm repo add openshift-helm-charts https://charts.openshift.io/
$ helm repo add openshift-helm-charts https://charts.openshift.io/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get the latest chart information from the Helm chart repositories:
helm repo update
$ helm repo update
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the Helm chart:
helm upgrade --install 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
helm upgrade --install 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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow helm upgrade --install redhat-trusted-profile-analyzer openshift-helm-charts/redhat-trusted-profile-analyzer -n $NAMESPACE --values values-rhtpa.yaml --values values-importers.yaml --set-string appDomain=$APP_DOMAIN_URL
$ helm upgrade --install redhat-trusted-profile-analyzer openshift-helm-charts/redhat-trusted-profile-analyzer -n $NAMESPACE --values values-rhtpa.yaml --values values-importers.yaml --set-string appDomain=$APP_DOMAIN_URL
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteYou can run this Helm chart many times to apply the currently configured state from the values file.
Once the installation finishes, you can log in to the RHTPA console by using the user credentials from your OIDC provider. You can find the RHTPA console URL by running the following command:
oc -n $NAMESPACE get route --selector app.kubernetes.io/name=server -o jsonpath='https://{.items[0].status.ingress[0].host}{"\n"}'
$ oc -n $NAMESPACE get route --selector app.kubernetes.io/name=server -o jsonpath='https://{.items[0].status.ingress[0].host}{"\n"}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
1.5. Installing Trusted Profile Analyzer by using Helm with Red Hat services Copy linkLink copied to clipboard!
You can install Red Hat’s Trusted Profile Analyzer (RHTPA) service on OpenShift by using a Helm chart from Red Hat. You need to have Red Hat’s OpenShift Data Foundation storage infrastructure, Red Hat’s Single sign-on (SSO) as your OpenID Connect (OIDC) provider, and a PostgreSQL database. This procedure guides you on integrating these various services with RHTPA by using a customized values file for Helm.
If the secret values change after the installation, OpenShift redeploys RHTPA.
Prerequisites
A Red Hat OpenShift Container Platform cluster running version 4.15 or later.
- Support for the Ingress resource to serve publicly trusted certificates that use HTTPS.
- Helm version 3.17 or higher.
- Red Hat SSO as an OIDC provider for authentication.
- Red Hat OpenShift Data Foundation for S3 storage.
Have the following unversioned S3 bucket name created:
-
trustify-UNIQUE_ID
-
- A new PostgreSQL database.
-
Access to the OpenShift web console with the
cluster-admin
role. -
A workstation with the
oc
, and thehelm
binaries installed.
Procedure
On your workstation, open a terminal, and log in to OpenShift by using the command-line interface:
oc login --token=TOKEN --server=SERVER_URL_AND_PORT
oc login --token=TOKEN --server=SERVER_URL_AND_PORT
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc login --token=sha256~ZvFDBvoIYAbVECixS4-WmkN4RfnNd8Neh3y1WuiFPXC --server=https://example.com:6443
$ oc login --token=sha256~ZvFDBvoIYAbVECixS4-WmkN4RfnNd8Neh3y1WuiFPXC --server=https://example.com:6443
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteYou can find your login token and URL from the OpenShift web console to use on the command line. Log in to the OpenShift web console. Click your user name, and click Copy login command. Offer your user name and password again, and click Display Token to view the command.
Create a new project for the RHTPA deployment:
oc new-project PROJECT_NAME
oc new-project PROJECT_NAME
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc new-project trusted-profile-analyzer
$ oc new-project trusted-profile-analyzer
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Open a new file for editing:
vi values-rhtpa.yaml
$ vi values-rhtpa.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Copy and paste the RHTPA values file template into the new
values-rhtpa.yaml
file. Update the
values-rhtpa.yaml
file with your information.- Replace S3_ENDPOINT_URL with your relevant S3 storage information.
- Replace OIDC_ISSUER_URL, FRONTEND_CLIENT_ID and CLI_CLIENT_ID with your relevant OIDC information.
- Save the file, and quit the editor.
Create the S3 storage secret resource with your credentials:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a OIDC client secret resource:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the two PostgreSQL database secret resources with your database credentials.
A PostgreSQL standard user secret resource:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow A PostgreSQL administrator secret resource:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Open a new file for editing:
vi values-importers.yaml
$ vi values-importers.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Copy and paste the RHTPA importers values file template into the new
values-importers.yaml
file. - Save the file, and quit the editor.
-
Copy and paste the RHTPA importers values file template into the new
Set up your shell environment:
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}')
$ 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}')
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add the OpenShift Helm chart repository:
helm repo add openshift-helm-charts https://charts.openshift.io/
$ helm repo add openshift-helm-charts https://charts.openshift.io/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Get the latest chart information from the Helm chart repositories:
helm repo update
$ helm repo update
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the Helm chart:
helm upgrade --install 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
helm upgrade --install 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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow helm upgrade --install redhat-trusted-profile-analyzer openshift-helm-charts/redhat-trusted-profile-analyzer -n $NAMESPACE --values values-rhtpa.yaml --values values-importers.yaml --set-string appDomain=$APP_DOMAIN_URL
$ helm upgrade --install redhat-trusted-profile-analyzer openshift-helm-charts/redhat-trusted-profile-analyzer -n $NAMESPACE --values values-rhtpa.yaml --values values-importers.yaml --set-string appDomain=$APP_DOMAIN_URL
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteYou can run this Helm chart many times to apply the currently configured state from the values file.
Once the installation finishes, you can log in to the RHTPA console by using the user credentials from your OIDC provider. You can find the RHTPA console URL by running the following command:
oc -n $NAMESPACE get route --selector app.kubernetes.io/name=server -o jsonpath='https://{.items[0].status.ingress[0].host}{"\n"}'
$ oc -n $NAMESPACE get route --selector app.kubernetes.io/name=server -o jsonpath='https://{.items[0].status.ingress[0].host}{"\n"}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Appendix A. Red Hat Trusted Profile Analyzer with AWS values file template Copy linkLink copied to clipboard!
Red Hat’s Trusted Profile Analyzer (RHTPA) with Amazon Web Services (AWS) values file template for use by the RHTPA Helm chart.
Appendix B. Red Hat Trusted Profile Analyzer with Red Hat services values file template Copy linkLink copied to clipboard!
Red Hat’s Trusted Profile Analyzer (RHTPA) with Red Hat services values file template for use by the RHTPA Helm chart.
Appendix C. Red Hat Trusted Profile Analyzer importer values file template Copy linkLink copied to clipboard!
Red Hat’s Trusted Profile Analyzer (RHTPA) values file template containing the default importers for use by the RHTPA Helm chart.