-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creation of gen-corim command (#195)
* Upload of working corim generation for review Resolves issue #141 This commit implements the new gen-corim command. This command is an enhancement to the services repo which allows for CoRIM synthesisation from evidence tokens Signed-off-by: Sam Davis <[email protected]> * Addition of suggested changes from setrofim Signed-off-by: Sam Davis <[email protected]> * Adds information about default value of temporary drectory path Signed-off-by: Sam Davis <[email protected]> --------- Signed-off-by: Sam Davis <[email protected]>
- Loading branch information
Showing
23 changed files
with
1,012 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Utilities | ||
|
||
The `utils` directory contains various utilities. | ||
Currently only gen-corim is present. This utility enables quick generation of Endorsements from the Evidence. | ||
Please see the [README.md](gen-corim/README.md) inside gen-corim for a more detailed explanation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# CoRIM Generation | ||
|
||
## Preconditions | ||
|
||
>>Note: the below assumes both the [evcli](https://github.com/veraison/evcli) and the [cocli](https://github.com/veraison/corim/tree/main/cocli) tools are installed on the system. | ||
## Installing and configuring | ||
|
||
To install the `gen-corim` command, do: | ||
|
||
``` | ||
$ go install github.com/veraison/services/gen-corim@latest | ||
``` | ||
|
||
## Usage | ||
|
||
``` | ||
$ gen-corim psa evidence.cbor key.json [--template-dir=templates] [--corim-file=endorsements/output.cbor] | ||
``` | ||
|
||
On success, you should see something like this printed to stdout: | ||
|
||
``` | ||
>> generated "endorsements/output.cbor" using "evidence.cbor" | ||
``` | ||
### Supplied Arguments | ||
### Attestation Scheme | ||
|
||
The attestation scheme to be used. The only attestation schemes supported by this service are `psa` and `cca`. | ||
|
||
#### Evidence File | ||
|
||
CBOR-encoded evidence token to be used. | ||
|
||
### Key File | ||
|
||
Public key material needed to verify the evidence. The key file is expected be in [jwk](https://openid.net/specs/draft-jones-json-web-key-03.html) format. | ||
|
||
### Template Directory (Optional) | ||
|
||
The directory containing the CoMID and CoRIM templates via the `--template-dir` switch (abbrev. `-t`). If this flag is not set the path for the template directory will default to `templates` within the current working directory. The template directory must exist and must contain files named `comid-template.json` and `corim-template.json` which contain the respective templates. Some examples of CoMID and CoRIM JSON templates can be found in the [data/templates](data/templates) folder. | ||
|
||
### Output File (Optional) | ||
|
||
If you wish to specify the name and path of the produced endorsement then pass this via the `corim-file` switch (abbrev. `-c`). If this flag is not set then the produced endorsement will be saved in the current working directory under the file name `psa-endorsements.cbor` or `cca-endorsements.cbor` depending on the attestation scheme used. |
Oops, something went wrong.