Skip to content

Commit 8e47a62

Browse files
committed
Add use case and update layered zero trust docs
1 parent f210b6d commit 8e47a62

File tree

3 files changed

+147
-18
lines changed

3 files changed

+147
-18
lines changed

content/patterns/layered-zero-trust/_index.adoc

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,21 @@ The Layered Zero Trust pattern architecture consists of many components that wor
7575

7676
The pattern consists of the following key components:
7777

78-
. Zero Trust Workload Identity Manager: Implements workload identity using SPIFFE/SPIRE.
79-
. HashiCorp Vault: Provides secure secret storage and management.
80-
. Red{nbsp}Hat build of Keycloak (RHBK): Manages identity and access for users and services.
81-
. OpenShift Cert Manager: Manages the lifecycle of certificates for secure communication.
82-
. External Secrets Operator: Synchronizes secrets from external systems into the cluster.
83-
. QTodo application: Serves as a Quarkus-based application to show zero trust principles.
84-
. PostgreSQL database: Provides the backend database for the demonstration application.
78+
* link:https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/security_and_compliance/compliance-operator[Compliance Operator]
79+
** Provides {ocp} cluster hardening.
80+
81+
* link:https://access.redhat.com/products/red-hat-build-of-keycloak/[Red{nbsp}Hat build of Keycloak (RHBK)]
82+
** Provides identities for pattern components.
83+
** Provides an OIDC client that authenticates users to a web application.
84+
85+
* link:https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/security_and_compliance/zero-trust-workload-identity-manager[Red{nbsp}Hat Zero Trust Workload Identity Manager]
86+
** Provides identities to workloads running in {ocp}.
87+
88+
* link:https://www.hashicorp.com/en/products/vault[HashiCorp Vault]
89+
** Stores sensitive assets securely.
90+
91+
* link:https://external-secrets.io[External Secrets Operator (ESO)]
92+
** Synchronizes secrets stored in HashiCorp Vault with {ocp}.
8593

8694
[id="sidecar-pattern"]
8795
==== Sidecar pattern
@@ -108,7 +116,7 @@ The following technologies are used in this solution:
108116

109117
* *Zero Trust Workload Identity Manager*: Implements workload identity using SPIFFE/SPIRE.
110118
* *HashiCorp Vault*: Provides secure secret storage and management.
111-
* *Red{nbsp}Hat build of Keycloak (RHBK)*: Manages identity and access for users and services.
119+
* *Red{nbsp}Hat build of Keycloak*: Manages identity and access for users and services.
112120
* *{rh-gitops}*: A GitOps continuous delivery (CD) solution based on ArgoCD
113121
* *OpenShift Cert Manager*: Manages the lifecycle of certificates for secure communication.
114122
* *External Secrets Operator*: Synchronizes secrets from external systems into the cluster.

content/patterns/layered-zero-trust/lzt-getting-started.adoc

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,29 @@ Follow these instructions to configure and deploy the Layered Zero Trust pattern
1616

1717
.Prerequisites
1818

19-
* An {ocp} cluster with publicly signed certificates for Ingress
20-
* A GitHub account and a token for it with repositories permissions, to read from and write to your forks.
19+
* An {ocp} 4.19 or newer cluster with:
20+
21+
.. publicly signed certificates for Ingress.
22+
.. default `StorageClass` which provides dynamic `PersistentVolume` storage.
23+
24+
* To customize the default configuration, you must have a GitHub account and a token with repositories permissions, to read from and write to your forks.
25+
2126
* Access to Podman (or Docker) for execution of the container images used by `pattern.sh` script for provisioning.
22-
* Useful additions:
2327

24-
** The Helm binary, for instructions, see link:https://helm.sh/docs/intro/install/[Installing Helm]
25-
** Additional installation tool dependencies. For details, see link:https://validatedpatterns.io/learn/quickstart/[Patterns quick start].
28+
* Fulfill the general link:https://validatedpatterns.io/learn/quickstart/#_prerequisites[prerequisites for Validated Patterns].
29+
30+
* Depending on the characteristics of your cluster, you might need additional hardware resources for the Advanced Cluster Management (ACM) component.
31+
For a single-node cluster, you can start with 4 vCPUs, 16 GB of memory, and 120 GB of storage.
32+
+
33+
For more details about ACM sizing, see link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.14/html-single/install/index#sizing-your-cluster[Sizing your cluster].
34+
35+
* (Optional) The Helm binary, for instructions, see link:https://helm.sh/docs/intro/install/[Installing Helm].
36+
37+
[NOTE]
38+
====
39+
The Layered Zero Trust pattern's default deployment assumes that none of its components have been installed previously. Verify that your {ocp} environment does not already contain any of xref:/patterns/layered-zero-trust/index.html#architecture [the listed components] before proceeding.
40+
====
41+
2642

2743
[id="lzt-repository-setup"]
2844
== Repository setup
@@ -153,9 +169,11 @@ $ ./pattern.sh make install
153169
[id="lzt-verify-deployment"]
154170
=== Verify the deployment
155171

156-
You can use the {ocp} console and ArgoCD applications to verify the deployment.
172+
The Layered Zero-Trust pattern provisions every component and manages them through {ocp} GitOps. After you deploy the pattern, verify that all components are running correctly.
173+
174+
The Layered Zero-Trust pattern installs the following two {ocp} GitOps instances on your Hub cluster. You can view these instances in the {ocp} web console by using the **Application Selector** (the icon with nine small squares) in the top navigation bar.
175+
176+
. **Cluster Argo CD**: Deploys an *App-of-Apps* application named `layered-zero-trust-hub`. This application installs the pattern's components.
177+
. **Hub Argo CD**: Manages Cluster Argo CD instance and the individual components that belong to the pattern on the hub {ocp} instance.
157178

158-
. In the {ocp} web console, navigate to the *Operators* → *Installed Operators* page.
159-
. Check that {rh-gitops} Operator is installed in the
160-
`openshift-operators` namespace and its status is Succeeded.
161-
. Use the Application Launcher within the {ocp} console to confirm that all applications have synchronized successfully to both Hub and Cluster Argo CD instances.
179+
If every Argo CD application reports a **Healthy** status, the pattern has been deployed successfully.
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
title: Secure multi-tier applications
3+
weight: 20
4+
aliases: /layered-zero-trust/lzt-secure-multitier
5+
---
6+
7+
:toc:
8+
:imagesdir: /images
9+
:_mod-docs-content-type: ASSEMBLY
10+
include::modules/comm-attributes.adoc[]
11+
12+
[id="lzt-secure-multitier"]
13+
= Use case: Secure multi-tier applications
14+
15+
This use case demonstrates securing a common application design pattern: a frontend application using a database for persistent storage.
16+
17+
The Layered Zero Trust Pattern includes the `qtodo` application, which demonstrates a secure just-in-time (JIT) credential mechanism.
18+
19+
Instead of relying on static credentials stored within the application, the `qtodo` application uses a JIT method to dynamically fetch database credentials from a central credential store.
20+
21+
[id="lazt-application-architecture"]
22+
== Application components and architecture
23+
24+
The `qtodo` application consists of the following key components and their security roles:
25+
26+
* The `qtodo` application: A link:https://quarkus.io[Quarkus-based] frontend application protected by OpenID Connect (OIDC) authentication. Users are managed in an external identity store which uses Red{nbsp}Hat Build of Keycloak (RHBK).
27+
28+
* PostgreSQL: The relational database used by the `qtodo` application. Its credentials are dynamically generated and stored within HashiCorp Vault.
29+
30+
* External Identity store: Contains the provisioned users and configured OIDC clients that enable access to the `qtodo` frontend.
31+
32+
* HashiCorp Vault:
33+
34+
* Secrets store: Stores sensitive values for components, including PostgreSQL and RHBK.
35+
36+
* Workload authentication: Implements Zero Trust Workload Identity (ZTWIM) principles by using JSON Web Token (JWT)-based authentication. It assigns an identity to the `qtodo` application, allowing it to communicate with HashiCorp Vault and obtain the necessary PostgreSQL credentials.
37+
38+
* link:https://github.com/spiffe/spiffe-helper[spiffe-helper]: A supplemental sidecar component for the `qtodo` application used to dynamically fetch JWT-based identities from the SPIFFE Workload API.
39+
40+
[id="lzt-exploring-qtodo"]
41+
== Exploring the qtodo application
42+
43+
The `qtodo` application is a key component of the Layered Zero Trust Pattern, demonstrating the secure JIT fetching of credentials. To explore how the application implements Zero Trust principles, use the {ocp} web console of the Hub cluster to investigate the resources in the `qtodo` project.
44+
45+
.Procedure
46+
47+
. In the {ocp} web console, navigate to the *Projects* page and select the `qtodo` project. This namespace contains the `qtodo` Quarkus application and the `qtodo-db` PostgreSQL database.
48+
. Select *Workloads* -> *Pods* from the left-hand navigation bar. Explore both the `qtodo` and `qtodo-db` pods.
49+
+
50+
[NOTE]
51+
====
52+
The `qtodo` pod uses a series of init containers and sidecar containers to supply the application with the credentials required for operation.
53+
====
54+
55+
[id="lzt-locate-app"]
56+
=== Locating the application address
57+
58+
You can access the `qtodo` application through the {ocp} route.
59+
60+
.Procedure
61+
62+
. In the {ocp} web console, navigate to the *Projects* page and select the `qtodo` project.
63+
. Select *Networking* -> *Routes* from the left-hand navigation bar. Note the URL for the `qtodo` application in the *Location* column.
64+
. Open a new browser tab and navigate to the `qtodo` application URL.
65+
. The RHBK login page appears.
66+
67+
[id="lzt-locate-app-credentials"]
68+
=== Locating the application credentials
69+
70+
The default External Identity Provider, RHBK, is provisioned with two users: `qtodo-admin` and `qtodo-user`. You can find the initial credentials in a Secret within the `keycloak-system` namespace called `keycloak-users`.
71+
72+
.Procedure
73+
74+
. In the {ocp} web console, navigate to the *Projects* page and select the `keycloak-system` project.
75+
. Select *Workloads* -> *Secrets* from the left-hand navigation bar.
76+
. Select the `keycloak-users` secret.
77+
. Click the *Reveal values* link to see the credentials.
78+
79+
[id="lzt-access-qtodo"]
80+
=== Accessing the application
81+
82+
.Procedure
83+
84+
. Navigate to the RHBK login page, as described in the xref:lzt-locate-app[Locate the application's address] section.
85+
86+
. Enter the username and password for one of the users, using the values found in the xref:lzt-locate-app-credentials[Locate the application credentials] section.
87+
88+
. After you log in, follow the on-screen instructions to change the temporary password.
89+
90+
. Set a new password and confirm the change.
91+
+
92+
After the password change is complete, the `qtodo` application appears.
93+
94+
[id="lzt-verify-integration"]
95+
=== Verifying integration
96+
97+
The `qtodo` application uses PostgreSQL for persistent storage. You can verify that the application is correctly integrated with the database by creating a new to-do item.
98+
99+
.Procedure
100+
. In the `qtodo` application, add new items to the list of to-dos and remove existing items.
101+
. Refresh the page to verify that the items persist.
102+
103+
By successfully modifying the list, you confirm that the integration between the Quarkus application and the PostgreSQL database—using credentials sourced dynamically from HashiCorp Vault—was successful.

0 commit comments

Comments
 (0)