From de83e40e608afac6637b354a457cc20533ca03b5 Mon Sep 17 00:00:00 2001 From: John Andersen Date: Mon, 14 Nov 2022 12:40:55 -0800 Subject: [PATCH] docs: tutorials: rolling alice: architecting alice: she's arriving when?: Link to shouldi Coach Alice: Our Open Source Guide Related: https://github.com/ipvm-wg/spec/pull/8 2022-11-14 @pdxjohnny Engineering Logs: https://github.com/intel/dffml/discussions/1406?sort=new#discussioncomment-4136717 --- .../0002_shes_ariving_when.md | 67 ++++++++++++++++++- 1 file changed, 65 insertions(+), 2 deletions(-) diff --git a/docs/tutorials/rolling_alice/0000_architecting_alice/0002_shes_ariving_when.md b/docs/tutorials/rolling_alice/0000_architecting_alice/0002_shes_ariving_when.md index 59056a3e5c..0db4d58b3a 100644 --- a/docs/tutorials/rolling_alice/0000_architecting_alice/0002_shes_ariving_when.md +++ b/docs/tutorials/rolling_alice/0000_architecting_alice/0002_shes_ariving_when.md @@ -214,9 +214,72 @@ graph TD > |Defines data type| > |Links to other definitions to support something like
inheritance via graph node label traversal| -References: +## SCITT API Emulator Spin Up -- https://github.com/intel/dffml/discussions/1369#discussioncomment-2988042 +Playing with SCITT + +- References + - https://github.com/microsoft/scitt-api-emulator/blob/2502eda6b99936a7b28792ca3fd6ba9fbf97e7ba/README.md + +```console +$ git clone https://github.com/microsoft/scitt-api-emulator +$ cd scitt-api-emulator +$ git ls-files | xargs -I '{}' -- sed -i 's/python3.8/python3.10/g' '{}' +$ python -m rich.markdown README.md +$ ./scitt-emulator.sh server --workspace workspace/ --tree-alg CCF +Setting up Python virtual environment. +[notice] A new release of pip available: 22.2.2 -> 22.3.1 +[notice] To update, run: pip install --upgrade pip +Service private key written to workspace/storage/service_private_key.pem +Service parameters written to workspace/service_parameters.json +Service parameters: workspace/service_parameters.json + * Serving Flask app 'scitt_emulator.server' + * Debug mode: on +WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on all addresses (0.0.0.0) + * Running on http://127.0.0.1:8000 + * Running on http://192.168.1.115:8000 +Press CTRL+C to quit + * Restarting with stat +Service parameters: workspace/service_parameters.json + * Debugger is active! + * Debugger PIN: 000-000-000 +``` + +- Ran commands from `README.md` + +```console +$ ./scitt-emulator.sh server --workspace workspace/ --tree-alg CCF +$ ./scitt-emulator.sh client create-claim --issuer did:web:example.com --content-type application/json --payload '{"sun": "yellow"}' --out claim.cose +$ ./scitt-emulator.sh client submit-claim --claim claim.cose --out claim.receipt.cbor +$ ./scitt-emulator.sh client retrieve-claim --entry-id 1 --out claim.cose +$ ./scitt-emulator.sh client retrieve-receipt --entry-id 1 --out receipt.cbor +$ ./scitt-emulator.sh client verify-receipt --claim claim.cose --receipt claim.receipt.cbor --service-parameters workspace/service_parameters.json +``` + +- It works! + +> The `verify-receipt` command verifies a SCITT receipt given a SCITT claim and a service parameters file. This command can be used to verify receipts generated by other implementations. +> +> The `service_parameters.json` file gets created when starting a service using `./scitt-emulator.sh server`. The format of this file is not standardized and is currently: +> +> ```json +> { +> "serviceId": "emulator", +> "treeAlgorithm": "CCF", +> "signatureAlgorithm": "ES256", +> "serviceCertificate": "-----BEGIN CERTIFICATE-----..." +> } +> ``` + +- We upload `alice shouldi contribute` dataflow to SCITT and get a receipt! + - Friends, today is a great day. :railway_track: + - Next stop, serialization / federation with Alice / Open Architecture serialization data flow as SCITT service. +- References + - [Architecting Alice: She's Arriving When?: System Context](https://github.com/intel/dffml/edit/alice/docs/tutorials/rolling_alice/0000_architecting_alice/0002_shes_ariving_when.md#system-context) + - [Coach Alice: Our Open Source Guide](https://github.com/intel/dffml/blob/alice/docs/tutorials/rolling_alice/0001_coach_alice/0002_our_open_source_guide.md) + +[![asciicast](https://asciinema.org/a/537643.svg)](https://asciinema.org/a/537643) > **TODO** The should be moved to Volume 6: Chapter 1: Time Travel with Us >