Hi Miguel,
Regarding option 2, it is possible to store values in a table using the below code example.
This assumes you have created a table in Cronacle called CREDENTIALS on the Global partition. You can use table definition 'System_Variables_Definition' to create it.
{
Partition part = jcsSession.getPartitionByName("GLOBAL");
Table table = jcsSession.getTableByName(part, "CREDENTIALS");
TableValue value1 = table.createTableValue();
value1.setKey("JOHNDOE");
value1.setColumnName("SystemValue");
value1.setColumnValue("your_encrypted_password_string");
jcsSession.persist();
}
This creates a record in table CREDENTIALS like below.
Key | SystemValue |
---|
JOHNDOE | your_encrypted_password_string |
Replace the password string in the code with the outcome of you custom crypto function.
You can retrieve the value from the table like this.
{
Partition part = jcsSession.getPartitionByName("GLOBAL");
Table table = jcsSession.getTableByName(part, "CREDENTIALS");
TableValue value = table.getTableValueBySearchKeySearchColumnName("JOHNDOE", "SystemValue");
String encryptedpassword = value.getColumnValue();
}
It is also possible to create a jobdefinition parameter called 'password', and set the parameter options to 'Password'.
Whenever you submit the jobdefinition, Cronacle will ** star out the plain text password during entry, and when viewing the jobs parameters via the monitor. However you can still retrieve the parameter's plain text value in redwood script.