Page History
...
--url
- Specifies the URL by which JOC Cockpit is accessible using
<http|https>://<host>:<port>
. - Example: http://centostest-primary.sos:4446
- Example: https://centostest-primary.sos:4443
- Specifies the URL by which JOC Cockpit is accessible using
--controller-id
- Specifies the Controller ID to which the updated job resource should be deployed.
--user
- Specifies the user account for login to JOC Cockpit. Specification of the user account can be omitted if a JS7 - Identity Services is available for Client authentication certificates that are specified with the
--client-cert
and--client-key
options.
- Specifies the user account for login to JOC Cockpit. Specification of the user account can be omitted if a JS7 - Identity Services is available for Client authentication certificates that are specified with the
--password
- For user/password authentication the
--password
option can be used to specify a password and the-p
switch can be used to prompt for secure input of a password.
- For user/password authentication the
--job-resource
- Specifies the path to the job resource in the JOC Cockpit inventory.
--key
- Specifies the name of an argument in the job resource specified with the
--job-resource
option. - Job Resource arguments are case-sensitive.
- Specifies the name of an argument in the job resource specified with the
--value
- Specifies the value of the argument in the job resource specified with the
--job-resource
option.
- Specifies the value of the argument in the job resource specified with the
--file
- Job Resources can be used to transfer files to related Agents. The option expects the path to a file that will be added the Job Resource.
- The
--file
option is an alternative to use of the--value
option.
--env-var
- Optionally specifies the name of an environment variable in the job resource specified with the
--job-resource
option. - The environment variable will be assigned a reference to the argument specified by the
--key
option to hold the same value as the argument. - Job Resource environment variables are case-sensitive.
- Optionally specifies the name of an environment variable in the job resource specified with the
--java-home
- Specifies the Java home directory. Java is required if Job Resource values should be encrypted.
--java-lib
- Specifies the directory in which Java libraries are available if Job Resource values should be encrypted.
- The download archive for JS7 Encryption holds the Job Resource Update Script and includes the
lib
sub-directory with related Java libraries. By default thelib
directory will be used assuming that the Job Resource Update Script is located in thebin
directory at the same file system hierarchy level.
--java-options
- Specifies the Java options that are used if Job Resource values should be encrypted.
- If more than one Java option is used then the value has to be quoted, for example
--java-options="-Xms64m -Xmx128m"
.
--encrypt-cert
- Specifies the path to a certificate file or public key file that will be used to encrypt the value of the Job Resource. This applies to values specified with the
--value
option and--file
option. - An Agent holding the matching private key can decrypt the values of encrypted Job Resource variables, for details see JS7 - How to encrypt and decrypt Variables.
- The script will create a one-time symmetric key that is used to encrypt the value of the Job Resource variable. The symmetric key will be encrypted by use of the recipient's public key. The Job Resource will be added a variable that holds the encrypted copy of the symmetric key. The symmetric key will be deleted immediately. This guarantees that the owner of the private key, typically a JS7 Agent, is the only recipient able to decrypt the Job Resource variable's value. Encryption is performed by the script before the Job Resource is added using the JS7 REST Web Service API.
- Specifies the path to a certificate file or public key file that will be used to encrypt the value of the Job Resource. This applies to values specified with the
--cacert
- Specifies the path to a .pem file that holds the Root CA Certificate and optionally Intermediate CA Certificates to verify HTTPS connections to JOC Cockpit.
--client-cert
- Specifies the path to a .pem file that holds the Client Certificate if HTTPS mutual authentication is used..
--client-key
- Specifies the path to a .pem file that holds the Client Private Key if HTTPS mutual authentication is used..
--client-keystore
- Specifies the path to a keystore that holds the private key and certificate used for HTTPS mutual authentication. The keystore is expected in PKCS12 format, typically using the .p12 or .pft extension.
- Use of a keystore is an alternative to specifying the -
-client-key
and--client-cert
options. - If the keystore is protected then the
--password
option specifies the password.
--timeout
- Specifies the timeout for connecting to JOC Cockpit. If the connection is not established and the timeout is exceeded then the script will be terminated.
- By default the timeout is 15s.
--log-dir
- If a log directory is specified then the script will log information about processing steps to a log file in this directory.
- File names are created according to the pattern:
set_job_resource.<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.log
- For example:
set_job_resource.2022-03-19T20-50-45.log
...
Code Block | ||||
---|---|---|---|---|
| ||||
./js7_set_job_resource.sh \ --url=http://joc-2-0-primary:7446 \ --controller-id=controller \ --user=root \ --password=root \ --job-resource=/ProductDemo/Variables/pdBusinessSecret \ --key=businessSecret \ --value='secret' \ --encrypt-cert=./agent.crt # updates the Job Resource variable "businessSecret" from some value # the value of the variable will be encrypted using thean Agent's certificate # an additional variable "businessSecret_key" will be created that holds the encrypted symmetric key and initialization vector |
...
Overview
Content Tools