From 5e27faded0bb31603cef5f83b244ffad00ab3463 Mon Sep 17 00:00:00 2001 From: steve lasker Date: Tue, 23 Apr 2024 12:03:02 -0700 Subject: [PATCH 1/2] Update SCITT getting started headings Signed-off-by: steve lasker --- .../developer-patterns/scitt-api/index.md | 64 +++++++++++-------- 1 file changed, 37 insertions(+), 27 deletions(-) diff --git a/content/developers/developer-patterns/scitt-api/index.md b/content/developers/developer-patterns/scitt-api/index.md index 5fb51ebe9..c4174c2e0 100644 --- a/content/developers/developer-patterns/scitt-api/index.md +++ b/content/developers/developer-patterns/scitt-api/index.md @@ -90,39 +90,49 @@ For the Quickstart, create a testing [COSE Key](https://cose-wg.github.io/cose-s openssl ecparam -name prime256v1 -genkey -out $SIGNING_KEY ``` -## Generating a Payload +## Generate a Payload -1. Create a simple json payload +Create any payload you wish to register on DataTrails. JSON based payloads are indexed for query capabilities. - ```bash - cat > payload.json <}} +The current version of the DataTrails SCITT API is limited to JSON payloads. +This will be relaxed in a future release +{{< /note >}} -1. Create a COSE Signed Statement for the `payload.json` file +```bash +cat > payload.json < Date: Tue, 23 Apr 2024 12:42:46 -0700 Subject: [PATCH 2/2] Update Feed ID with Subject - note, this doesn't change the python scripts Signed-off-by: steve lasker --- content/developers/developer-patterns/scitt-api/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/developers/developer-patterns/scitt-api/index.md b/content/developers/developer-patterns/scitt-api/index.md index c4174c2e0..5f44c96c3 100644 --- a/content/developers/developer-patterns/scitt-api/index.md +++ b/content/developers/developer-patterns/scitt-api/index.md @@ -72,8 +72,8 @@ Clone the [DataTrails SCITT Examples](https://github.com/datatrails/datatrails-s # File representing the signed statement to be registered SIGNED_STATEMENT_FILE="signed-statement.cbor" - # Feed ID, used to correlate a collection of statements about an artifact - FEED="my-product-id" + # Subject is a property used to correlate a collection of statements about an artifact + SUBJECT="my-product-id" ``` 1. Create a [bearer_token](/developers/developer-patterns/getting-access-tokens-using-app-registrations) stored as a file, in a secure local directory with 0600 permissions. @@ -117,7 +117,7 @@ Using the `payload.json` file, create a COSE Signed Statement python scitt/create_signed_statement.py \ --signing-key-file $SIGNING_KEY \ --issuer $ISSUER \ - --feed $FEED \ + --feed $SUBJECT \ --content-type "application/json" \ --payload-file payload.json \ --output-file $SIGNED_STATEMENT_FILE @@ -158,7 +158,7 @@ By querying the series of statements, consumers can verify who did what and when ```bash curl -H @$HOME/.datatrails/bearer-token.txt \ - https://app.datatrails.ai/archivist/v2/publicassets/-/events?event_attributes.feed_id=$FEED | jq + https://app.datatrails.ai/archivist/v2/publicassets/-/events?event_attributes.feed_id=$SUBJECT | jq ``` {{< note >}}