constellation/hack/qemu-metadata-api
Daniel Weiße f8001efbc0
Refactor enforced/expected PCRs (#553)
* Merge enforced and expected measurements

* Update measurement generation to new format

* Write expected measurements hex encoded by default

* Allow hex or base64 encoded expected measurements

* Allow hex or base64 encoded clusterID

* Allow security upgrades to warnOnly flag

* Upload signed measurements in JSON format

* Fetch measurements either from JSON or YAML

* Use yaml.v3 instead of yaml.v2

* Error on invalid enforced selection

* Add placeholder measurements to config

* Update e2e test to new measurement format

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
2022-11-24 10:57:58 +01:00
..
server Refactor enforced/expected PCRs (#553) 2022-11-24 10:57:58 +01:00
virtwrapper Document exported funcs,types,interfaces and enable check. (#475) 2022-11-09 15:57:54 +01:00
Dockerfile Upgrade container images to Fedora 37 2022-11-18 10:37:45 +01:00
main.go AB#2439 Containerized libvirt (#191) 2022-10-05 09:11:30 +02:00
README.md AB#2114 Add QEMU metadata API (#237) 2022-06-30 11:14:26 +02:00

QEMU metadata API

This program provides a metadata API for Constellation on QEMU.

Dependencies

To interact with QEMU libvirt is required. Install the C libraries:

On Ubuntu:

sudo apt install libvirt-dev

On Fedora:

sudo dnf install libvirt-devel

Firewalld

If your system uses firewalld virtmanager will add itself to the firewall rules managed by firewalld. Your VMs might be unable to communicate with the host.

To fix this open port 8080 (the default port for the QEMU metadata API) for the libvirt zone:

# Open the port
sudo firewall-cmd --zone libvirt --add-port 8080/tcp --permanent

Docker image

Build the image:

DOCKER_BUILDKIT=1 docker build -t ghcr.io/edgelesssys/constellation/qemu-metadata-api:latest -f hack/qemu-metadata-api/Dockerfile .

A container of the image is automatically started by Terraform. You can also run the image manually using the following command:

docker run -it --rm \
    --network host \
    -v /var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock \
    ghcr.io/edgelesssys/constellation/qemu-metadata-api:latest