This is a validated pattern for deploying confidential containers on OpenShift.
There are two topologies for deploying this pattern:
- Default using a single cluster. This breaks the RACI expected in a remote attestation architecture, however, makes it easier to test. This uses the
simpleclusterGroup. - A more secure operating model that has two clusters:
- One in a "trusted" zone where the remote attestation, KMS and Key Broker infrastructure are deployed. This is also the Advanced Cluster Manager Hub cluster. It uses the
trusted-hubclusterGroup. - A second where a subset of workloads are deployed in confidential containers. It uses the
spokeclusterGroup
- One in a "trusted" zone where the remote attestation, KMS and Key Broker infrastructure are deployed. This is also the Advanced Cluster Manager Hub cluster. It uses the
The current version of this application the confidential containers assumes deployment to Azure.
On the cluster where confidential workloads are deployed two sample applications are deployed:
- Sample hello world applications to allow users to experiment with the policies for CoCo and the KBS (trustee).
- A sample application
kbs-accesswhich presents secrets obtained from trustee to a web service. This is designed to allow users to test locked down environments.
Future work includes:
Supporting a multiple cluster deploymentDone- Supporting multiple infrastructure providers - Work in Progress.
- Supporting air-gapped deployments - Work in Progress.
- Supporting a more sophisticated workload such as confidential AI inference with protected GPUs.
- Only currently is known to work with
azureas the provider of confidential vms via peer-pods. - Below version 3.1, if not using ARO you must either provide your own CA signed certs, or use let's encrypt.
- Must be on 4.16.14 or later.
Version 3.* of the pattern is currently constrained to support the general availability releases of coco.
- (OpenShift Sandboxed Containers Operator)
1.10.*and above - Trustee
0.4.*
This limits support to OpenShift 4.16 and higher.
The pattern has been tested on Azure for two installation methods:
- Installing onto an ARO cluster
- Self managed OpenShift install using the
openshift-installCLI.
Additional configuration is required to pull secrets from authenticated registries.
Version 2.* of the pattern is currently constrained to support:
- (OpenShift Sandboxed Containers Operator)
1.9.* - Trustee
0.3.*
This limits support to OpenShift 4.16 and higher.
The pattern has been tested on Azure for two installation methods:
- Installing onto an ARO cluster
- Self managed OpenShift install using the
openshift-installCLI.
1.0.0 supports OpenShift Sandboxed containers version 1.8.1 along with Trustee version 0.2.0.
The pattern has been tested on Azure for one installation method:
- Self managed OpenShift install using the
openshift-installCLI - Installing on top of an existing Azure Red Hat OpenShift (ARO) cluster
Today the demo has two deployment topologies
The most important change is what clusterGroup is deployed to your main or 'hub' cluster.
You can change between behaviour by configuring global.main.clusterGroupName key in the values-global.yaml file.
values-simple.yaml: or thesimplecluster group is the default for the pattern. It deploys everything in one cluster. -values-trusted-hub: or thetrusted-hubcluster group can be configured as the main cluster group. A second cluster should be deployed with thespokecluster group. Follow instructions here to add the second cluster.
The instructions here presume you have a cluster. See further down for provisioning instructions for a cluster.
- Following standard validated patterns workflow fork the repository and clone to your development environment which has
podmanandgit - If using a particular version (e.g.
1.0.0) checkout the correct tag.
Tip
Forking is essential as the validated pattern uses ArgoCD to reconcile it's state against your remote (forked) repository.
The secrets here secure Trustee and the peer-pod vms. Mostly they are for demonstration purposes. This only has to be done once.
- Run
sh scripts/gen-secrets.sh
Note
Once generated this script will not override secrets. Be careful when doing multiple tests.
Important
Ensure you have password login available to the cluster. Let's encrypt will replace the API certificate in addition to the certificates to user with routes.
Trustee (guest agents) requires that Trustee uses a Mozilla trusted CA issued certificate, or a specific certificate which is known in advance. Today the pattern uses specific self signed certs. Let's encrypt was an option for getting a trusted certificate onto OpenShift's routes, and therefore Trustee. Ths functionality will be removed at a later date.
If you need a Let's Encrypt certificate to be issued the letsencrypt application configuration needs to be changed as below.
---
# Default configuration, safe for ARO
letsencrypt:
name: letsencrypt
namespace: letsencrypt
project: hub
path: charts/all/letsencrypt
# Default to 'safe' for ARO
overrides:
- name: letsencrypt.enabled
value: false
---
# Explicitly correct configuration for enabling let's encrypt
letsencrypt:
name: letsencrypt
namespace: letsencrypt
project: hub
path: charts/all/letsencrypt
overrides:
- name: letsencrypt.enabled
value: true Warning
Configuration changes are only effective once committed and pushed to your remote repository.
Once you configuration is pushed (if required) ./pattern.sh make install to provision a cluster.
Tip
The branch and default origin you have checked-out in your local repository is used to determine what ArgoCD and the patterns operator should reconcile against. Typical choices are to use the main for your fork.
Red Hat a demo platform. This allows easy access for Red Hat associates and partners to ephemeral cloud resources. The pattern is known to work with this setup.
- Get the openshift installer
- NOTE: openshift installer must be updated regularly if you want to automatically provision the latest versions of OCP
- Get access to an Azure Subscription Based Blank Open Environment.
- Import the required azure environmental variables (see code block below)
- Ensure certificates are configured (via let's encrypt or do so manually)
- Run the wrapper install script
bash ./rhdp/wrapper.sh azure-region-code- Where azure region code is
eastasia,useast2etc.
- You should be done
- You may need to recreate the hello world peer-pods depending on timeouts.
export GUID=
export CLIENT_ID=
export PASSWORD=
export TENANT=
export SUBSCRIPTION=
export RESOURCEGROUP=Tip
Don't use the default node sizes.. increase the node sizes such as below
- Login to console.redhat.com
- Get the openshift installer
- Login to azure locally.
openshift-install create install-config- Select azure
- For Red Hatter's and partners using RHDP make sure you select the same region for your account that you selected in RHDP
- Change worker machine type e.g. change
type: Standard_D4s_v5totype: Standard_D8s_v5or similar based on your needs. mkdir ./ocp-install && mv openshift-install.yaml ./ocp-installopenshift-install create cluster --dir=./ocp-install- Once installed:
- Login to
oc - Configure Let's Encrypt (if required)
./pattern.sh make install
- Login to
TBD