COCOS-238 - Add measurement directly on backend info file (#245)

* add measurement directly on backendinfo

Signed-off-by: Sammy Oina <sammyoina@gmail.com>

* add host data

Signed-off-by: Sammy Oina <sammyoina@gmail.com>

---------

Signed-off-by: Sammy Oina <sammyoina@gmail.com>
This commit is contained in:
Sammy Kerata Oina
2024-09-19 22:32:38 +03:00
committed by GitHub
parent 4c09b4bea5
commit e266e91033
6 changed files with 61 additions and 4 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ All assets/datasets the algorithm uses are stored in the `datasets` directory. T
Agent is started automatically in the VM when launched but requires configuration and manifest to be passed by manager. Alternatively you can pass configuration using this [simplified script](./agent-config/main.go)
For attested TLS, you will have to calculate the VM's measurement, which can be done using a tool [sev-snp-measure](https://pypi.org/project/sev-snp-measure/).
For attested TLS, you will have to calculate the VM's measurement, which can be done using cli. This information is also contained in the backend info file.
```bash
# Define the path to the OVMF, KERNEL, INITRD and CMD Kernel line arguments.
@@ -29,7 +29,7 @@ KERNEL="/home/cocosai/bzImage"
LINE="earlyprintk=serial console=ttyS0"
# Call sev-snp-measure
sev-snp-measure --mode snp --vcpus 4 --vcpu-type EPYC-v4 --ovmf $OVMF_CODE --kernel $KERNEL --initrd $INITRD --append "$LINE" --output-format base64
./build/cocos-cli sevsnpmeasure --mode snp --vcpus 4 --vcpu-type EPYC-v4 --ovmf $OVMF_CODE --kernel $KERNEL --initrd $INITRD --append "$LINE"
```
To speed up the verification process of attested TLS, download the ARK and ASK certificates using the CLI tool. The CLI tool will download the certificates under your home directory in the `.cocos` directory.