Skip to content

NTLM/Kerberos not working in Electron 4.0.x #17111

Closed

Description

@beig
  • Electron Version (output of node_modules/.bin/electron --version):
    • 4.0.x
  • Operating System (Platform and Version):
    • Windows 7 Build 7601
  • Last known working Electron version (if applicable):
    • 3.1.4

Expected Behavior

Browsing a webpage (google) over system proxy using NTLM/Kerberos authentication

Actual behavior

No Login informations are sent

Additional Information

Upgraded our working 3.1.x Electron App to 4.0.x

In 3.1.x app.on('login') doesn't get triggered but it does in 4.0.x with the following output:

{ isProxy: true,
  scheme: 'ntlm',
  host: 'proxy-url',
  port: 8080,
  realm: '' }

Activity

  1. welcome commented on Feb 25, 2019

    @welcome

    👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

    To help make it easier for us to investigate your issue, please follow the contributing guidelines.

  2. nornagon commented on Feb 25, 2019

    @nornagon
    Contributor

    Can you give some more information about your proxy setup? It looks to me from the login event data like the scheme is NTLM, not negotiate, & so kerberos is not involved.

    Locally I'm able to observe that the login event is triggered for a navigation to a page behind an NTLM proxy for Electron versions 3.1.0, 4.0.5 and 5.0.0-beta.3 when setting the proxy through session.defaultSession.setProxy({proxyRules: 'http=localhost:8090'}) (and a hacked-up fake NTLM proxy).

  3. beig commented on Feb 26, 2019

    @beig
    Author

    hi @nornagon I am not really an expert in this things.

    I tried to break our working 3.x.x App(session.defaultSession.allowNTLMCredentialsForDomains('*');) but no luck so far. I can browse out of box, no settings required. But changing to electron 4 breaks stuff.

    Is there a way to switch to kerberos instead of ntlm in 4.x.x?

  4. nornagon commented on Feb 26, 2019

    @nornagon
    Contributor

    The authentication schemes allowed are determined by the proxy you're using, which will respond to an unauthenticated request with a set of Proxy-Authenticate headers corresponding to acceptable authentication schemes. If the negotiate scheme is in there, Electron will prefer it to NTLM and use Kerberos. The fact that the login event is being triggered with scheme: "ntlm" indicates that your proxy is not offering Kerberos authentication via the negotiate scheme.

    The change in behaviour between Electron 3 and 4 might be explained by https://bugs.chromium.org/p/chromium/issues/detail?id=807760, which landed NTLMv2 support in Chrome 65 (implicitly disabling NTLMv1). Your proxy might not be correctly configured to handle NTLMv2?

  5. beig commented on Mar 4, 2019

    @beig
    Author

    But Electron 3.1.4 uses Chromium v66.0.xxx and it does work without problems.

  6. nornagon commented on Mar 4, 2019

    @nornagon
    Contributor

    In Chrome 69, NTLMv2 is enabled by default and NTLMv1 is not enabled. If your proxy only supports NTLMv1, Electron 4 will not work with it, but Electron 3 will.

  7. beig commented on May 24, 2019

    @beig
    Author

    Hello @nornagon , just saw the 5.0.2 release and now our proxy authentication is working again. Thank you very much

  8. nornagon commented on May 24, 2019

    @nornagon
    Contributor

    Glad to hear! Thanks for checking in.

    (For anyone following along, check #18251 for details about what the problem was & how it was fixed.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions