You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
** Provides the storage and management means for _Software Bills of Materials_ (SBOMs), with cross-referencing capabilities between SBOMs and CVEs/Security Advisories.
109
+
** Provides the storage and management means for _Software Bill of Materials_ (SBOMs), with cross-referencing capabilities between SBOMs and CVEs/Security Advisories.
110
110
111
111
[id="sidecar-pattern"]
112
112
==== Sidecar pattern
@@ -141,7 +141,7 @@ The following technologies are used in this solution:
141
141
* *Compliance Operator*: Provides ability to scan and remediate cluster hardening based on profiles
142
142
* *QTodo application*: Serves as a sample Quarkus-based application to show zero trust principles.
143
143
* *PostgreSQL database*: Provides the backend database for the demonstration application.
144
-
* *Multicloud Object Gateway*: Lightweight object storage service for {ocp}. Used as storage by Quay.
144
+
* *Multicloud Object Gateway*: Lightweight object storage service for {ocp}. Used by Quay for the storage of binary blobs.
145
145
* *Red{nbsp}Hat Quay*: Private registry for OCI images.
146
-
* *Red{nbsp}Hat Trusted Artifact Signer*: Facilitates signing and verification of binary objects in the cluster.
146
+
* *Red{nbsp}Hat Trusted Artifact Signer*: Facilitates signing and verification of software artifacts.
This use case outlines the process of building, signing, and verifying artifacts and images within the Zero Trust Validated Pattern (ZTVP) using the Red{nbsp}Hat Trusted Artifact Signer (RHTAS) and the Red{nbsp}Hat Trusted Profile Analyzer (RHTPA).
16
+
A key objective of ZTVP is the comprehensive security of both the platform and the applications deployed on it. This use case outlines the process of building, signing, and verifying artifacts and images within the Zero Trust Validated Pattern (ZTVP) using the Red{nbsp}Hat Trusted Artifact Signer (RHTAS) and the Red{nbsp}Hat Trusted Profile Analyzer (RHTPA). Through the implementation of this supply chain, we can establish a chain of trust and integrity for applications.
To ensure the security and integrity of the qtodo artifact within the supply chain, sign the artifact file (binary) by using *RHTAS*.
125
125
126
-
RHTAS relies on the `Sigstore` open source project standards. It comprises three core services that work together to provide keyless signing, transparency, and verification:
126
+
RHTAS uses the `Sigstore` open source project standards. It consists of three core services that work together to provide keyless signing, transparency, and verification:
127
127
128
128
* `Fulcio` (Certificate Authority)
129
129
* `Rekor` (Transparency Log)
@@ -140,11 +140,11 @@ For more information about these products, see the following documentation topic
140
140
[id="download-cosign"]
141
141
=== Downloading cosign
142
142
143
-
Install the cosign binary that is provided by the RHTAS solution, which is accessible within the `cli-server` pod.
143
+
Install the `cosign` binary that RHTAS provides. This binary is accessible within the `cli-server` pod.
144
144
145
145
.Procedure
146
146
147
-
. Get the cli-server hostname by using the `oc` client:
147
+
. Obtain the hostname of the cli-server by using the `oc` client which contains the CLI tools provided by RHTAS:
148
148
+
149
149
[source,terminal]
150
150
----
@@ -156,7 +156,7 @@ $ export CLI_SERVER_URL="https://$(oc get route -n trusted-artifact-signer -l ap
156
156
Using disparate versions of `cosign` might lead to incompatibility issues with the RHTAS services. To ensure compatibility, always download the `cosign` binary directly from the `cli-server` pod of your specific RHTAS deployment.
157
157
====
158
158
159
-
. Set the appropriate operating system and architecture and download the `cosign` binary:
159
+
. Specify the appropriate operating system and architecture and download the `cosign` binary:
160
160
+
161
161
[source,terminal]
162
162
----
@@ -186,7 +186,7 @@ Configure `cosign` to use the TUF root of your RHTAS instance before signing any
186
186
187
187
.Procedure
188
188
189
-
. Get the TUF root:
189
+
. Obtain the URL of the TUF instance:
190
190
+
191
191
[source,terminal]
192
192
----
@@ -215,9 +215,9 @@ $ cosign initialize \
215
215
----
216
216
217
217
[id="oidc-credentials"]
218
-
=== OIDC credentials
218
+
=== OpenID Connect credentials
219
219
220
-
Signing requires an OIDC identity issuer and the URLs for the Fulcio and Rekor services. This configuration uses *Keycloak*; however, you can substitute this component based on your specific environment.
220
+
Signing requires an OpenID Connect (OIDC) identity issuer and the URLs for the Fulcio and Rekor services. This configuration uses *Keycloak*; however, you can substitute this component based on your specific environment.
221
221
222
222
The following example illustrates the procedure for obtaining an identification token by using Keycloak.
OIDC tokens have a limited lifespan and might expire during this procedure. If you encounter authentication errors in subsequent steps, re-run this command to get a fresh token.
263
+
====
259
264
260
265
[id="create-signature-bundle"]
261
266
=== Creating a signature bundle
262
267
263
-
Run the signing command. This generates a `.bundle` file that has the signature and the transparency log entry.
268
+
Run the signing command. This command generates a `.bundle` file that has the signature and the transparency log entry.
To sign the image, use RHTAS services again. For this step, you must also be logged in to the Quay service, because you write the digital signature to the repository.
337
+
To sign the image, use RHTAS services again. For this step, you must also be logged in to the Quay service as the digital signature is published to the repository.
333
338
334
-
To reference the image you intend to sign, you must use its digest rather than its tag. You can obtain the digest of the image by using `skopeo` or by checking the Quay repository.
339
+
To reference the image you intend to sign, you must use its digest rather than its tag. Get the digest of the image by using `skopeo` or by checking the Quay repository.
You must attach the generated SBOM file to the image, which enables verification by third parties if required. For this task, use the `cosign` tool again.
419
+
You must attach the generated SBOM file to the image which enables verification by third parties if required. For this task, use the `cosign` tool again.
415
420
416
421
Although direct attachment of the SBOM to the image is feasible, the recommended approach involves encapsulating the SBOM within a signed envelope, thereby generating an attestation. This method ensures the integrity of the SBOM, guaranteeing its provenance and confirming that it has not been subjected to unauthorized modifications.
417
422
@@ -429,32 +434,23 @@ $ cosign attest \
429
434
--type spdxjson \
430
435
--fulcio-url="${FULCIO_URL}" \
431
436
--rekor-url="${REKOR_URL}" \
437
+
--identity-token "${OIDC_TOKEN}" \
432
438
--oidc-client-id="${RHTAS_CLIENT_ID}" \
433
-
--oidc-issuer "${OIDC_ISSUER_URL}" \
434
439
--yes \
435
440
"${IMAGE}"
436
441
----
437
442
438
443
[id="upload-sbom-rhtpa"]
439
444
== Uploading the SBOM to RHTPA
440
445
441
-
To analyze the SBOM and detect Common Vulnerabilities and Exposures (CVEs) in the image, use RHTPA.
446
+
To analyze the SBOM and detect Common Vulnerabilities and Exposures (CVEs) in the image, use Red Hat Trusted Profile Analyzer (RHTPA).
442
447
443
448
The RHTPA system provides an API that enables the direct upload of the SBOM by an HTTP request. To use this API, you need a token authorized by the OIDC.
444
449
445
450
This following commands illustrates the process for obtaining the token when using Keycloak, which serves as the default OIDC for the Zero Trust Validated Pattern (ZTVP).
446
451
447
452
.Procedure
448
453
449
-
. Get the OIDC Issuer URL from Keycloak and set the token URL:
. Upload the SBOM to RHTPA using the API with the Keycloak token:
@@ -503,7 +499,7 @@ $ curl -sk -X POST \
503
499
"${RHTPA_URL}/api/v2/sbom"
504
500
----
505
501
506
-
Upon publication, you can view the SBOM on the RHTPA web UI. The access URL is same as the one used for the API. Similar to the API, the RHTPA web UI uses OIDC for user authentication. In our specific deployment, you can view the RHTPA web UI by logging in with the credentials. Use the following commands to get the username and password:
502
+
Once the SBOM has been published, it can be viewed within the RHTPA web UI. The URL is same as the value obtained previously for the RHTPA API. Similar to the API, the RHTPA web UI uses OIDC for user authentication. In our specific deployment, you can view the RHTPA web UI by logging in with the credentials associated with the user. Use the following commands to obtain the username and password:
To review the newly generated SBOM within the web UI, navigate to the "SBOMs" section via the left-hand menu, and select the entry corresponding to the name of the container image from the list of available SBOMs.
516
+
519
517
image::/images/layered-zero-trust/rhtpa-web-ui.png[RHTPA Web UI]
520
518
521
519
[id="validate-sbom"]
522
520
== Validating the SBOM
523
521
524
-
To verify the integrity and provenance of the SBOM file, specifically confirming that its signature originates from a trusted source and was securely generated, use the `ec` tool.
522
+
To verify the integrity and provenance of the SBOM file, specifically confirming that its signature originates from a trusted source and was securely generated, use the `ec` tool. Beyond the verification of attestation and container signatures, Enterprise Contract (`ec`) offers additional capabilities for monitoring supply chain security. Comprehensive details are available within link:https://docs.redhat.com/en/documentation/red_hat_trusted_artifact_signer/1.3/html-single/deployment_guide/index#verifying-signatures-on-container-images-with-conforma-openshift_deploy[Red{nbsp}Hat Trusted Artifact Signer Deployment Guide].
523
+
525
524
526
525
You can install the `ec` tool by directly downloading it from the `cli-server` pod.
527
526
@@ -555,3 +554,8 @@ $ ec validate image \
555
554
--rekor-url "${REKOR_URL}" \
556
555
--show-successes
557
556
----
557
+
558
+
[id="conclusion"]
559
+
== Conclusion
560
+
561
+
This concludes our implementation of a Secure Supply Chain leveraging Red{nbsp}Hat Trusted Artifact Signer (RHTAS) and the Red{nbsp}Hat Trusted Profile Analyzer (RHTPA). We have demonstrated the complete process, which encompasses building an application from source code, generating a container image, cryptographically signing the resulting binaries, and subsequently verifying that these binaries have been signed by an authorized entity. Future work may focus on the automation of this process and its integration into a Continuous Integration/Continuous Delivery (CI/CD) solution.
0 commit comments