EncryptText activity

Hello,
for security reasons, I want to encrypt a text. I read that I should use the activity “Encrypt Text” for this. Now I looked at the documentation of that activity. I also found indications that the key to be used should ideally be stored in the Orchestrator under Credentials.

I find it strange that the “Encrypt Text” activity only accepts strings as a “key” parameter and not “SecureString”. What’s the point of that? In my opinion, this is a real oversight. I can only read the string stored under Credentials in the Orchestrator as a SecureString. Or am I missing something?

Even more perplexing is that the version for legacy Windows does allow the use of a SecureString.

Does anyone have any suggestions?

It absolutely does accept Secure String for input, its just done in a rather unintuitive way. They did this in many activities for a while and it often causes confusion.

1 Like

Hi Martin

I guess you could store the key as Credential in Orchestrator and then give it to the Encrypt Text activity, where you in the activity Decrypt the credential, that why it is present in the code decrypted. But maybe not the best way, but doable.

In the ‘Encrypt Text’-activity field you can give:
New System.Net.NetworkCredential(String.Empty, secString from Credential in orchestrator*).Password

Hope it helps :slight_smile:

Defeats the point of a secure string to do this, minor issue if its done directly in the activity, but if you make this a variable then the password is easily exposed by basic logging.

I totally agree! Your solution is better and more secure. I was just not aware of it and this was the best option I could come up with :slight_smile: And I first saw it after I made my post and Ialso wrote it was maybe not the best way for this exact reason, maybe I should have given the reason :smiley:
But thanks for the reply.

2 Likes

Just to point out, the new Secret asset type might be better for this. The latest System activity package has the Get Secret and Set Secret activities for it.

Thank you so much! Being able to read is an advantage! Seem I have to use better glasses.

Its no problem, alot of people (myself included) got stuck with some of these when they first started doing it because we weren’t in the nature of checking that menu.

They have started doing it in a better way, with the toggle being a button/text in the activity card, so its always clear you can switch between different input types.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.