Skip to content

Commit 54cdef2

Browse files
committed
Enable image signature check for CoCo
The kata-agent should manage the signature verification of container images pulled in the guest. It should be configured with two options: - enable_signature_verification=true - image_policy_file=<url> While this can be easily achieved with annotations for regular kata pods, no mechanism exists for peer pods. In the meantime, let's hardcode the agent config directly in the podvm image for the CoCo case and have the kata-agent using it. Fixes: https://issues.redhat.com/browse/KATA-3393 Suggested-by: Wainer dos Santos Moschetta <[email protected]> Signed-off-by: Greg Kurz <[email protected]>
1 parent d0632e5 commit 54cdef2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Diff for: config/peerpods/podvm/lib.sh

+12
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,18 @@ function prepare_source_code() {
244244
fi
245245
fi
246246

247+
# Enable image signature check
248+
if [[ "$CONFIDENTIAL_COMPUTE_ENABLED" == "yes" ]]; then
249+
cat<<EOF>"${podvm_dir}"/files/etc/agent-config.toml
250+
server_addr = “unix:///run/kata-containers/agent.sock”
251+
guest_components_procs = “none”
252+
image_registry_auth = “file:///run/peerpod/auth.json”
253+
enable_signature_verification = true
254+
image_policy_file = ‘kbs:///default/security-policy/osc’
255+
EOF
256+
sed -i 's,/run/peerpod/agent-config.toml,/etc/agent-config.toml,' \
257+
"${podvm_dir}"/files/etc/systemd/system/kata-agent.service
258+
fi
247259
}
248260
249261
# Download and extract the pause container image

0 commit comments

Comments
 (0)