Skip to content

Commit 01392d5

Browse files
committed
more draft work
1 parent fadff7b commit 01392d5

File tree

1 file changed

+123
-5
lines changed

1 file changed

+123
-5
lines changed

articles/openshift/confidential-containers-deploy.md

Lines changed: 123 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ After deploying OpenShift Sandboxed Containers, deploy Confidential Containers.
4040

4141
1. Create the Trustee config map.
4242

43-
1. Configure attestation policies (optional).
43+
1. Configure attestation policies
4444

4545
1. Create the KbsConfig custom resource.
4646

@@ -622,14 +622,39 @@ Create a secure route with edge TLS termination for Trustee. External ingress tr
622622
623623
### Configure attestation policies
624624
625-
You can configure the following attestation policy settings:
625+
Configure the following attestation policy settings:
626626
627-
**Reference values** (Optional)
627+
**Configure reference values**
628628
629629
You can configure reference values for the Reference Value Provider Service (RVPS) by specifying the trusted digests of your hardware platform.
630630
631631
The client collects measurements from the running software, the Trusted Execution Environment (TEE) hardware and firmware and it submits a quote with the claims to the Attestation Server. These measurements must match the trusted digests registered to the Trustee. This process ensures that the confidential VM (CVM) is running the expected software stack and hasn't been tampered with.
632632
633+
1. Create an `rvps-configmap.yaml` manifest file:
634+
635+
```
636+
apiVersion: v1
637+
kind: ConfigMap
638+
metadata:
639+
name: rvps-reference-values
640+
namespace: trustee-operator-system
641+
data:
642+
reference-values.json: |
643+
[
644+
]
645+
```
646+
647+
For `reference-values.json` specify the trusted digests for your hardware platform if required. Otherwise, leave it empty.
648+
649+
1. Create the RVPS config map by running the following command:
650+
651+
`$ oc apply -f rvps-configmap.yaml`
652+
653+
654+
655+
656+
<!--
657+
633658
**Secret with custom keys for clients** (Optional)
634659
635660
You can create a secret that contains one or more custom keys for Trustee clients.
@@ -640,14 +665,106 @@ You must configure a policy for the Trustee policy engine to determine which res
640665
641666
Don't confuse the Trustee policy engine with the Attestation Service policy engine, which determines the validity of TEE evidence.
642667
643-
**Attestation policy** (Optional)
668+
-->
669+
670+
**Attestation policy**
644671
645672
You can overwrite the default attestation policy by creating your own attestation policy.
646673
674+
1. Create an attestation-policy.yaml manifest file according to the following example:
675+
676+
```
677+
apiVersion: v1
678+
kind: ConfigMap
679+
metadata:
680+
name: attestation-policy
681+
namespace: trustee-operator-system
682+
data:
683+
default.rego: |
684+
package policy
685+
import future.keywords.every
686+
687+
default allow = false
688+
689+
allow {
690+
every k, v in input {
691+
judge_field(k, v)
692+
}
693+
}
694+
695+
judge_field(input_key, input_value) {
696+
has_key(data.reference, input_key)
697+
reference_value := data.reference[input_key]
698+
match_value(reference_value, input_value)
699+
}
700+
701+
judge_field(input_key, input_value) {
702+
not has_key(data.reference, input_key)
703+
}
704+
705+
match_value(reference_value, input_value) {
706+
not is_array(reference_value)
707+
input_value == reference_value
708+
}
709+
710+
match_value(reference_value, input_value) {
711+
is_array(reference_value)
712+
array_include(reference_value, input_value)
713+
}
714+
715+
array_include(reference_value_array, input_value) {
716+
reference_value_array == []
717+
}
718+
719+
array_include(reference_value_array, input_value) {
720+
reference_value_array != []
721+
some i
722+
reference_value_array[i] == input_value
723+
}
724+
725+
has_key(m, k) {
726+
_ = m[k]
727+
}
728+
```
729+
730+
For `package policy`, The attestation policy follows the Open Policy Agent specification. In this example, the attestation policy compares the claims provided in the attestation report to the reference values registered in the RVPS database. The attestation process is successful only if all the values match.
731+
732+
1. Create the attestation policy config map by running the following command:
733+
734+
`$ oc apply -f attestation-policy.yaml`
735+
736+
647737
**Provisioning Certificate Caching Service for TDX**
648738
649739
If your TEE is Intel Trust Domain Extensions (TDX), you must configure the Provisioning Certificate Caching Service (PCCS). The PCCS retrieves Provisioning Certification Key (PCK) certificates and caches them in a local database.
650740
741+
1. Create a tdx-config.yaml manifest file:
742+
743+
```
744+
apiVersion: v1
745+
kind: ConfigMap
746+
metadata:
747+
name: tdx-config
748+
namespace: trustee-operator-system
749+
data:
750+
sgx_default_qcnl.conf: | \
751+
{
752+
"collateral_service": "https://api.trustedservices.intel.com/sgx/certification/v4/",
753+
"pccs_url": "<pccs_url>"
754+
}
755+
```
756+
757+
For `pccs_url`, specify the PCCS URL, for example, https://localhost:8081/sgx/certification/v4/.
758+
759+
1. Create the TDX config map by running the following command:
760+
761+
`$ oc apply -f tdx-config.yaml`
762+
763+
764+
765+
<!--
766+
767+
651768
1. Create an `rvps-configmap.yaml` manifest file:
652769
653770
```
@@ -701,7 +818,7 @@ If your TEE is Intel Trust Domain Extensions (TDX), you must configure the Provi
701818
702819
`$ oc apply -f resourcepolicy-configmap.yaml`
703820
704-
1. Optional: Create an attestation-policy.yaml manifest file according to the following example:
821+
1. Create an attestation-policy.yaml manifest file according to the following example:
705822
706823
```
707824
apiVersion: v1
@@ -785,6 +902,7 @@ If your TEE is Intel Trust Domain Extensions (TDX), you must configure the Provi
785902
786903
`$ oc apply -f tdx-config.yaml`
787904
905+
-->
788906
789907
**Create a secret for container image signature verification**
790908

0 commit comments

Comments
 (0)