From 2e853e5ef6605d60a9dc89e4189cd0583615e006 Mon Sep 17 00:00:00 2001 From: mihaisc Date: Tue, 13 Sep 2022 16:02:47 +0300 Subject: [PATCH 1/5] fix compute params and links --- core-concepts/did-ddo.md | 70 +++++++--------------------------------- 1 file changed, 12 insertions(+), 58 deletions(-) diff --git a/core-concepts/did-ddo.md b/core-concepts/did-ddo.md index 42dc3fc5..d9fa5e0a 100644 --- a/core-concepts/did-ddo.md +++ b/core-concepts/did-ddo.md @@ -128,8 +128,7 @@ Example: } } ``` - -**Algorithm Metadata** +#### Algorithm Metadata An asset of type `algorithm` has additional attributes under `metadata.algorithm`, describing the algorithm and the Docker environment it is supposed to be run under. @@ -194,7 +193,7 @@ An asset should have at least one service to be actually accessible, and can hav | **`consumerParameters`** | [Consumer Parameters](did-ddo.md#consumer-parameters) | | An object the defines required consumer input before consuming the asset | | **`additionalInformation`** | Object | | Stores additional information, this is customizable by publisher | -**Files** +##### Files The `files` field is returned as a `string` which holds the encrypted file URLs. @@ -295,63 +294,18 @@ To get information about the files after encryption, the `/fileinfo` endpoint of This only concerns metadata about a file, but never the file URLs. The only way to decrypt them is to exchange at least 1 datatoken based on the respective service pricing scheme. -**Compute Options** +##### Compute Options An asset with a service of `type` `compute` has the following additional attributes under the `compute` object. This object is required if the asset is of `type` `compute`, but can be omitted for `type` of `access`. -|

allowRawAlgorithm

TypeRequiredDescription
booleanIf true, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be false by default in all implementations.
| | | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Type | Required | Description | -| `boolean` | **✓** | If `true`, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be `false` by default in all implementations. | -| Type | Required | Description | -| `boolean` | **✓** | If `true`, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be `false` by default in all implementations. | -| Type | Required | Description | -| `boolean` | **✓** | If `true`, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be `false` by default in all implementations. | -| Type | Required | Description | -| `boolean` | **✓** | If `true`, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be `false` by default in all implementations. | -| Type | Required | Description | -| `boolean` | **✓** | If `true`, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be `false` by default in all implementations. | -| Type | Required | Description | -| `boolean` | **✓** | If `true`, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be `false` by default in all implementations. | -|

allowNetworkAccess

TypeRequiredDescription
booleanIf true, the algorithm job will have network access.
| | | -| Type | Required | Description | -| `boolean` | **✓** | If `true`, the algorithm job will have network access. | -| Type | Required | Description | -| `boolean` | **✓** | If `true`, the algorithm job will have network access. | -| Type | Required | Description | -| `boolean` | **✓** | If `true`, the algorithm job will have network access. | -| Type | Required | Description | -| `boolean` | **✓** | If `true`, the algorithm job will have network access. | -| Type | Required | Description | -| `boolean` | **✓** | If `true`, the algorithm job will have network access. | -| Type | Required | Description | -| `boolean` | **✓** | If `true`, the algorithm job will have network access. | -|

publisherTrustedAlgorithmPublishers

TypeRequiredDescription
Array of stringIf not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed.
| | | -| Type | Required | Description | -| Array of `string` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed. | -| Type | Required | Description | -| Array of `string` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed. | -| Type | Required | Description | -| Array of `string` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed. | -| Type | Required | Description | -| Array of `string` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed. | -| Type | Required | Description | -| Array of `string` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed. | -| Type | Required | Description | -| Array of `string` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed. | -|

publisherTrustedAlgorithms

TypeRequiredDescription
Array of publisherTrustedAlgorithmsIf not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. Otherwise only the algorithms defined in the array are allowed. (see below).
| | | -| Type | Required | Description | -| Array of `publisherTrustedAlgorithms` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. Otherwise only the algorithms defined in the array are allowed. (see below). | -| Type | Required | Description | -| Array of `publisherTrustedAlgorithms` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. Otherwise only the algorithms defined in the array are allowed. (see below). | -| Type | Required | Description | -| Array of `publisherTrustedAlgorithms` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. Otherwise only the algorithms defined in the array are allowed. (see below). | -| Type | Required | Description | -| Array of `publisherTrustedAlgorithms` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. Otherwise only the algorithms defined in the array are allowed. (see below). | -| Type | Required | Description | -| Array of `publisherTrustedAlgorithms` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. Otherwise only the algorithms defined in the array are allowed. (see below). | -| Type | Required | Description | -| Array of `publisherTrustedAlgorithms` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. Otherwise only the algorithms defined in the array are allowed. (see below). | +| Attribute | Type | Required | Description | +| ------------------------------ | -------- | -------- | ----------------------------------------------------------- | +| `allowRawAlgorithm` | `boolean` | **✓** | If `true`, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be `false` by default in all implementations. | +| `allowNetworkAccess` | `boolean` | **✓** | If `true`, the algorithm job will have network access. | +| `publisherTrustedAlgorithmPublishers` | Array of `string` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed. | +| `publisherTrustedAlgorithms` | Array of `publisherTrustedAlgorithms` | **✓** | | + + The `publisherTrustedAlgorithms` is an array of objects with the following structure: @@ -415,7 +369,7 @@ Example: } ``` -**Consumer Parameters** +##### Consumer Parameters Sometimes, the asset needs additional input data before downloading or running a Compute-to-Data job. Examples: From 25462aaf81d0f3f4626ba3c967a1c3cbef5b8b0c Mon Sep 17 00:00:00 2001 From: mihaisc Date: Tue, 13 Sep 2022 16:07:11 +0300 Subject: [PATCH 2/5] fix links --- core-concepts/did-ddo.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core-concepts/did-ddo.md b/core-concepts/did-ddo.md index d9fa5e0a..5facf196 100644 --- a/core-concepts/did-ddo.md +++ b/core-concepts/did-ddo.md @@ -193,7 +193,7 @@ An asset should have at least one service to be actually accessible, and can hav | **`consumerParameters`** | [Consumer Parameters](did-ddo.md#consumer-parameters) | | An object the defines required consumer input before consuming the asset | | **`additionalInformation`** | Object | | Stores additional information, this is customizable by publisher | -##### Files +#### Files The `files` field is returned as a `string` which holds the encrypted file URLs. @@ -294,7 +294,7 @@ To get information about the files after encryption, the `/fileinfo` endpoint of This only concerns metadata about a file, but never the file URLs. The only way to decrypt them is to exchange at least 1 datatoken based on the respective service pricing scheme. -##### Compute Options +#### Compute Options An asset with a service of `type` `compute` has the following additional attributes under the `compute` object. This object is required if the asset is of `type` `compute`, but can be omitted for `type` of `access`. @@ -369,7 +369,7 @@ Example: } ``` -##### Consumer Parameters +#### Consumer Parameters Sometimes, the asset needs additional input data before downloading or running a Compute-to-Data job. Examples: From d735797284568f3bd93fd531c1b14ea9639df3fb Mon Sep 17 00:00:00 2001 From: mihaisc Date: Tue, 13 Sep 2022 16:11:23 +0300 Subject: [PATCH 3/5] fix description --- core-concepts/did-ddo.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core-concepts/did-ddo.md b/core-concepts/did-ddo.md index 5facf196..20cb4126 100644 --- a/core-concepts/did-ddo.md +++ b/core-concepts/did-ddo.md @@ -300,10 +300,10 @@ An asset with a service of `type` `compute` has the following additional attribu | Attribute | Type | Required | Description | | ------------------------------ | -------- | -------- | ----------------------------------------------------------- | -| `allowRawAlgorithm` | `boolean` | **✓** | If `true`, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be `false` by default in all implementations. | -| `allowNetworkAccess` | `boolean` | **✓** | If `true`, the algorithm job will have network access. | -| `publisherTrustedAlgorithmPublishers` | Array of `string` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed. | -| `publisherTrustedAlgorithms` | Array of `publisherTrustedAlgorithms` | **✓** | | +| `allowRawAlgorithm` | `boolean` | **✓**| If `true`, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be `false` by default in all implementations. | +| `allowNetworkAccess` | `boolean` | **✓**| If `true`, the algorithm job will have network access. | +| `publisherTrustedAlgorithmPublishers` | Array of `string` | **✓**| If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed. | +| `publisherTrustedAlgorithms` | Array of `publisherTrustedAlgorithms` |**✓**| If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. Otherwise only the algorithms defined in the array are allowed. (see below).| @@ -311,9 +311,9 @@ The `publisherTrustedAlgorithms` is an array of objects with the following struc | Attribute | Type | Required | Description | | ------------------------------ | -------- | -------- | ----------------------------------------------------------- | -| **`did`** | `string` | **✓** | The DID of the algorithm which is trusted by the publisher. | -| **`filesChecksum`** | `string` | **✓** | Hash of algorithm's files (as `string`). | -| **`containerSectionChecksum`** | `string` | **✓** | Hash of algorithm's image details (as `string`). | +| **`did`** | `string` | **✓** | The DID of the algorithm which is trusted by the publisher. | +| **`filesChecksum`** | `string` | **✓** | Hash of algorithm's files (as `string`). | +| **`containerSectionChecksum`** | `string` | **✓** | Hash of algorithm's image details (as `string`). | To produce `filesChecksum`, call the Provider FileInfoEndpoint with parameter withChecksum = True. If algorithm has multiple files, `filesChecksum` is a concatenated string of all files checksums (ie: checksumFile1+checksumFile2 , etc) From c79779528e22b572106ab6786d029ca1f9b73b24 Mon Sep 17 00:00:00 2001 From: mihaisc Date: Tue, 13 Sep 2022 16:18:07 +0300 Subject: [PATCH 4/5] test --- core-concepts/did-ddo.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core-concepts/did-ddo.md b/core-concepts/did-ddo.md index 20cb4126..595814b7 100644 --- a/core-concepts/did-ddo.md +++ b/core-concepts/did-ddo.md @@ -298,12 +298,12 @@ This only concerns metadata about a file, but never the file URLs. The only way An asset with a service of `type` `compute` has the following additional attributes under the `compute` object. This object is required if the asset is of `type` `compute`, but can be omitted for `type` of `access`. -| Attribute | Type | Required | Description | +| Attribute | Type | Required | Description                        | | ------------------------------ | -------- | -------- | ----------------------------------------------------------- | -| `allowRawAlgorithm` | `boolean` | **✓**| If `true`, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be `false` by default in all implementations. | -| `allowNetworkAccess` | `boolean` | **✓**| If `true`, the algorithm job will have network access. | -| `publisherTrustedAlgorithmPublishers` | Array of `string` | **✓**| If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed. | -| `publisherTrustedAlgorithms` | Array of `publisherTrustedAlgorithms` |**✓**| If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. Otherwise only the algorithms defined in the array are allowed. (see below).| +| `allowRawAlgorithm` | `boolean` | **✓** | If `true`, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be `false` by default in all implementations. | +| `allowNetworkAccess` | `boolean` | **✓** | If `true`, the algorithm job will have network access. | +| `publisherTrustedAlgorithmPublishers` | Array of `string` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed. | +| `publisherTrustedAlgorithms` | Array of `publisherTrustedAlgorithms` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. Otherwise only the algorithms defined in the array are allowed. (see below). | From d903a5c676f5d8455d43d6a85d6941e46822f57e Mon Sep 17 00:00:00 2001 From: mihaisc Date: Tue, 13 Sep 2022 16:41:23 +0300 Subject: [PATCH 5/5] minor fixes --- core-concepts/did-ddo.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core-concepts/did-ddo.md b/core-concepts/did-ddo.md index f34edc56..cc890085 100644 --- a/core-concepts/did-ddo.md +++ b/core-concepts/did-ddo.md @@ -298,8 +298,8 @@ This only concerns metadata about a file, but never the file URLs. The only way An asset with a service of `type` `compute` has the following additional attributes under the `compute` object. This object is required if the asset is of `type` `compute`, but can be omitted for `type` of `access`. -| Attribute | Type | Required | Description                        | -| ------------------------------ | -------- | -------- | ----------------------------------------------------------- | +| Attribute | Type | Required | Description | +| ------------------------------- | ----- | ----- | ----------------------------------------------------------- | | `allowRawAlgorithm` | `boolean` | **✓** | If `true`, any passed raw text will be allowed to run. Useful for an algorithm drag & drop use case, but increases risk of data escape through malicious user input. Should be `false` by default in all implementations. | | `allowNetworkAccess` | `boolean` | **✓** | If `true`, the algorithm job will have network access. | | `publisherTrustedAlgorithmPublishers` | Array of `string` | **✓** | If not defined, then any published algorithm is allowed. If empty array, then no algorithm is allowed. If not empty any algo published by the defined publishers is allowed. | @@ -310,7 +310,7 @@ An asset with a service of `type` `compute` has the following additional attribu The `publisherTrustedAlgorithms` is an array of objects with the following structure: | Attribute | Type | Required | Description | -| ------------------------------ | -------- | -------- | ----------------------------------------------------------- | +| ------------------------------ | -------- | ---- | -------------------------------------------------------------- | | **`did`** | `string` | **✓** | The DID of the algorithm which is trusted by the publisher. | | **`filesChecksum`** | `string` | **✓** | Hash of algorithm's files (as `string`). | | **`containerSectionChecksum`** | `string` | **✓** | Hash of algorithm's image details (as `string`). | @@ -379,7 +379,7 @@ Sometimes, the asset needs additional input data before downloading or running a The `consumerParameters` is an array of objects. Each object defines a field and has the following structure: | Attribute | Type | Required | Description | -| ----------------- | -------------------------------- | -------- | -------------------------------------------------------------------------- | +| ----------------- | -------------------------------- | ---- | -------------------------------------------------------------------------- | | **`name`** | `string` | **✓** | The parameter name (this is sent as HTTP param or key towards algo) | | **`type`** | `string` | **✓** | The field type (text, number, boolean, select) | | **`label`** | `string` | **✓** | The field label which is displayed |