Alteryx IO Discussions

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.

[Platform SDK] Guidance on implementing machine based encryption for user input fields

JakeMack
6 - Meteoroid

We have a password field that is user input and is masked from the front end. In addition, our use case requires machine based encryption, meaning that if a workflow is shared with another user on a different machine they will need to re-enter the password to use the connector. 

 

We have found this method in the documentation but no additional information on how to use it.

JakeMack_0-1675202176865.png

 

 

 

 

Any guidance or examples that we can reference? 

 

Many thanks!
Jake

 

5 REPLIES 5
jsong
Alteryx
Alteryx

Hello, calling decrypt_password should take care of it. The encryption mode is actually set on the front-end when the password is created; I'm attempting to figure out what the default is right now. Do you happen to be using the UI SDK with this tool?


```

(usage in Python SDK)

decrypted = self.provider.io.decrypt_password(encrypted)

```

JakeMack
6 - Meteoroid

json, thanks for your reply!

 

Yes, we are using Alteryx UI version 1.4.4: https://alteryx.github.io/alteryx-ui/#/Components/Input

 

Can you please expand on the encryption topic? We have searched through documentation and have not found any references to encryption in the UI SDK. 

 

Do you have any one line examples that we can use as reference?

 

thanks,

Jake

 

 

 

 

kellencook
Alteryx
Alteryx

@jsong can you provide details on how to encrypt?  @JakeMack is not able to find those details in the documentation. 

jsong
Alteryx
Alteryx

It is recommended to use DCM (and it will work across machines). decrypt_password() is marked deprecated, but you can still use it. It should simply work by just calling that method with the encrypted string. As for how to get an encrypted password through the UI, you would have to reach out to someone familiar with the UI SDK.

 

This should work.

```

(usage in Python SDK)

decrypted = self.provider.io.decrypt_password(encrypted)

```

caroline_pitts
Alteryx Alumni (Retired)

From some folks on the UI SDK team:

Docs for encryption are under the Secrets section of the React Comms docs.

 

Secrets are basically an abstraction of the JSEvents in C#.