Introduction

The JITL EncryptJob template can be used to encrypt values and files.

  • Users can encrypt values for use with other jobs.
  • Users can encrypt files.

The job template makes use of the JS7 - REST Web Service API:

FEATURE AVAILABILITY STARTING FROM RELEASE 2.7.2

Usage

When defining the job either:

  • invoke the Wizard that is available from the Job Properties tab in the Configuration view and select the JITL EncryptJob Job Template and relevant arguments

or

  • specify the JITL job class and  com.sos.jitl.jobs.encrypt.EncryptJob Java class name.

Example

Download (upload .json)pduEncryptJITL.workflow.json

The sample workflow includes the following jobs:

  • encrypt: for encrypting a value. The encryption certificate is assigned from a job argument. Alternatively it can be assigned from JS7 - Job Resources.
  • display-result: for displaying the encryption result.
  • decrypt: for decrypting the encrypted value. Decryption is performed using the js7_decrypt.sh script. For details see JS7 - Encryption - Integration with Shell CLI.


To create the encrypt job users can invoke the job wizzard like this.



Explanation:

  • Add an empty job from the instruction panel.
  • Specify a name and a label for the job.
  • Select an Agent.

In a next step invoke the job wizard that you find in the upper right corner of the job property editor. The wizard brings up the following popup window:


Explanation:

  • From the list of available job templates select the EncryptJob.

Then hit the Next button to make the job wizard display available arguments:


When hitting the Submit button the wizard adds the required arguments to the job which should look like this:

Documentation

The Job Documentation including the full list of arguments can be found from: https://www.sos-berlin.com/doc/JS7-JITL/EncryptJob.xml

Arguments

The EncryptJob class accepts the following arguments:


NameDescription
encipherment_certificate

Specifies a CA signed or self-signed X.509 certificate used for encryption, see JS7 - How to create X.509 Encryption Keys. Alternatively a Public Key can be specified. The argument value is frequently provided from JS7 - Job Resources, for details see JS7 - Encryption - Management of Encryption Keys.

in

Specifies the input value that should be encrypted, typically a secret. One of the options in or infile has to be specified.

infile

Specifies the path to a file that should be encrypted. The option requires use of the outfile argument. One of the options in or infile must be specified.

outfile

Specifies the path to the output file that will be created holding the encrypted content of the input file. The option is used if the infile argument is specified.

Return Values

NameDescription
js7EncryptedValue

If the infile argument for file encryption is not specified, the value includes:

  • the encrypted symmetric key
  • the initialization vector
  • the encrypted value  

If the infile argument is specified, the value includes:

  • the encrypted symmetric key
  • the initialization vector
  • the path to the encrypted file

The value is required for decryption:

  • The encrypted symmetric key is decrypted using the Private Key
  • The encrypted file is decrypted using the decrypted symmetric key and the initialization vector.

Resources


  • No labels