insomniacc / PSSnow

A powershell module for interacting with the ServiceNow REST API
GNU General Public License v3.0
41 stars 9 forks source link

Proxy bypass option for Set-SNowAuth #58

Closed ad-85 closed 8 months ago

ad-85 commented 10 months ago

Is your feature request related to a problem? Please describe. Set-SNowAuth appears to always use the default proxy settings when no URI + Credentials are passed in, however there is no switch for bypassing proxy entirely which our environment is set up to allow for ServiceNow.

Describe the solution you'd like Ideally, a parameter added to Set-SNowAuth such as -BypassProxy which will allow for direct connections if desired with minimal-to-no impact to those relying on the existing behaviour.

Additional context Add any other context or screenshots about the feature request here.

insomniacc commented 10 months ago

Thanks for the request, I'll get this added in 1.3.0 shortly

insomniacc commented 8 months ago

@ad-85 Sorry for the delay getting to this one, I know it's been a while but life has been crazy, only just managed to find some time to get back to my personal projects. I've got a workable solution for PS Core users by adding a '-BypassDefaultProxy' flag to the Set-SNOWAuth command. However theres really no easy way to do this for 5.1 users without introducing quite a lot of fundamental changes to the module which I'd rather not get into, so for that reason instead I'll put a warning message directing people to use either proxy bypass settings in windows or the 'no_proxy' environment variable which will achieve the same but is local machine config rather than something that this module can control. I'll document it all in the readme and put a link too.

I've got the code changes lined up and will release it later today.

Out of interest are you using this with 5.1 or Core?

ad-85 commented 8 months ago

I'm currently in 5.1 but we're in the process of migrating to Core. Thanks for the attention on this. 👍🏻

insomniacc commented 8 months ago

Code added to the 'Next' branch, this will be published in the 1.3.0 release today. More details: https://github.com/insomniacc/PSSnow/blob/next/docs/UserGuide.MD#proxy-authentication