Skip to content

Commit b9b1b4b

Browse files
authored
Merge pull request #225 from golemfactory/updates-Feb-14
update audited-payload example
2 parents fd0a73e + cae9791 commit b9b1b4b

File tree

3 files changed

+25
-13
lines changed

3 files changed

+25
-13
lines changed

src/navigation/docs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,6 @@ export const navigation = [
635635
},
636636
],
637637
},
638-
{ title: 'Terms', href: '/docs/golem/terms' },
639638
{
640639
title: 'Payload Manifest',
641640
children: [
@@ -649,6 +648,7 @@ export const navigation = [
649648
},
650649
],
651650
},
651+
{ title: 'Terms', href: '/docs/golem/terms' },
652652
],
653653
},
654654
]

src/pages/docs/creators/javascript/guides/golem-sdk-cli.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ The manifest needs to contain the image URL pointing to the GVMI download locati
7575
To facilitate the process of creating a manifest, `golem-sdk` accepts multiple forms of image argument, where some of them will automatically resolve the URL and/or hash.
7676
Please consult the table below for more details:
7777

78-
| Argument format | Example | Is `--image-hash` required? | Notes |
79-
| ---------------------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------ |
80-
| Image tag | `golem/node:latest` | No, it will be automatically resolved. | Image hash is fetched from [https://registry.golem.network]. It is the recommended method. |
81-
| Image hash | `3d6c48bb4c192708168d53cee4f36876b263b7745c3a3c239c6749cd` | No, it is resolved from the image argument. | Image URL will point to [https://registry.golem.network] |
82-
| URL to registry.golem.network | `https://registry.golem.network/v1/image/download?tag=golem-examples/blender:2.80&https=true` | No, it is automatically resolved. | |
83-
| URL to arbitrary download location | `https://example.com/my-image` | Yes, image-hash is required. | Image is calculated by the gvmkit-build conversion tool. |
78+
| Argument format | Example | Is `--image-hash` required? | Notes |
79+
| ---------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------ |
80+
| Image tag | `golem/node:latest` | No, it will be automatically resolved. | Image hash is fetched from [https://registry.golem.network]. It is the recommended method. |
81+
| Image hash | `3d6c48bb4c192708168d53cee4f36876b263b7745c3a3c239c6749cd` | No, it is resolved from the image argument. | Image URL will point to [https://registry.golem.network] |
82+
| URL to registry.golem.network | `http://registry.golem.network/v1/image/download?tag=golem-examples/blender:2.80` | No, it is automatically resolved. | |
83+
| URL to arbitrary download location | `https://example.com/my-image` | Yes, image-hash is required. | Image is calculated by the gvmkit-build conversion tool. |
8484

8585
If the hash is not provided or resolved, you will get a warning that the manifest will not be usable until you provide it manually.
8686

src/pages/docs/golem/payload-manifest/index.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ _Computation Payload Manifest_ must follow a specific [JSON Schema](https://gith
3030
Manifests can be verified using `jsonschema` library:
3131

3232
```sh
33-
wget https://docs.golem.network/golem/payload-manifest/computation-payload-manifest.schema.json
33+
wget https://github.com/golemfactory/yagna-docs/blob/master/requestor-tutorials/vm-runtime/computation-payload-manifest.schema.json
3434
pip install jsonschema
3535
jsonschema --instance manifest.json computation-payload-manifest.schema.json
3636
```
@@ -196,6 +196,10 @@ base64 manifest.json.base64.sign.sha256 --wrap=0 > manifest.json.base64.sign.sha
196196
base64 author.crt.pem --wrap=0 > author.crt.pem.base64
197197
```
198198

199+
{% alert level="info" %}
200+
JS SDK users can utilize the [SDK CLI tool](https://docs.golem.network/docs/creators/javascript/guides/golem-sdk-cli) to create and sign manifests.
201+
{% /alert %}
202+
199203
### Self signed certificate example
200204

201205
A basic example showing the generation of a self-signed root CA certificate to then sign the App author's certificate, and afterwards importing a generated root CA certificate into the Provider's keystore.
@@ -240,7 +244,9 @@ echo '1000' > serial.txt
240244

241245
Then generate the CA certificate and key pair:
242246

243-
`openssl req -new -newkey rsa:2048 -days 360 -nodes -x509 -sha256 -keyout ca.key.pem -out ca.crt.pem -config openssl-ca.conf`
247+
```bash
248+
openssl req -new -newkey rsa:2048 -days 360 -nodes -x509 -sha256 -keyout ca.key.pem -out ca.crt.pem -config openssl-ca.conf
249+
```
244250

245251
#### 2. Generating Requestor certificate
246252

@@ -262,14 +268,20 @@ basicConstraints = CA:true
262268

263269
Then generate _App author's certificate_ Signing Request (use same `organizationName`):
264270

265-
`openssl req -new -newkey rsa:2048 -days 360 -sha256 -keyout author.key.pem -out author.csr.pem -config openssl.conf`
271+
```bash
272+
openssl req -new -newkey rsa:2048 -sha256 -keyout author.key.pem -out author.csr.pem -config openssl.conf
273+
```
266274

267275
Finally, generate _App author's certificate_ using CSR and CA certificate:
268276

269-
`openssl x509 -req -in author.csr.pem -CA ca.crt.pem -CAkey ca.key.pem -CAcreateserial -out author.crt.pem`
277+
```bash
278+
openssl x509 -req -in author.csr.pem -CA ca.crt.pem -CAkey ca.key.pem -CAcreateserial -out author.crt.pem
279+
```
270280

271281
#### 3. Importing application author's certificates
272282

273-
To import the certificate into the keystore, use a [`ya-provider keystore add`](/docs/providers/configuration/outbound#managing-your-keystore) command:
283+
To set the rule to accept payloads with unrestricted outbound access signed by authors who holds certs from a trusted ca, use a the following command:
274284

275-
`ya-provider keystore add ca.crt.pem`
285+
```bash
286+
ya-provider rule set outbound audited-payload import-cert ca.crt.pem --mode all
287+
```

0 commit comments

Comments
 (0)