From cefdd8a3231cf90d6dcd8f48cc852ee4aee42347 Mon Sep 17 00:00:00 2001 From: Ngumih Fien Date: Fri, 24 Feb 2023 10:28:35 -0800 Subject: [PATCH 1/6] how to specify network access with example --- src/faq.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/faq.md b/src/faq.md index 50843d6a..7638cb83 100644 --- a/src/faq.md +++ b/src/faq.md @@ -447,6 +447,41 @@ The reference runner and several other CWL implementations support running those Docker format containers using the Singularity engine. Directly specifying a Singularity format container is not part of the CWL standards. +## How do I specify when network access is required? + +In CWL v1.1 and above, you need to specify when network access is required by including the `NetworkAccess` requirement. +Below is an example using `Curl` where the network access requirement is used. The `networkAccess` value is set to `true` which indicates that the tool must be able to make outgoing connections to network resources. + +``` +cwlVersion: v1.2 +class: CommandLineTool + +requirements: + NetworkAccess: + networkAccess: true + +baseCommand: curl + +stdout: download.html + +inputs: + url: + type: string + inputBinding: + position: 1 + +outputs: + out: + type: File + outputBinding: + glob: download.html +``` + +The input yaml file will be +``` +url: https://www.commonwl.org/v1.2/ +``` + ## Debug JavaScript Expressions You can use the --js-console option of cwltool, or you can try From b0dd76591add018832fd265a65caadebfd845e5c Mon Sep 17 00:00:00 2001 From: Ngumih Fien Date: Mon, 27 Feb 2023 10:23:00 -0800 Subject: [PATCH 2/6] add semantic breaks and change curl capitalization --- src/faq.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/faq.md b/src/faq.md index 7638cb83..dc8c4447 100644 --- a/src/faq.md +++ b/src/faq.md @@ -449,8 +449,12 @@ specifying a Singularity format container is not part of the CWL standards. ## How do I specify when network access is required? -In CWL v1.1 and above, you need to specify when network access is required by including the `NetworkAccess` requirement. -Below is an example using `Curl` where the network access requirement is used. The `networkAccess` value is set to `true` which indicates that the tool must be able to make outgoing connections to network resources. +In CWL v1.1 and above, you need to specify when network access is required by +including the `NetworkAccess` requirement. +Below is an example using `curl` where the network access requirement is used. + +The `networkAccess` value is set to `true` which indicates that the tool must be +able to make outgoing connections to network resources. ``` cwlVersion: v1.2 From d3b69940dad88be1898c9865fff5683279193bf0 Mon Sep 17 00:00:00 2001 From: Ngumih Fien Date: Mon, 27 Feb 2023 11:08:04 -0800 Subject: [PATCH 3/6] add more info on network access --- src/faq.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/faq.md b/src/faq.md index dc8c4447..fea79918 100644 --- a/src/faq.md +++ b/src/faq.md @@ -451,10 +451,16 @@ specifying a Singularity format container is not part of the CWL standards. In CWL v1.1 and above, you need to specify when network access is required by including the `NetworkAccess` requirement. -Below is an example using `curl` where the network access requirement is used. +If `networkAccess` is `true`the tool must be able to make +outgoing connections to network resources. +If `networkAccess` is `false` or not specified, is false or not +specified, tools must not assume network access, except for localhost +(the loopback device). + +Below is an example using `curl` where `networkAccess: true` which +allows the page with the link in the yaml file to be downloaded and +saves it in a `download.hmtl` file -The `networkAccess` value is set to `true` which indicates that the tool must be -able to make outgoing connections to network resources. ``` cwlVersion: v1.2 From 5a9eca3a30224bc8ffe2449a401f523ba996d72b Mon Sep 17 00:00:00 2001 From: Ngumih Fien Date: Mon, 27 Feb 2023 11:34:49 -0800 Subject: [PATCH 4/6] remove duplication and adjust semantic breaks --- src/faq.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/faq.md b/src/faq.md index fea79918..f40a9dd3 100644 --- a/src/faq.md +++ b/src/faq.md @@ -449,13 +449,12 @@ specifying a Singularity format container is not part of the CWL standards. ## How do I specify when network access is required? -In CWL v1.1 and above, you need to specify when network access is required by -including the `NetworkAccess` requirement. +In CWL v1.1 and above, you need to specify when network access +is required by including the `NetworkAccess` requirement. If `networkAccess` is `true`the tool must be able to make outgoing connections to network resources. -If `networkAccess` is `false` or not specified, is false or not -specified, tools must not assume network access, except for localhost -(the loopback device). +If `networkAccess` is `false` or not specified, tools must not +assume network access, except for localhost(the loopback device). Below is an example using `curl` where `networkAccess: true` which allows the page with the link in the yaml file to be downloaded and From 2f6dc78cee72d650cd211f6ecd43d554975f77f1 Mon Sep 17 00:00:00 2001 From: Ngumih Fien Date: Mon, 6 Mar 2023 12:20:15 -0800 Subject: [PATCH 5/6] more info on network access requirement --- src/faq.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/faq.md b/src/faq.md index f40a9dd3..23ff84b8 100644 --- a/src/faq.md +++ b/src/faq.md @@ -455,6 +455,7 @@ If `networkAccess` is `true`the tool must be able to make outgoing connections to network resources. If `networkAccess` is `false` or not specified, tools must not assume network access, except for localhost(the loopback device). +If `networkAccess` is not specified when it is required, the tool will fail. Below is an example using `curl` where `networkAccess: true` which allows the page with the link in the yaml file to be downloaded and From d79bab199fc7a793aca46c24480d2862893ac248 Mon Sep 17 00:00:00 2001 From: Ngumih Fien Date: Tue, 7 Mar 2023 08:19:55 -0800 Subject: [PATCH 6/6] format text --- src/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/faq.md b/src/faq.md index 23ff84b8..da9b34f9 100644 --- a/src/faq.md +++ b/src/faq.md @@ -454,7 +454,7 @@ is required by including the `NetworkAccess` requirement. If `networkAccess` is `true`the tool must be able to make outgoing connections to network resources. If `networkAccess` is `false` or not specified, tools must not -assume network access, except for localhost(the loopback device). +assume network access, except for localhost (the loopback device). If `networkAccess` is not specified when it is required, the tool will fail. Below is an example using `curl` where `networkAccess: true` which