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

NTLM login Issue #201

Closed
Rashminair88 opened this issue Apr 8, 2022 · 9 comments
Closed

NTLM login Issue #201

Rashminair88 opened this issue Apr 8, 2022 · 9 comments

Comments

@Rashminair88
Copy link

Rashminair88 commented Apr 8, 2022

Current behavior
I am trying to log in to a site that's windows authenticated.

I tried with both cypress 9.4.0 and 9.5.1. Getting same error
Do I need to set proxy? set HTTP_PROXY=http://my-company-proxy.com/
I have another issue opened: cypress-io/cypress#20422, But no reply on that. SO creating new issue

Desired behavior
Should be able to login

Test code to reproduce
cy.ntlm(['rhbeta.rockfin.com', 'rhbeta.rktfoc.com'], Cypress.env('uname'), Cypress.env('password'));
cy.visit("https://rhbeta.rktfoc.com/crib/dashboard/tester");

Cypress Version
9.4.0, 9.5.1

Other
No response

@bjowes
Copy link
Owner

bjowes commented Apr 8, 2022

Most likely you either need a proxy setting, or you need a corporate certificate.
When you run the same test without cypress-ntlm (just ´npx cypress open´), what is the result?

@Rashminair88
Copy link
Author

Rashminair88 commented Apr 8, 2022

Hello,

I am getting this error when I run with npx cypress open.

Thanks,
Rashmi

@bjowes
Copy link
Owner

bjowes commented Apr 9, 2022

The cy.ntlm, cy.ntlmReset and cy.ntlmSso commands won't work when you run cypress open. Please comment those out and try again.

@Rashminair88
Copy link
Author

Rashminair88 commented Apr 11, 2022

This is what I get when I run the script.

Thanks

@bjowes
Copy link
Owner

bjowes commented Apr 12, 2022

Ok. This means that there is a certificate validation issue. Cypress ignores these, but the plugin does not. (There is a new version coming shortly that will be more flexible on certificate validation).

There is more info here: https://github.com/bjowes/cypress-ntlm-auth#httpsssltls-issues
And I explain how to resolve it in depth in a conference talk from NDC Oslo 2020

To just quickly validate that this is indeed the issue, you can temporarily disable TLS validation as described in the readme linked above. When the new version of the plugin is released, this will not be needed anymore.

@Rashminair88
Copy link
Author

Rashminair88 commented Apr 12, 2022

I did disable TLS. Still getting the same error.

Thanks

@bjowes
Copy link
Owner

bjowes commented Apr 13, 2022

Just released version 4 of the plugin. Please try it out since it is more allowing for certificate issues

@Rashminair88
Copy link
Author

Thank you so much. The plugin 4.0.1 resolved my issue. Appreciate your help and responses.

@bjowes bjowes closed this as completed Apr 28, 2022
@bjowes
Copy link
Owner

bjowes commented Oct 11, 2022 via email

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

No branches or pull requests

2 participants