Robotic Process Automation (RPA)

Robotic Process Automation (RPA)

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  Sending Secure String to Terminal?

    Posted Wed December 22, 2021 11:48 AM
    Edited by Martin Medina Wed December 22, 2021 11:48 AM
    Has anyone found a way in order to enter a secure string into a terminal? "Send Text to Terminal" does not allow it, and the terminal requires a username and password entry that is currently stored in a system vault credential.


  • 2.  RE: Sending Secure String to Terminal?

    Posted Fri December 24, 2021 07:07 AM
    Hi Martin,

    The solution is to put your vault invocation in a separate script (getVault.wal).  When you call this script from another script (convertSecureStringtoString.wal), the secure string is coerced to a string. See code below.

    Be aware that the secure string is now a 'normal' string so its value can be seen in the debugger. Clearly, this is not a perfect solution as your password is converted to plain text.  Hopefully, in the future, we will allow secure strings to be sent to the terminal.

    ConvertSecureSctringToString.wal

    defVar --name success --type Boolean
    defVar --name user --type String
    defVar --name password --type String
    defVar --name creds --type String
    executeScript --isfromfile  --filename "getVault.wal" --output "api_key_user=${user},api_key_password=${password}" success=value
    setVar --name "${creds}" --value "${user}:${password}"
    logMessage --message "Creds: ${creds}" --type "Info"

    getVault.wal

    defVar --name api_key_user --type String --output
    defVar --name api_key_password --type SecureString --output
    defVar --name success --type Boolean --output

    getVaultItem --name RPA_API_KEY --system  success=success api_key_user=userName api_key_password=password





    ------------------------------
    NIGEL CROWTHER
    ------------------------------



  • 3.  RE: Sending Secure String to Terminal?

    Posted Mon December 27, 2021 08:38 AM
    Great workaround, Nigel. Thanks for sharing!

    I needed something of the sorts a while ago and couldn't find a solution other than saving the credential as plain text.

    ------------------------------
    Vinicius Marques
    ------------------------------



  • 4.  RE: Sending Secure String to Terminal?

    Posted Mon December 27, 2021 09:11 AM
    Thanks Nigel for this workaround!

    And if anyone else runs into this secure strings issue in the future, please be sure to up-vote the following business idea. This way this enhancement can be prioritized for a future release.

    https://dba.ideas.ibm.com/ideas/WDGRPA-I-48