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

Created on 26 May 2015  路  7Comments  路  Source: ariya/phantomjs

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

QOther stale

Most helpful comment

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.

All 7 comments

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

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

@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 ?

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.

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

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

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!

Was this page helpful?
0 / 5 - 0 ratings