Save Portal Password Securely

1268
3
05-13-2020 06:04 AM
by Anonymous User
Not applicable

We have a Pro geoprocessing tool that will eventually be published as geoprocessing service.  This tool requires Portal authentication to access secured feature services.  Currently we are saving built-in Portal username and password into a config file, but I wonder if there's a way to avoid saving password as cleartext (also don't want to prompt user every time they use the GP tool or service) and handle the authentication.  

0 Kudos
3 Replies
JoshuaBixby
MVP Esteemed Contributor

This is one of those age-old programming questions, and the answers range from quite involved and very secure to simple and basically secure.  Although dated, the discussion at security - I need to securely store a username and password in Python, what are my options? - Stack ... is still mostly relevant today.  I especially like drodgers answer because he present several different approach with basic trade offs of each approach.

forestknutsen1
MVP Regular Contributor

I have seen a combination of keyring · PyPI and windows Windows Credential Vault used in the past.

How is python-keyring implemented on Windows? - Stack Overflow 

0 Kudos
GeoSolver
New Contributor III

Thanks for the helpful replies.  I think the keyring solution will probably work for me, as I can set it up locally and on the servers that will running these scripts.

0 Kudos