question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for proxies that use NTLM/Kerberos authentication

See original GitHub issue

Current behavior:

Users attempting to use a proxy with NTLM authentication required will encounter the following error in Cypress when performing a cy.visit through their proxy:

HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: NEGOTIATE
Proxy-Authenticate: NTLM
Proxy-Authenticate: Basic realm="..."

Desired behavior:

Cypress reads off the required NTLM/Kerberos auth strings on Windows and automatically uses them to connect to the Internet.

Versions

Cypress 3.3.2 Windows (maybe other OSes have token stores too)

Related Issues

  • #850 - add in-browser support for NTLM authentication
  • #1255 - add in-browser support for Kerberos authentication
  • #4646 - allow tests to respond to authentication requests in real-time
  • #4669 - add in-browser support for Digest authentication

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
bjowescommented, Jul 16, 2019

Agreed, I also think NTLM support should be native to Cypress - but not only for proxies but also for sites under test. But it is a fair argument to say that NTLM proxies should be supported first, since they apply to many users behind corporate proxies, regardless of what sites they are testing.

When it comes to implementation, I solved it in the plugin by letting user specify the user/pass. But this is a different scenario since I wanted to give the user control of which user should authenticate for the test run. An alternative solution could be to compile a native dll for node (with node-gyp) which can call Win32 API methods. That way it should be possible to let the OS perform the authentication for logged in user, but it would only work on Windows.

0reactions
flotwigcommented, Aug 27, 2020

@richardszanyi I am not overly familiar with the differences between NTLM and Kerberos, sorry.

Check out the “Configuration hints” section of the cntlm docs. It does seem like you need to know a few pieces of information about your proxy.


If you don’t think cntlm will work, it looks like px does the same thing, and does explicitly support Kerberos auth, and has less to configure as well: https://github.com/genotrance/px Might be a better solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Web Proxy Authentication using Kerberos or NTLM - TechNet
Hi All. I was hoping someone would be able to guide me on addressing an issue I have with authenticating MACs against the...
Read more >
Web Proxy with Kerberos - A Basic Configuration Guide
A proxy server reduces data traffic and controls access to the Internet. Kerberos is a secure authentication method and should be preferred ...
Read more >
Configure Kerberos authentication for ProxySG or Advanced ...
Set up a valid Active Directory (AD) environment. All clients must be part of this AD domain to use Kerberos. If the client...
Read more >
Lab 3: Explicit Proxy Authentication – NTLM — F5 Identity and ...
Task 3 – Create a new Access Policy¶ · Add English to Accepted Languages · Accept all other default settings and click Finished...
Read more >
NTLM Kerberos Authentication ? - Feedback and Issues
the behavior you describe is absolutely correct. If you require Kerberos authentication, you must always use the internal domain FQDN for the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found