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
Support configuring the APF Secure Comms from the CAA side including:
- WN public Key
- PP private key
- Activating Secure Comms
- inbouns and outbounds of th PP
This is useful for activating Secure Comms from the CAA and without
Trustee. It can be used for Testing without producing dedicated podvms
which activate Secure Comms and set Inbounds/Outbounds by default.
It can also be used for non-Coco peerpods.
Signed-off-by: David Hadas <[email protected]>
Copy file name to clipboardExpand all lines: src/cloud-api-adaptor/docs/SecureComms.md
+91-12Lines changed: 91 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,35 @@ Once the "Kubernetes Phase" SSH channel is established, Secure Comms connects th
27
27
28
28
See [Secure Comms Architecture Slides](./SecureComms.pdf) for more details.
29
29
30
-
## Setup
30
+
## Setup for for testing without Trustee (and for non-CoCo peerpods)
31
+
32
+
### Deploy CAA
33
+
Use any of the option for installing CAA depending on the cloud driver used.
34
+
35
+
36
+
### Activate Secure-Comms feature from CAA side
37
+
Activate Secure-Comms from CAA side by changing the `SECURE_COMMS` parameter of the `peer-pods-cm` configMap in the `confidential-containers-system` namespace to `"true"`.
38
+
39
+
```sh
40
+
kubectl -n confidential-containers-system get cm peer-pods-cm -o yaml | sed "s/SECURE_COMMS: \"false\"/SECURE_COMMS: \"true\"/"|kubectl apply -f -
41
+
```
42
+
43
+
You may also include additional Inbounds and Outbounds configurations to the Adaptor side using the `SECURE_COMMS_INBOUNDS` and `SECURE_COMMS_OUTBOUNDS` config points.
44
+
You may also add Inbounds and Outbounds configurations to the Forwarder side using the `SECURE_COMMS_PP_INBOUNDS` and `SECURE_COMMS_PP_OUTBOUNDS` config points. [See more details regarding Inbounds and Outbounds below.](#adding-named-tunnels-to-the-ssh-channel)
45
+
46
+
Use `kubectl edit cm peer-pods-cm -n confidential-containers-system` to make such changes in the configMap, for example:
For a testing environment, you may need to change the policy of the KBS and AS using the KBS Client to allow all or fit your own policy. One way to do that is:
47
82
48
83
```sh
49
-
kubectl -n kbs-operator-system exec deployment/trustee-deployment --container as -it -- /bin/bash
50
-
sed -i.bak 's/^default allow = false/default allow = true/' /opt/confidential-containers/attestation-service/opa/default.rego
84
+
kubectl -n trustee-operator-system exec deployment/trustee-deployment --container as -it -- sed -i.bak 's/^default allow = false/default allow = true/' /opt/confidential-containers/attestation-service/opa/default.rego
51
85
52
-
kubectl -n kbs-operator-system get cm resource-policy -o yaml | sed "s/default allow = false/default allow = true/"|kubectl apply -f -
86
+
kubectl -n trustee-operator-system get cm resource-policy -o yaml | sed "s/default allow = false/default allow = true/"|kubectl apply -f -
53
87
```
54
88
55
89
### Build a podvm that enforces Secure-Comms
@@ -59,27 +93,73 @@ Change the `src/cloud-api-adaptor/podvm/files/etc/systemd/system/agent-protocol-
You may also include additional Inbounds and Outbounds configurations to the Forwarder using the `-secure-comms-inbounds` and `-secure-comms-outbounds` flags. See more details regarding Inbounds and Outbounds below.
96
+
You may also include additional Inbounds and Outbounds configurations to the Forwarder using the `-secure-comms-inbounds` and `-secure-comms-outbounds` flags. [See more details regarding Inbounds and Outbounds below.](#adding-named-tunnels-to-the-ssh-channel)
Once you changed `podvm/files/etc/systemd/system/agent-protocol-forwarder.service`, you will need to [rebuild the podvm](./../podvm/README.md).
65
104
66
105
67
106
### Activate CAA Secure-Comms feature
68
-
Use `kubectl edit cm peer-pods-cm -n confidential-containers-system` to add to the `peer-pods-cm` config map at the `confidential-containers-system` namespace:
107
+
Activate Secure-Comms of CAA by changing the `SECURE_COMMS` parameter of the `peer-pods-cm` configMap in the `confidential-containers-system` namespace to `"true"`.
108
+
109
+
```sh
110
+
kubectl -n confidential-containers-system get cm peer-pods-cm -o yaml | sed "s/SECURE_COMMS: \"false\"/SECURE_COMMS: \"true\"/"|kubectl apply -f -
111
+
```
112
+
113
+
Set InitData to point KBC services to IP address 127.0.0.1
kubectl -n confidential-containers-system get cm peer-pods-cm -o yaml | sed 's/^INITDATA: .*/INITDATA: '$INITDATA'/'|kubectl apply -f -
144
+
145
+
```
146
+
147
+
You may also include additional Inbounds and Outbounds configurations to the Adaptor using the `SECURE_COMMS_INBOUNDS` and `SECURE_COMMS_OUTBOUNDS` config points. [See more details regarding Inbounds and Outbounds below.](#adding-named-tunnels-to-the-ssh-channel)
148
+
149
+
Use `kubectl edit cm peer-pods-cm -n confidential-containers-system` to make such changes in the configMap, for example:
You may also include additional Inbounds and Outbounds configurations to the Adaptor using the `SECURE_COMMS_INBOUNDS` and `SECURE_COMMS_OUTBOUNDS` config points. See more details regarding Inbounds and Outbounds below.
78
-
79
159
You may also set the KBS address using the `SECURE_COMMS_KBS_ADDR` config point.
80
160
81
161
82
-
###Adding named tunnels to the SSH channel
162
+
## Adding named tunnels to the SSH channel
83
163
Named tunnels can be added to the SSH channel. Adding a named tunnel requires adding an Inbound at one of the SSH channel peers and an Outbound at the other SSH channel peer. The Inbound and Outbound both carry the name of the tunnel being created.
84
164
85
165
|---------Tunnel----------|
@@ -117,5 +197,4 @@ Alternatively, the client and server can be separately executed in independent t
117
197
118
198
- Add DeleteResource() support in KBS, KBC, api-server-rest, than cleanup resources added by Secure Comms to KBS whenever a Peer Pod fail to be created or when a Peer Pod is terminated.
119
199
- Add support for running the vxlan tunnel traffic via a Secure Comms SSH tunnel
120
-
- Add support for non-confidential Peer Pods which do not go via an Attestation Phase.
121
200
- Add support for KBS identities allowing a Peer Pod to register its own identity in KBS and replace the current Secure Comms mechanism which delivers a private key to the Peer Pod via the KBS
0 commit comments