Encrypt passwords for database connection in the script and manual input

At the moment I want to connect to the database to execute queries, however the script to show how to connect to a database is preventing me to be able to connect as I’m unable to encypt the password. This mean anyone can see the password by script or input field as it displays the password.

The setEncryptedText is designed to input a encrypted text into an input box however you cannot use this method to encrypt password for databases.

This is preventing me to do any form of testing against a database as this is breaching GDPR laws as anyone who gets their hands on the password could get sensitive information.

3 Likes

I guess that since Katalon being for testing purposes should not be used in a prod environment but in a QA or DEV environment. That said, and since it should be for inside use it should not compromise sensitive data.

I hope this helps.

1 Like

@Brad_James @miguelangel.varonada You can make use of GlobalVariable. Use a non-sensitive password on your dev machine and override it with real value on your CI environment. Another way is to set your password to an environment variable and use Java’s System.getenv("ENVIRONMENT_VARIABLE_NAME) to retrieve it in your script.

-g_XXX Since 5.9

Override Execution Profile variables.

Example:

-g_userName="admin"

https://docs.katalon.com/katalon-studio/docs/console-mode-execution.html#execute-katalon-in-cmd