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)