Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Sammy Oina <[email protected]>
  • Loading branch information
SammyOina committed Nov 25, 2024
1 parent 3a4e299 commit 17838d9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 51 deletions.
46 changes: 0 additions & 46 deletions docs/backends.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,52 +107,6 @@ Content-Length: 129
{"id":"ca219243-0dd4-4e6e-94ad-54fbf3dd8b32","name":"my dell server","description":"some description","address":"192.168.100.4"}
```

## View Backend Information

For a SEV enabled backend, the backend information can be viewed using prism. This information is measured by a Rust script found [here](https://github.com/ultravioletrs/cocos/blob/main/scripts/backend_info/src/main.rs). Once compiled and the binary is stored in `/build`, the backend information can be measured by Prism as shown below.

On the backend page, click the Backend Information button:
![backend_page](img/backend_page.png)

If the measurement binary is absent and no measurement is found, an empty measurement file is displayed:

![empty_info](img/empty_backend_info.png)

If the measurement is present or measurement is found in the db, the measurement file will be available for download.

![backend_info](img/backend_info.png)

The backend_info.json file is useful in cocos for [attested TLS](https://docs.cocos.ultraviolet.rs/attestation/#attested-tls), and can be used to verify [attestation report](https://docs.cocos.ultraviolet.rs/cli/#fetch-and-validate-attestation-report). The file is provided to [cocos-cli](https://docs.cocos.ultraviolet.rs/cli/#backend-info) which can add measurement data or host data. The file contains the SnpPolicy and RootOfTrust as shown:

```json
{
"snp_policy": {
"policy": 1966081,
"family_id": "AA==",
"image_id": "AA==",
"vmpl": {
"value": 0
},
"minimum_tcb": 1506397780360888800,
"minimum_launch_tcb": 1506397780360888800,
"require_author_key": false,
"measurement": "AA==",
"host_data": "AA==",
"report_id_ma": "AA==",
"chip_id": "GrFqQtRklrsjBslu9pcQ6X4rkftFW1Ar1oT+I4guQ1sVC6qakgSvEtE4P/SLSJ6mHNp0kY0mHnGpvz1Ov+k/w==",
"minimum_build": 7,
"minimum_version": "1.55",
"permit_provisional_firmware": false,
"require_id_block": false
},
"root_of_trust": {
"product": "Milan",
"check_crl": true,
"disallow_network": false
}
}
```

## Terminate Backend

This is used to disconnect and close the associated backend connection. This is usually triggered when a certificate is revoked while the backend is connected using this certificate or user initiated for any reason.
Expand Down
16 changes: 11 additions & 5 deletions docs/computations.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ Common issues and solutions:
- Confirm client/server certificate compatibility

#### Example: Attestated TLS configuration

Agent can be configured to run with [attested TLS](https://docs.cocos.ultraviolet.rs/attestation/#attested-tls).

1. Set agent tls configuration to aTLS. ![atls config](./img/ui/setatlsconfig.png)
Expand All @@ -182,10 +183,11 @@ Click on close to save config and click the update/create button to save the com
3. Next Run the computation and wait for the virtual machine provisioning to be complete.
![vm provision](./img/ui/provisioncomplete.png)
4. Download the attestation policy. This file is used to set the expected values in the attestation report and is required for validation.
![](./img/ui/attestation-policy-download-list.png)
![](./img/ui/download-policy-download.png)
![attestation-policy-download-list](./img/ui/attestation-policy-download-list.png)
![download-attestation-list](./img/ui/download-policy-download.png)

5. Finally to connect to agent, we need to configure the env variables on cli.

```shell
export AGENT_GRPC_URL=<backend_host>:<agent_port>
export AGENT_GRPC_ATTESTED_TLS=true
Expand All @@ -195,7 +197,9 @@ export AGENT_GRPC_ATTESTATION_POLICY=<path_to_attestation_policy_file>
after this configuration you can connect to agent normally using cli and perform [operations](https://docs.cocos.ultraviolet.rs/cli/) on cli such as algo/data upload etc.

##### Calculating measurement manually (optional)
Optionally, you can calculate and confirm the measurement in the attestation report. You'll need the kernel and rootfs file which can be downloaded from cocos releases based on versions.

Optionally, you can calculate and confirm the measurement in the attestation report. You'll need the kernel and rootfs file which can be downloaded from cocos releases based on versions.

![svm info](./img/ui/svminfo.png)

to calculate the expected measurement:
Expand All @@ -215,8 +219,10 @@ Once caluated this can be replaced on the attestation policy file using:
```

##### Calculating the host-data (Optional)
The host data set on the virtual machine is based on the computation mmanifest. The manifest should be downloaded from the computation page. Click on preview manifest and then download the manifest for the specific computation run.
![](./img/ui/hostdata.png)

The host data set on the virtual machine is based on the computation mmanifest. The manifest should be downloaded from the computation page. Click on preview manifest and then download the manifest for the specific computation run.

![download-manifest](./img/ui/hostdata.png)

The host data value us calculated using the cli as below:

Expand Down

0 comments on commit 17838d9

Please sign in to comment.