dynamicdan / sn-filesync

2-way sync ServiceNow field values to local files
MIT License
66 stars 37 forks source link

Authentication - .netrc credential support #47

Open cdjones32 opened 6 years ago

cdjones32 commented 6 years ago

Hello. I've just started using this project over my hand-rolled version, and I'm very impressed!

However, I have a few enhancements I would like to discuss and validate that they are wanted by people other than just me before I continue any further.

The first one is the removal of credentials from the configuration file. I believe this would be a common requirement, and also a common security concern (I've even seen people make their credentials public in pull requests on this project). Additionally, it prevents someone from setting up and sharing a configuration (e.g. with a team).

This pull request has implemented a simple, standard mechanism for pulling the credentials from the users ~/.netrc file - a practice shared by many utilities (e.g. curl, ftp, httpie, etc.). The change is backward compatible and allows you to opt-in with a setting in your config file.

I've provided preliminary documentation, with an example, and done some simple testing on Mac, but I'm confident it would work equally well on Linux.

What still needs to be done:

Anyway, I just thought I would start the process to get comments/guidance on how to proceed.

Thanks for your time...