Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Commit

Permalink
Update the getting started scripts (#43)
Browse files Browse the repository at this point in the history
Signed-off-by: steve lasker <[email protected]>
  • Loading branch information
SteveLasker authored Mar 27, 2024
1 parent 1a9922a commit cfebeee
Showing 1 changed file with 27 additions and 34 deletions.
61 changes: 27 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,6 @@ On Ubuntu, run the following to install Python:
sudo apt install python3.10-venv
```

### Optional Dependencies

If you want to use conda, first install it:

- [Install Conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html)

You can get things setup with the following:

```sh
conda env create -f environment.yml
conda activate scitt
```

## Clone the Emulator

1. Clone the scitt-api-emulator repository and change into the scitt-api-emulator folder:
Expand All @@ -43,6 +30,19 @@ conda activate scitt
cd scitt-api-emulator
```

### Optional Dependencies

If you want to use conda, first install it:

- [Install Conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html)

You can get things setup with the following:

```sh
conda env create -f environment.yml
conda activate scitt
```

## Start the Proxy Server

The proxy server supports 2 options currently:
Expand All @@ -63,7 +63,7 @@ The proxy server supports 2 options currently:
1. The server is running at http://localhost:8000/ and uses the `workspace/` folder to store the service parameters and service state
**Note:** _The default port is `8000` but can be changed with the `--port` argument._
1. Start another shell to run the test scripts, leaving the above shell for diagnostic output
1. Skip to [Create Claims](#create-claims)
1. Skip to [Create Signed Claims](#create-signed-claims)

### Start an RKVST SCITT Proxy Service

Expand Down Expand Up @@ -121,42 +121,35 @@ They can be used with the built-in server or an external service implementation.
Receipt: ./claim.receipt.cbor
```

1. Save the entryId to an environment variable
1. Create an environment variable (`ENTRY_ID`) for the value of `entryId` above:

```sh
ENTRY_ID=<entryId>
```

### Retrieve Claims
### Retrieve Statements and Receipts

1. Retrieve the claim, based on the ENTRY_ID set from the `submit-claim` command above
1. Retrieve the Statement, based on the ENTRY_ID set from the `submit-claim` command above

```sh
./scitt-emulator.sh client retrieve-claim \
--entry-id $ENTRY_ID \
--out claim.cose
```

This command sends the following request:

- `GET /entries/<entry_id>` to retrieve the claim.
```sh
./scitt-emulator.sh client retrieve-claim \
--entry-id $ENTRY_ID \
--out claim.cose
```

### Retrieve Receipts
`retrieve-claim` sends the following request:
`GET /entries/<entry_id>` to retrieve the claim.

1. Replace the `<entryId>` with the value from the `submit-claim` command above
1. Retrieve the Receipt, based on the ENTRY_ID set from the `submit-claim` command above

```sh
./scitt-emulator.sh client retrieve-receipt \
--entry-id $ENTRY_ID \
--out receipt.cbor
```

The `retrieve-receipt` command uses the default service URL `http://127.0.0.1:8000` which can be changed with the `--url` argument.
It can be used with the built-in server or an external service implementation.

This command sends the following request:

- `GET /entries/<entry_id>/receipt` to retrieve the receipt.
`retrieve-receipt` sends the following request:
`GET /entries/<entry_id>/receipt` to retrieve the receipt.

### Validate Receipts

Expand Down

0 comments on commit cfebeee

Please sign in to comment.