Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support proxy authentication #3566

Closed
sengopal opened this issue Sep 28, 2017 · 49 comments
Closed

Support proxy authentication #3566

sengopal opened this issue Sep 28, 2017 · 49 comments

Comments

@sengopal
Copy link

sengopal commented Sep 28, 2017

App Details:

Postman for Mac
Version 5.2.1
OS X Sierra / x64

Issue Report

  1. Setting up system Proxy usage was always a problem with Postman. However, with the new System Proxy setting (Toggle to use the system proxy), the hope was the proxy from the system configuration can be made to function.
  2. However, the system proxy has an authentication (Basic base64(username:password)) which needs to be first provided to authorize against the proxy server.
  3. Only after that the actual API can be invoked.
  4. This is well explained in the stackoverflow post here
  5. Unfortunately, there seems to be no way to perform such a call or i am unable to figure out the means to set this pre-call up.
  6. I have scoured through the Postman docs, but could not find any indicator of how to make this work.
  7. This is not a problem for the chrome extension as the authentication from the browser is shared via the Interceptor.
@harryi3t harryi3t added this to TODO in Proxy Sep 28, 2017
@harryi3t harryi3t changed the title Mac App has no means of setting up Proxy server authorization with Proxy-Authorization Header Support proxy authentication Sep 28, 2017
@msanecki
Copy link

@harryi3t In which version/when are you going to provide this feature?

@harryi3t
Copy link

harryi3t commented Nov 3, 2017

@msanecki I am afraid this is not on our immediate roadmap.
There is a workaround though, you can set an environment variable for using proxy

HTTP_PROXY=http://USERNAME:PASSWORD@IP_ADDRESS:PORT
HTTPS_PROXY=http://USERNAME:PASSWORD@IP_ADDRESS:PORT

Some imp points

  • If using localhost, make sure to use actual IP instead since localhost is converted to ipv6 ::1 which might not work for your local proxy server
  • If you don't want other applications to be affected then create a script file (depending on the OS) and set the environment variables only for Postman process
    Eg. for mac
 HTTP_PROXY=http://USERNAME:PASSWORD@IP_ADDRESS:PORT /path/to/Postman

The moment we have this on our roadmap I will update this thread :)

@yakup38
Copy link

yakup38 commented Nov 9, 2017

@harryi3t
Your work around doesn't work behind our corporate Proxy on Win 7.
I have set system env variable but still doesn't work on native app.

What am i misssing ?

@harryi3t
Copy link

harryi3t commented Nov 10, 2017

For windows please try creating a .bat file

set HTTP_PROXY=http://USER:PASS@host:port
start Postman.exe

Save this file and put it in the postman installation directory.
For windows, it should be C:\Users\Postman\AppData\Local\Postman\app-5.3.2 for the latest version.

When you open this file, the set environment variable will only apply to the Postman process.
I have tested this on win 10. Let me know if you have any issues with win 7.

@yakup38
Copy link

yakup38 commented Nov 10, 2017

Hi,
thank you for your kind suggestion.
In my case i have a NTLM auth proxy i guess since it doesn't work with your suggestion.
However, the working workaround was using CNTLM local proxy from sourceforge.net.

Now, my main problem is the WSSE Authorization which just works fine out of the box on SOAPUI but unfortunately couldn't make it work on Postman till now.

I guess some scripting should probably do it on the Pre-Request tab but couldn't find the solution yet.

Thanks !

@isaru66
Copy link

isaru66 commented Dec 7, 2017

I have run into this issue after upgraded from chrome app. Hope postman team will make this work out of the box soon.

For me, i have use CTNLM(http://cntlm.sourceforge.net) proxy as a work arround and it works very well.

@ChristianKoessel
Copy link

I have the same issue:
Behind a corporate proxy with mandatory authentication (Basic/NTLM) the native app isn't working:
Error: tunneling socket could not be established, statusCode=407
The suggested workaround (using HTTP_PROXY environment variable with user and password) works with many other applications but not with Postman.

There simply has to be a way to configure username and password for authenticating proxies!

@simgar
Copy link

simgar commented Mar 7, 2018

The environment variables/batch file doesn't work for me, either

@pawelpluta
Copy link

Any plans to fix it? This issue is actually a blocker in migration from Chrome App, because application is unusable in most corporate worlds.

@clodio
Copy link

clodio commented Mar 22, 2018

+1 : i can not use postman without this feature

@jocafi
Copy link

jocafi commented Mar 22, 2018

+1: All big corporation are waiting for the Postman with proxy authentication. At this moment, I am using the old Postman on the company that uses the proxy in the browser.

@riaadh
Copy link

riaadh commented Mar 30, 2018

+1 i think this should be priorisaed since most of us work in corporate company that have out of the box a proxy.
Thans

@kpodkalicki
Copy link

+1 it is a must-have

@pcostarg
Copy link

This is a must have for testing purposes on many corporate proxies.

@JulienVan
Copy link

JulienVan commented Jun 1, 2018

+ 1 , definitely a must-have, when will you deliver it ?

@Neurozone
Copy link

+1, please support it

1 similar comment
@Christophe93
Copy link

+1, please support it

@bhanupinninti
Copy link

+1 when can we get this to use

@nikita-mityagin
Copy link

nikita-mityagin commented Jun 14, 2018

+1 also faced this problem on the corporate network after migration from the Chrome application

@SaamiSolutions
Copy link

Work around provided by @furick1 works on v6.3.0 on win 10

@guilhermelabigalini
Copy link

+1

@iguana007
Copy link

Confirmed @furick1 guide works on Win10 :)

