Using credentials on job definitions
If you enter the username of a credentials definition in the related section of a job definition, the password field can be resolved at runtime with the password value retrieved from the database.
For example, when defining a job using the Dynamic Workload Console, you can enter the
username of a credentials definition and then select User from the
Password type
widget as shown below:
There are four available options to define a password. You can find descriptions below and
the related examples:
- Password
- You can define a password by typing it.For example:
$job /WS_AGT_0#/JOB_WITH_PASSWORD TASK { "executable" : { "interactive" : false, "path" : "netstat", "credential" : { "userName" : "User1", "password" : "{aes}/VemdckN397hwTTRFi22ero1lyVg/C5keemnrNafguf5nLE\\=", "arguments" : { "arguments" : [ { "value" : "-an" } ] } } } } RECOVERY STOP
- User
- Password is resolved at run time using the password value retrieved from the database
defined for
Username
, using either theCredentials
definition panel or theocli model user
command.You can also code this option in the JSDL section of the job definition in ocli model. You can find more information in the related sections.
To use this option when defining a job, you need the authorization withuse
access keyword for item typeuserobj
in the security file as follows:userobj access=use
Attention: Credentials definitions lack referential integrity, so if a credentials definition that is referenced in the related section of a job definition is changed or deleted, no warning or error messages are return until the job runs.For example:$job /WS_AGT_0#/JOB_WITH_USER_PASSWORD TASK { "executable" : { "interactive" : false, "path" : "netstat", "credential" : { "userName" : "User1", "password" : "${password:User1}", "arguments" : { "arguments" : [ { "value" : "-an" } ] } } } } RECOVERY STOP
- Agent user
- Using the
param
command, password is resolved at run time using the password value defined locally forUser Name
on the dynamic agent that runs the job.For example:$job /WS_AGT_0#/JOB_WITH_AGENT_USER_PASSWORD TASK { "executable" : { "interactive" : false, "path" : "netstat", "credential" : { "userName" : "User1", "password" : "${agent:password.User1}", "arguments" : { "arguments" : [ { "value" : "-an" } ] } } } } RECOVERY STOP
- Variable
- Password is resolved at run time using the value defined for the variable you enter in the field (using the ${variable_name} notation).
When HCL Universal Orchestrator has to
resolve username and password at runtime, it follows the sequence below:
- If the workstation is not specified (for example,
${password:myuser}
):- Searches
myuser
on the workstation running the job applying a case sensitive policy. - Searches
myuser
on the workstation running the job applying a case insensitive policy. - Searches
myuser
without an associated workstation applying a case sensitive policy. - Searches
myuser
without an associated workstation applying a case insensitive policy.
- Searches
- If the workstation is specified (for example,
${password:agent#myuser}
):- Searches
myuser
on workstationagent
applying a case sensitive policy. - Searches
myuser
on workstationagent
applying a case insensitive policy. - Searches
myuser
without an associated workstation applying a case sensitive policy. - Searches
myuser
without an associated workstation applying a case insensitive policy.
- Searches
- If the workstation is specified but is empty (for example,
${password:#myuser}
):- Searches
myuser
without an associated workstation applying a case sensitive policy. - Searches
myuser
without an associated workstation applying a case insensitive policy.
- Searches