iisec-suzaki / optee-ra

OP-TEE Remote Attestation
BSD 2-Clause "Simplified" License
7 stars 2 forks source link

Failed to run the provisioning with comid #2

Open graziadonghia opened 2 months ago

graziadonghia commented 2 months ago

I am following the guide to run the provisioning scripr ./provisioning/run.sh, but it fails when trying to create the CBOR of the template data/comid-psa-refval.json, whose content is displayed below:

{
  "lang": "en-GB",
  "tag-identity": {
    "id": "43BBE37F-2E61-4B33-AED3-53CFF1428B16",
    "version": 0
  },
  "entities": [
    {
      "name": "ACME Ltd.",
      "regid": "https://acme.example",
      "roles": [
        "tagCreator",
        "creator",
        "maintainer"
      ]
    }
  ],
  "triples": {
    "reference-values": [
      {
        "environment": {
          "class": {
            "id": {
              "type": "psa.impl-id",
              "value": "YWNtZS1pbXBsZW1lbnRhdGlvbi1pZC0wMDAwMDAwMDE="
            },
            "vendor": "ACME",
            "model": "RoadRunner"
          }
        },
        "measurements": [
          {
            "key": {
              "type": "psa.refval-id",
              "value": {
                "label": "PRoT",
                "signer-id": "rLsRx+TaIXIFUjzkzhokWuGiOa48a/2eeHH35di66Gs="
              }
            },
            "value": {
              "digests": [
                "sha-256;MbgFqjT4jfR+fK1O4YyQtZUYD0nhXh7GfhM0EmR6tgc="
              ]
            }
          }
        ]
      }
    ]
  }
}

I receive this error:

creation failed for "": error validating template data/comid-psa-refval.json: triples validation failed: reference values: error at index 0: measurement validation failed: no measurement value set

By searching on Veraison comid code, this error is displayed in the comid/measurement.go file of the corim repository, so I guess there is a problem with the content of the json template, but I don't know how to fix it.

kunisuzaki commented 1 month ago

The measurement value is creatred after TA geneartion. I am afraid you build is separeted form the docker build and the value is not created in a suitable file.