Custom Activity - Property - Text obscured

activities

#1

Hi All,

I’ve searched for something to make a property field appear like “*****” when typing, just as the GetPassword does. I’ve tried many things and attributes but I still couldn’t find the solution for that.

Do you have any idea of how to do that, to have a property field in an custom activity that doesn’t show the characters when you type the value for it?

Thanks and regards,

Bruno Costa.


#2

Hi @brunoazev,

Take a look at : https://msdn.microsoft.com/en-us/library/system.componentmodel.passwordpropertytextattribute.aspx

Hope it helps!

Regards,

Masiré


#3

Hi @Masire,

I’ve already tried that but this doesn’t seem to work, it keeps showing the characters.
This is the code that I tried to use:

	[RequiredArgument]	
    [Category("Input")]
	[Description("String")]		
	[PasswordPropertyText(true)]
    public InArgument<string> SomeProperty
    {
        get;
        set;
    }

I’m afraid UiPath has something special implemented for this to work fine.

Thank you anyway!

Regards,

Bruno Costa.


#4

Can you try this?

using System.ComponentModel.DataAnnotations;

[Category(“Input”)]
[PasswordPropertyText(true)]
[DataType(DataType.Password)]
public InArgument StringInput2 { get; set; }

Update : I tried and it didn’t work for me. Looks like the property should be explicitly set on Uipath.


#5

Hi @vvaidya,

Thank you for trying!

Regards,

Bruno Costa


#6

Hi,

I’d go a different route and store it in Orchestrator as a password, building your activity to take a SecureString argument.

GetPassword seems to do some encryption, but as long as the result is saved in the .xaml itself (it is, and I assume your activity would work similarly), one could brake it without any hassle (let’s not go into details here :wink: ).

It would be nice to get it working, but I’m not sure it’s worth the trouble, as as far as I can tell it will give just an illusion of security anyway. If someone will be able to get xaml files from that machine, he will also be most probably be able to get your .nupkg and from there reverse the encryption.

Regards,
Andrzej


#7

Thank you @andrzej.kniola for both advice and idea!

Regards,

Bruno Costa.