Dev Space

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

Reading password DataItems using Python SDK

elatt
7 - Meteor

I'm using the HTML GUI SDK to save persistent password fields. It seems that on the back-end, Alteryx encrypts the values the user enters in when it saves them in its XML format. From the Python SDK, the pi_init() method gets a string representation of this XML file, however I don't seem to see a way on how to decrypt these fields, I'm only able to access their encrypted form but this is not useful to me. Is there an API method that I'm missing?

13 REPLIES 13
TashaA
Alteryx Alumni (Retired)

Good Morning Elatt, 

 

Thank you so much for posting this point - really great find.

 

I will look into this today and get back to you by tomorrow.

 

-Tasha

MichaelCh
Alteryx
Alteryx

You're not missing the API method--the API method is missing. :) Looks like we forgot to add the method to the SDK that lets you decrypt the passwords that you pull in from the pi_init XML.

elatt
7 - Meteor

Do you have an estimate as to when a solution will be made available?

TashaA
Alteryx Alumni (Retired)

Thank you again for bringing this to our attention @elatt

 

Unfortunately at this time, we do not have an estimated time for releasing a solution - until then, it will be the responsibility of each developer to handle encryption/decryption as they need. Apologies for the delay and any inconvenience this has caused. Thank you for the feedback!

 

PetrT
Alteryx
Alteryx
Hi @TashaA, @MichaelCh, sorry for off topic, but I'm facing the same issue with .NET SDK. I started developing my tool with WinForms UI, but I decided to switch to HTML GUI SDK because of troubles mentioned here, but I did not find the way how to decrypt password encrypted by the widget. With WinForms UI I used method AlteryxGuiToolkit.AlteryxEngineApi.AlteryxEncryptPassword to encrypt/decrypt passwords, but it does not work with hashes comming from HTML GUI SDK widget. Do we have any other method that could handle passwords hashes created by the TextBox widget with password="true"?? Thanks Regards Petr
RyanSw
Alteryx Alumni (Retired)

You're on the right track! Though, the encryption by the UISDK actually has a little detail you're missing: It encrypts twice. Have a go at decrypting twice through it, and you should get what you're looking for!

 

Let me know if that doesn't work, just decrypt the value, then decrypt the result it gives you there, and you should have the original source then.

PetrT
Alteryx
Alteryx
Thanks a lot @RyanSw, it works!!
Coxta45
11 - Bolide

@PetrT where can one find said AlteryxGuiToolkit ?

PetrT
Alteryx
Alteryx
Hi @Coxta45, for admin installation it should be "c:\Program Files\Alteryx\bin\AlteryxGuiToolkit.dll" . It is a part of .NET SDK. For more details refer "..\Alteryx\APIs\SampleCode\DotNetCustomTools.pdf"