Skip to content

Commit f9a3879

Browse files
committed
PR to add "secret" field to input parameters.
1 parent 0211998 commit f9a3879

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

CommandLineTool.yml

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ $graph:
5151
5252
## Changelog for v1.3.0-dev1
5353
54+
* Added `secret` option on [input parameters](#InputParameter)
55+
to request special handling of secrets such as passwords and
56+
API tokens.
57+
5458
See also the [CWL Workflow Description, v1.3.0-dev1 changelog](Workflow.html#Changelog).
5559
For other changes since CWL v1.0, see the
5660
[CWL Command Line Tool Description, v1.1 changelog](https://www.commonwl.org/v1.1/CommandLineTool.html#Changelog)

Process.yml

+55
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,61 @@ $graph:
772772
from the input object, or if the value of the parameter in the input
773773
object is `null`. Default values are applied before evaluating expressions
774774
(e.g. dependent `valueFrom` fields).
775+
- name: secret
776+
type: ["null", boolean, string]
777+
doc: |
778+
Indicates this input parameter value is sensitive.
779+
Implementations should apply special handling to secret values
780+
to avoid displaying them in logs, including them in output, or
781+
otherwise making them visible or accessible in any way beyond
782+
what is required to make the value of the secret input
783+
parameter available to workflow processes that need it.
784+
785+
This feature is intended to provide a safer way to handle
786+
credentials such as passwords and API tokens.
787+
788+
Possible values of the `secret` field can be:
789+
790+
* null or not provided (default, the input parameter is not secret)
791+
* false (same as null)
792+
* true (parameter is secret)
793+
* a non-empty string (parameter is secret, and may be looked up in platform storage)
794+
795+
If the value of `secret` is a string, this is a lookup key to
796+
be used to fetch a secret value from the workflow platform
797+
secret store. This assumes a model where a non-sensitive
798+
lookup key is passed to the secret store and a sensitive
799+
string value (the password, API token, etc) is returned.
800+
801+
The format of this lookup key, as well as management, access
802+
permissions, and authentication for the secret store are
803+
implementation specific and out of scope for this document.
804+
805+
If the input parameter is a secret, the `type` of the input
806+
parameter must only consist of `string`, `array<string>`, or
807+
`null`.
808+
809+
If `secret` is a string and the platform supports looking up
810+
credentials, the input parameter is implicitly optional for
811+
the caller, and platform should look up the secret to fill in
812+
the input parameter value when not provided by the caller.
813+
814+
An explict value provided by the caller always takes
815+
precidence over looking up a value, i.e. checking the secret
816+
store must only happen if the caller did not provide an
817+
explicit value for this secret parameter, or the value is
818+
null.
819+
820+
If the platform does not support secrets lookup, a string
821+
value of `secret` is treated like boolean true, indicating the
822+
parameter is secret, but must be provided in the input
823+
document (unless marked as optional).
824+
825+
Failure to look up the secret (for example, due to denial of
826+
access) may yield a value of "null". Execution continues only
827+
if the parameter is optional (i.e. "null" is an accepted
828+
type). However implementations may, at user option, treat
829+
failure to look up a secret as a fatal error.
775830
776831
777832
- name: OutputParameter

Workflow.yml

+5
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ $graph:
4040
CWL group.
4141
4242
## Changelog
43+
44+
* Added `secret` option on [input parameters](#InputParameter)
45+
to request special handling of secrets such as passwords and
46+
API tokens.
47+
4348
See also the [CWL Command Line Tool Description, v1.3.0-dev1 changelog](CommandLineTool.html#Changelog).
4449
For other changes since CWL v1.0, see the
4550
[CWL Workflow Description, v1.1 changelog](https://www.commonwl.org/v1.1/Workflow.html#Changelog)

0 commit comments

Comments
 (0)