-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from nqminds/add_to_architecture
Add to architecture
- Loading branch information
Showing
33 changed files
with
426 additions
and
37 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
Binary file added
BIN
+625 KB
packages/docusaurus/docs/CAHN/50-architecture/CAHN_Claim_Cascade_System_Design.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
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,53 @@ | ||
# Schemas directory | ||
|
||
Schemas for VCs (Verifiable Credentials) to be used for the NIST BRSKI demonstrator, used to securely communicate information to the registrar. These schemas should be instantiated on a volt running on the registrar using [the VC toolchain](https://github.com/nqminds/vc-toolchain). | ||
|
||
## To populate a volt with the schemas and set it up for the VC toolchain | ||
|
||
### Step 0 | ||
|
||
### `npm i -g @nqminds/verifiable-schemas-toolchain` | ||
This installs the VC toolchain utilities from https://github.com/nqminds/vc-toolchain such that they may be used globally on the command line. | ||
|
||
### Install volt cmd line interface and fusebox from https://docs.tdxvolt.com/en/getting-started/quick-start | ||
|
||
### Step 1 - `npm run prepare` | ||
This runs the command `schemaTools parse-yaml-files ./src`. This validates the yaml schemas for the VCs in the src directory and generates the required documentatation & json files in the `./output` directory. | ||
|
||
The directory structure should now look like so: | ||
![Alt text](output_file_structure.png) | ||
|
||
### Step 2 - `schemaTools init --config volt.config.json` | ||
Where the volt.config.json is a volt config file exported for a user on a volt, this initialises the volt connection & builds the schema directory. | ||
|
||
![Alt text](volt_export_client_config.png) | ||
|
||
### Step 3 - `volt up ./output/* schemas` | ||
This uploads the output files to the schema directory, the structure in the volt should look like so: | ||
|
||
![Alt text](volt_schema_structure.png) | ||
|
||
## To create new schemas | ||
|
||
To create a new schema run, navigate to src and run: | ||
```bash | ||
schemaTools new-schema <schema_name> | ||
``` | ||
|
||
This will create a blank schema.yaml for you to edit: | ||
|
||
```yaml | ||
$id: SCHEMA_ID # Typically the URL (in github of where this schema is - it will need to be unique) | ||
$schema: https://json-schema.org/draft/2019-09/schema | ||
title: SCHEMA_TITLE # The title of your schema | ||
description: SCHEMA_DESCRIPTION # Schema description | ||
type: object | ||
properties: # Define schema properties here | ||
FIELD: | ||
type: FIELD_TYPE | ||
description: FIELD_DESCRIPTION | ||
required: | ||
- PROPERTY_ID # Required fields | ||
examples: | ||
- EXAMPLE: EXAMPLE_DATA # Example data | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,12 @@ | ||
{ | ||
"name": "@nqminds/nist-brski-schemas", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"prepare": "schemaTools parse-yaml-files ./src" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC" | ||
} |
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
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,19 @@ | ||
$schema: https://json-schema.org/draft/2020-12/schema | ||
$id: https://github.com/nqminds/CAHN/blob/main/packages/schemas/src/allow_to_connect.v.1.0.0.schema.yaml | ||
title: Allow to connect | ||
description: A giving of connection rights from an authorising user to a device | ||
type: object | ||
properties: | ||
device_id: | ||
description: id of the device receiving connection rights | ||
type: string | ||
authoriser_id: | ||
description: id of the authorising user | ||
type: string | ||
created_at: | ||
description: timestamp at which connection rights were given in milliseconds | ||
type: integer | ||
required: | ||
- device_id | ||
- authoriser_id | ||
- created_at |
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,27 @@ | ||
$schema: https://json-schema.org/draft/2020-12/schema | ||
$id: https://github.com/nqminds/CAHN/blob/main/packages/schemas/src/device.v.1.0.0.schema.yaml | ||
title: device | ||
description: A device | ||
type: object | ||
properties: | ||
id: | ||
description: id of the device | ||
type: string | ||
name: | ||
description: user friendly name of the device | ||
type: string | ||
idevid: | ||
description: IDevID of the device | ||
type: string | ||
created_at: | ||
description: timestamp at which device was created in milliseconds | ||
type: integer | ||
required: | ||
- id | ||
- name | ||
- idevid | ||
- created_at | ||
uniqueKeys: | ||
- id | ||
- name | ||
- idevid |
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,22 @@ | ||
$schema: https://json-schema.org/draft/2020-12/schema | ||
$id: https://github.com/nqminds/CAHN/blob/main/packages/schemas/src/device_type.v.1.0.0.schema.yaml | ||
title: device type | ||
description: A device type | ||
type: object | ||
properties: | ||
id: | ||
description: id of the device type | ||
type: string | ||
name: | ||
description: user friendly name of the device type | ||
type: string | ||
created_at: | ||
description: timestamp at which device type was created in milliseconds | ||
type: integer | ||
required: | ||
- id | ||
- name | ||
- created_at | ||
uniqueKeys: | ||
- id | ||
- name |
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,19 @@ | ||
$schema: https://json-schema.org/draft/2020-12/schema | ||
$id: https://github.com/nqminds/CAHN/blob/main/packages/schemas/src/gives_connection_rights.v.1.0.0.schema.yaml | ||
title: Gives connection rights | ||
description: A giving of connection rights from an authorising user to a recipient user | ||
type: object | ||
properties: | ||
recipient_id: | ||
description: id of the user receiving connection rights | ||
type: string | ||
authoriser_id: | ||
description: id of the authorising user | ||
type: string | ||
created_at: | ||
description: timestamp at which connection rights were given in milliseconds | ||
type: integer | ||
required: | ||
- recipient_id | ||
- authoriser_id | ||
- created_at |
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,19 @@ | ||
$schema: https://json-schema.org/draft/2020-12/schema | ||
$id: https://github.com/nqminds/CAHN/blob/main/packages/schemas/src/gives_purchase_rights.v.1.0.0.schema.yaml | ||
title: Gives purchase rights | ||
description: A giving of purchase rights from an authorising user to a recipient user | ||
type: object | ||
properties: | ||
recipient_id: | ||
description: id of the user receiving purchase rights | ||
type: string | ||
authoriser_id: | ||
description: id of the authorising user | ||
type: string | ||
created_at: | ||
description: timestamp at which purchase rights were given in milliseconds | ||
type: integer | ||
required: | ||
- recipient_id | ||
- authoriser_id | ||
- created_at |
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,19 @@ | ||
$schema: https://json-schema.org/draft/2020-12/schema | ||
$id: https://github.com/nqminds/CAHN/blob/main/packages/schemas/src/has_mud.v.1.0.0.schema.yaml | ||
title: has mud | ||
description: Binding between a device type and MUD (Manufacturer Usage Description) | ||
type: object | ||
properties: | ||
mud_id: | ||
description: id of the mud | ||
type: string | ||
device_type_id: | ||
description: id of the device type to which the mud applies | ||
type: string | ||
created_at: | ||
description: timestamp at which mud-device binding was created in milliseconds | ||
type: integer | ||
required: | ||
- mud_id | ||
- device_type_id | ||
- created_at |
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,19 @@ | ||
$schema: https://json-schema.org/draft/2020-12/schema | ||
$id: https://github.com/nqminds/CAHN/blob/main/packages/schemas/src/has_sbom.v.1.0.0.schema.yaml | ||
title: has sbom | ||
description: Binding between a device type and SBOM (Software Bill Of Materials) | ||
type: object | ||
properties: | ||
sbom_id: | ||
description: id of the sbom | ||
type: string | ||
device_type_id: | ||
description: id of the device type to which the sbom applies | ||
type: string | ||
created_at: | ||
description: timestamp at which sbom-device binding was created in milliseconds | ||
type: integer | ||
required: | ||
- sbom_id | ||
- device_type_id | ||
- created_at |
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,19 @@ | ||
$schema: https://json-schema.org/draft/2020-12/schema | ||
$id: https://github.com/nqminds/CAHN/blob/main/packages/schemas/src/is_of_device_type.v.1.0.0.schema.yaml | ||
title: is of device type | ||
description: Binds a device instance to a device type | ||
type: object | ||
properties: | ||
device_id: | ||
description: id of the device | ||
type: string | ||
device_type_id: | ||
description: id of the device type of the device | ||
type: string | ||
created_at: | ||
description: timestamp at which device type binding was created in milliseconds | ||
type: integer | ||
required: | ||
- device_id | ||
- device_type_id | ||
- created_at |
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,19 @@ | ||
$schema: https://json-schema.org/draft/2020-12/schema | ||
$id: https://github.com/nqminds/CAHN/blob/main/packages/schemas/src/manufactured.v.1.0.0.schema.yaml | ||
title: manufactured | ||
description: A manufactured relationship between a device and a manufacturer | ||
type: object | ||
properties: | ||
device_id: | ||
description: id of the device manufactured by the manufacturer | ||
type: string | ||
manufacturer_id: | ||
description: id of the manufacturer of the device | ||
type: string | ||
created_at: | ||
description: timestamp at which manufactured relationship was created in milliseconds | ||
type: integer | ||
required: | ||
- device_id | ||
- manufacturer_id | ||
- created_at |
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,22 @@ | ||
$schema: https://json-schema.org/draft/2020-12/schema | ||
$id: https://github.com/nqminds/CAHN/blob/main/packages/schemas/src/manufacturer.v.1.0.0.schema.yaml | ||
title: manufacturer | ||
description: A manufacturer | ||
type: object | ||
properties: | ||
id: | ||
description: id of the manufacturer | ||
type: string | ||
name: | ||
description: name of the manufacturer | ||
type: string | ||
created_at: | ||
description: timestamp at which manufacturer was created in milliseconds | ||
type: integer | ||
required: | ||
- id | ||
- name | ||
- created_at | ||
uniqueKeys: | ||
- id | ||
- name |
Oops, something went wrong.