Accessing a network folder without exposing username and password

Is there a way to give ignition access to a network drive without exposing the username and password?

I use the following command to grant the access, but I lose the access after the gateway is restarted. I had to add the command to a project startup script and it works great, but this exposes the username and password. Is there a way to accomplish what I am doing without exposing the user name and password? Short of manually issuing the command each time Ignition restarts (obviously this is certainly not ideal).

os.system("net use \\10.10.###.###\x_scales password_goes_here /USER:10.10.###.###\sco")

Configure the gateway service itself with a user name and password that has the desired network privileges. (Instead of the default LOCAL_SYSTEM.) Then use UNC paths everywhere in your gateway and it will Just Work™. This is the only reliable approach. (In windows. If you run your gateway on Linux, you can use autofs with suitable credentials storage.)

I've recently started preaching this approach when working with the support team.

There's been a little pushback from customers who just love their drive letters, but this is the way.

Thank you, I use UNC paths only, so this approach will work great for me.

I will try this late tonight when we are done packing our main pack lines. I see how to add the user name to the Ignition service, and we have a service account setup in Active Directory that I can use, so I should be able to set this up. But, my only concern is will it affect anything else in Ignition or will it behave the same? I will test when only a smaller shed is running, but just wanted to get any insight on problems that may occur with this type of change.

If currently set up for LOCAL_SYSTEM, then switching to a generic domain user will add that user's network permissions, but may remove some local administrator permissions. You definitely want to test in a non-production window.