Set Encrypted Text as Variable in Execution Profile

Is it possible to Set Encrypted Text in an Execution Profile? I would like to use profiles to test logging in as different test users but I need the passwords and preferably usernames to be encrypted.

2 Likes

+1

Since Katalon 5.4 itā€™s possible to encrypt text directly in the test steps, but when this data is obtained from global variables from a profile itā€™s not possible. The profile itself contains raw data.

Yes this would be a really good feature and looking for it.

with following u can store encrypted passwords everywhre you can store text

1 Like

Finally, we implemented an identical solution to Andrejā€™s one, with a private key not stored in the projectā€™s repository and then encrypting/decrypting with java code. This is due to security reasons, because although Katalonā€™s key is not public, anyone with a Katalon copy can easily decrypt the encrypted data.

But if you donā€™t require high security standards, and this just being stored encrypted and not as raw text is enough for you, then the solution is quite simple:

  1. Obtain the encrypted version of the string with Katalon encryption tool (Help -> Encrypt Text), and store this encrypted text in a global variable, in the profile.

  2. When you need to use it in a test case, just use the setEncryptedText keyword, passing the encrypted data as an argument:

WebUI.setEncryptedText(findTestObject('Common/Login Page/User'), GlobalVariable.User)

And itā€™s done.

2 Likes

Alejandro Aroca said:

Finally, we implemented an identical solution to Andrejā€™s one, with a private key not stored in the projectā€™s repository and then encrypting/decrypting with java code. This is due to security reasons, because although Katalonā€™s key is not public, anyone with a Katalon copy can easily decrypt the encrypted data.

But if you donā€™t require high security standards, and this just being stored encrypted and not as raw text is enough for you, then the solution is quite simple:

  1. Obtain the encrypted version of the string with Katalon encryption tool (Help ā†’ Encrypt Text), and store this encrypted text in a global variable, in the profile.

  2. When you need to use it in a test case, just use the setEncryptedText keyword, passing the encrypted data as an argument:

WebUI.setEncryptedText(findTestObject('Common/Login Page/User'), GlobalVariable.User)

And it's done.

  

Thanks for implementing this. Iā€™m trying to find a solution for a problem Iā€™m having with encrypted text. I need to use it in conjunction with a navigateToUrl command.

I have a URL that needs to be encrypted. Letā€™s call it katalon.com. So, I encrypt it and I get:

/MjnqvGcDGXj4fL1vnxKHA==

In my script, I currently have this:

WebUI.navigateToUrl(ā€˜katalon.comā€™)

However, I need that URL to be encrypted. I canā€™t figure out a way get it to work. I tried the obvious one:

WebUI.setEncryptedText.navigateToUrl(/MjnqvGcDGXj4fL1vnxKHA==)

Then, I tried putting it into a global variable, but the ā€œfindTestObjectā€ throws me off.

So, I think Iā€™m missing an obvious solution here, but I canā€™t think of one. Any help would be appreciated.

this cannot be done using Katalon tools. (but i can be wrong) you need to implement your own solution (or use one i propose earlier)