Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For usage of the Workflow Signing Script see JS7 - PowerShell Examples - Sign-JS7Workflows.ps1

Environment Variables

The following environment variables can be used to provide default values for arguments of the Workflow Signing Script:

  • JS7_SIGN_KEYSTORE
    • The environment variable can be used to populate the -Keystore argument from a default value.
  • JS7_SIGN_KEY
    • The environment variable can be used to populate the -Key argument from a default value.
  • JS7_SIGN_CERT
    • The environment variable can be used to populate the -Cert argument from a default value.

Exit Codes

  • 0: success
  • 1: argument errors
  • 2: non-recoverable errors

...

Code Block
languagepowershell
titleExample for use of Workflow Signing Script
$env:JS7_SIGN_KEY=/home/sos/signing.key
$env:JS7_SIGN_CERT=/home/sos/signing.crt

./Sign-JS7Workflow.ps1 `
    -Dir ./some/folder `
    -Recurse `
    -Hash sha256

# makes use of environment variables to populate the -Key and -Cert arguments
# signs all *.workflow.json files in the indicated directory and sub-directories recursively
# makes use of the indicated key file that holds the private key and certificate file for code signing
# applies the indicated hash algorithm to signatures

Example for Unix

Extracting an Export Archive, Signing all Workflows recursively using a Key File and Certificate File, Creating an Import Archive

Code Block
languagebash
titleExample for use of Workflow Signing Script
# navigate to the directory where to extract the export archive file
Set-Location /home/sos/signing

# extract export archive file
tar -xzf /tmp/export_workflows.tar.gz
# alternatively extract .zip archive file
# Expand-Archive -Path /tmp/export_workflows.zip -DestinationPath .

# sign workflow files recursively
./Sign-JS7Workflow.ps1 -Key /home/sos/signing.key -Cert /home/sos/signing.crt -Dir . -Recurse

# compress workflow files and signature files to an import archive file for upload to JOC Cockpit
tar -czf /tmp/import_workflows.tar.gz .*

Example for Windows

Extracting an Export Archive, Signing all Workflows recursively using a Key File and Certificate File, Creating an Import Archive

...