phantomjs icon indicating copy to clipboard operation
phantomjs copied to clipboard

Phantomjs 2.0.0 Windows Kerberos / NTLM "HTTP" auth is possible ?

Open darkterra opened this issue 11 years ago • 7 comments

Hello,

After several days of searching and even paused after the question about the following issue: #11037

I have not found how to use Kerberos / NTLM authentication with "HTTP" protocol. I have a response 401 code error.

Someone should answer ? Knowing that I should not use IE

image

darkterra avatar May 26 '15 12:05 darkterra

Hello everyone,

With WireShark, I tried to "capture" the network packets and look at why my browser (Google Chrome) successfully recovered the page and not PhantomJS.

Attempt to access a URL with PhantomJS 2.0.0 : image

Attempt to access a URL with Google Chrome : image

I feel that Google Chrome and PhantomJS both receive a code 401, only the browser Google Chrome as early retries with Kerberos / NTLM authentication.

Someone an idea that has Kerberos PhantomJS gives what he expects ?

A parameter ? Code lines ?

Something ??? ^^

Thank you in advance

darkterra avatar Jun 01 '15 14:06 darkterra

Qt doesn't support Kerberos yet. See https://bugreports.qt.io/browse/QTBUG-1538

vitallium avatar Jun 01 '15 14:06 vitallium

@Vitallium Thank you for your reply.

If I understand it is possible to implement an overlay to be compatible with Kerberos / NTLM ?

Anyone know if this " wrapper " already exists, or should I create ?

darkterra avatar Jun 02 '15 08:06 darkterra

You can manipulate request header to send Kerberos token to hit Kerberized web pages from PhantomJS. Using below - page.customHeaders = {"Authorization": "Negotiate " + [token]};

Also I had to change cli args to --ignore-ssl-error = true to get it working.

Use https://docs.oracle.com/javase/7/docs/api/org/ietf/jgss/GSSManager.html and https://docs.oracle.com/javase/7/docs/api/org/ietf/jgss/GSSContext.html to generate Kerberos token.

vaishali33 avatar Aug 05 '15 20:08 vaishali33

Try using a proxy for now. cntlm worked for me: http://stackoverflow.com/questions/31209449/cntlm-proxy-with-phantomjs

brownbl1 avatar Sep 01 '15 19:09 brownbl1

Can't this use something similar to this NodeJS package? https://github.com/christkv/kerberos

m4c0 avatar Mar 29 '17 17:03 m4c0

Due to our very limited maintenance capacity (see #14541 for more details), we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed. In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!

stale[bot] avatar Dec 28 '19 22:12 stale[bot]