bjowes / cypress-ntlm-auth

Windows authentication plugin for Cypress
MIT License
55 stars 9 forks source link

NTLM login Issue #201

Closed Rashminair88 closed 2 years ago

Rashminair88 commented 2 years ago

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: https://github.com/cypress-io/cypress/issues/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 commented 2 years ago

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 commented 2 years ago

Hello,

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

Thanks, Rashmi

bjowes commented 2 years ago

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 commented 2 years ago

This is what I get when I run the script.

Thanks

bjowes commented 2 years ago

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 commented 2 years ago

I did disable TLS. Still getting the same error.

Thanks

bjowes commented 2 years ago

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

Rashminair88 commented 2 years ago

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

bjowes commented 1 year ago

Ah well, you need to comment out the cy.ntlm (and cy.ntlmReset and cy.ntlmSso if those are present)

fre 8 apr. 2022 kl. 20:40 skrev Rashminair88 @.***>:

Hello,

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

[image: image] https://user-images.githubusercontent.com/96204241/162501999-059be2f8-c780-43e6-964a-1f40e3e8f39f.png

Thanks, Rashmi

— Reply to this email directly, view it on GitHub https://github.com/bjowes/cypress-ntlm-auth/issues/201#issuecomment-1093205462, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCHR3F4KRNDQOXNXHMGRITVEB4S5ANCNFSM5S4SBJSA . You are receiving this because you commented.Message ID: @.***>

-- /Björn W

Skickat från min iPhone