This file contains instructions on how to locally debug td-integrity.rego against ITA attestation token claims json.
- Create an
inputfile containing token claims in JSON format. Generally, this can be done by getting an ITA attestation token (jwt) using the trustauthority-cli (see Readme.md) and extracting its JSON claims. Note: the creation of json such files is performed byreference_values.shand are created in theevidencefolder. - Create reference values. Follow the instructions in Readme.md to create
out/reference_values.json. - Manually copy the JSON contents from
out/reference_values.jsonto themy_reference_valuesvariable inexample.rego. For example...my_reference_values := { "mrtds": [ { "key": "a6c9a230bc8...5319096e6d7864f729", "value": { "bios_release": "4.1" } } ...other reference values } - Use opa to evaluate
input(token claims) againsttd-integrity.regoandexample.rego.- View appraisal results JSON:
opa eval -f raw -i {{token claims json file}}} -d example.rego -d td-integrity.rego "data.example.results" - View matching/unmatching results:
opa eval -f raw -i {{token claims json file}}} -d example.rego -d td-integrity.rego "data.example.matches"
- View appraisal results JSON: