I have an API Key for a service I am connecting through UiPath. I am storing this API Key as Orchestrator Assets with Text type. I don’t want this API Key getting logged anywhere and thus in my Get Asset activity, I have made it Private.
I also have Verbose logging enabled for Orchestrator logging and when I check the logs, it doesn’t log this API Key as a part of Private: Get Asset Closed log item. This is as expected.
But when I check activity logs of other activities, my API Key simply shows up in plain text. Following is the extract of one such log item.
processVersion: 1.0.3 jobId: b279ec8c-f759-4ab3-82ad-937f428af953 robotName: Adi machineId: 68703 fileName: Main keyboard_arrow_down activityInfo: Object Activity: System.Activities.Statements.Sequence DisplayName: Sequence State: Executing keyboard_arrow_down Variables: Object testVar: Default Text another_var: 10 i: 1 finalResult: 0 userName: aditya apiKey: **<AIP KEY APPEARS HERE IN PLAIN TEXT>** Arguments: null
The apiKey variable in the log above is a String variable. I tried converting it to SecureString but it fails with error
RemoteException wrapping System.Exception: TypeConverter cannot convert from System.String.
How can I make sure that this API Key doesn’t appear anywhere in my logs?