@akw123
Copy link

akw123 commented Nov 15, 2018

+1

@nac0n
Copy link

nac0n commented Nov 22, 2018

+1 Same problem here... Since i can't add my username and password for the proxy in the native-app i see no way to go over from the webapp.
I tried to do @furick1 's suggestion as a workaround but it didn't work using v6.5.2. So i'm just testing my API using chrome or the (now deprecated) webapp...

@LA
Copy link

LA commented Nov 23, 2018

+1 RIP

@Jpsy
Copy link

Jpsy commented Nov 23, 2018

Remember that there is a workaround using CNTLM local proxy. We use it all the time with Postman and it works well.

@sengopal
Copy link
Author

@nac0n I add a "Proxy-Authentication" . header for every request with Basic authentication which works for mac app

@nac0n
Copy link

nac0n commented Nov 26, 2018

It appears i did something wrong to work during my first try with the "Proxy-authentication" suggestion as now it's working perfectly fine.

@furick1 's example did work.

@sai-github
Copy link

sai-github commented Nov 27, 2018

Postman help center

These steps on windows worked for me.
Create a .bat file with following and run it. Disable global proxy and system proxy in postman application

set HTTP_PROXY=''
set HTTPS_PROXY=''
set http_proxy='http://username:password@proxy_server:port'
set https_proxy='http://username:password@proxy_server:port'
start C:\path\to\Postman.exe 

@jscavalcante
Copy link

Using latest native postman on windows (v6.1.4) and mac, pass proxy basic auth by doing the following.

  1. Enter your proxy auth uname/pwd in the authorization section and click preview request which should copy the base64 version of the login to a header var.
  2. Copy that base64 value into a new header key called "Proxy-Authorization"
  3. Go back into authorization and either clear the values or change to uname/pwd that your end point may require.
  4. Ensure the proxy is set in the Postman settings minus the auth which doesn't stick or set it in the system proxy info

Its Working for me. THX...

@nagelm
Copy link

nagelm commented Jan 10, 2019

Yes @furick1 's example does work but I have to manually configure for each request. I can abstract the b64 token to an environment variable but there does not seem to be a way to add a new header automatically with each request.

@nac0n
Copy link

nac0n commented Jan 11, 2019

Yes furick1 's example does work but I have to manually configure for each request. I can abstract the b64 token to an environment variable but there does not seem to be a way to add a new header automatically with each request.

@nagelm One way is to put all requests in a folder which holds the authorization header. Then with each new request just use the "Inherit auth from parent" type for authorization. This isn't a real fix but could ease the workflow for now.

@nagelm
Copy link

nagelm commented Jan 11, 2019

I am already using "inherit auth from parent" for the app auth but I hadn't thought to try it with another folder layer above for the proxy auth. Not sure if it will be possible if you are already using inheritance for app auth but thanks for the tip, I'll give it a go!

@a85 a85 added the runtime label Jan 23, 2019
@shamasis shamasis added this to To Triage in Runtime Triage and Development via automation Feb 13, 2019
@shamasis shamasis moved this from To Triage to Accepted Feature in Runtime Triage and Development Feb 13, 2019
@codenirvana codenirvana self-assigned this Mar 4, 2019
@codenirvana codenirvana moved this from Accepted Feature to Done in Runtime Triage and Development Mar 22, 2019
@codenirvana
Copy link
Member

We've added this on our Canary (version: 7.1.0-canary01) channel https://www.getpostman.com/canary

Screenshot 2019-03-29 at 2 52 37 AM

Note:
Currently, only Basic Auth is supported.
For NTLM we are tracking it here: #3692 (Please leave 👍 there).

As far as I know, mostly these three Authentication methods are used: Basic, Digest, and NTLM.
Let me know If I am missing anything here. 😅

Please try it out in the Canary version and let us know if you face any issue.
Will update the thread once we release this on our stable channel.

@mungojam
Copy link

Kerberos support please, or is that covered by digest?

@nagelm
Copy link

nagelm commented Apr 5, 2019

Working well for me on the Canary build. Only suggestion is to mask the password field like elsewhere in the app.

@codenirvana
Copy link
Member

@nagelm Thanks for the feedback. We already made this change for our stable release.

Screenshot 2019-04-04 at 6 52 41 PM

@codenirvana
Copy link
Member

Added support for proxy authentication in Postman v7.0.9 🚀

As mentioned in #3566 (comment) currently only Basic Auth is supported and support for NTLM is tracked here: #3692.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Proxy
TODO
Development

No branches or pull requests