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
+80-13Lines changed: 80 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,34 @@ 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
81
48
82
```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
83
+
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
84
52
-
kubectl -n kbs-operator-system get cm resource-policy -o yaml | sed "s/default allow = false/default allow = true/"|kubectl apply -f -
85
+
kubectl -n trustee-operator-system get cm resource-policy -o yaml | sed "s/default allow = false/default allow = true/"|kubectl apply -f -
53
86
```
54
87
55
88
### Build a podvm that enforces Secure-Comms
@@ -59,27 +92,60 @@ 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.
95
+
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
103
66
104
67
105
### 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:
106
+
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"`.
107
+
108
+
```sh
109
+
kubectl -n confidential-containers-system get cm peer-pods-cm -o yaml | sed "s/SECURE_COMMS: \"false\"/SECURE_COMMS: \"true\"/"|kubectl apply -f -
110
+
```
111
+
112
+
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 -
130
+
131
+
```
132
+
133
+
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)
134
+
135
+
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
145
You may also set the KBS address using the `SECURE_COMMS_KBS_ADDR` config point.
80
146
81
147
82
-
###Adding named tunnels to the SSH channel
148
+
## Adding named tunnels to the SSH channel
83
149
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.
Inbounds and Outbounds take the form of a comma separated inbound/outbound tags such that Inbounds are formed as "InboundTag1,InboundTag2,InboundTag3,..." and Outbounds are formed as "OutboundTag1,OutboundTag2,outboundTag3,..."
90
156
91
-
Each Inbound tag is structured as `Phase:Name:Port` where:
157
+
158
+
Each Inbound tag is structured as `Phase:Name:Namespace:Port` or `Phase:Name:Port` where:
92
159
- Phase can be 'KUBERNETES_PHASE' to represent an outbound available during the Kubernetes phase, 'ATTESTATION_PHASE' to represent an outbound available during the Attestation phase, or 'BOTH_PHASES' to represent an outbound available during both phases.
93
160
- Name is the name of the tunnel
161
+
- Namespace (if available) is a linux network namespace where the local service should be available.
94
162
- Port is the local service port being opened to serve as ingress of the tunnel.
95
163
96
164
Each outbound tag is structured as `Phase:Name:Host:Port` or `Phase:Name:Port` where:
@@ -117,5 +185,4 @@ Alternatively, the client and server can be separately executed in independent t
117
185
118
186
- 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
187
- 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
188
- 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