runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Investigate feasibility of supporting NTLM protocol on non-Windows platforms

Open vijaykota opened this issue 11 years ago • 11 comments

Ubuntu distribution ships with a libheimntlm. Need to see if something similar is available for OSX as well. There may be other pieces needed to make NTLM work meaningfully on non-Windows (maybe winbind etc.)

vijaykota avatar Oct 08 '15 10:10 vijaykota

related https://github.com/dotnet/corefx/issues/3609 and https://github.com/dotnet/corefx/issues/3718

joshfree avatar Oct 08 '15 14:10 joshfree

Changing milestone since NegotiateStream xplat is planned for RTM

vijaykota avatar Oct 19 '15 09:10 vijaykota

Scoping down this issue to specific usage of NTLM by NegotiateStream. NegotiateStream uses plain NTLM instead of wrapping the NTLM protocol tokens inside GSSAPI. The other investigation items are still relevant but changed the issue title to reflect this

vijaykota avatar Oct 19 '15 11:10 vijaykota

Though Kerberos is the preferred protocol for interop between Unix and Windows, NegotiateStream falls back to using NTLM when Kerberos ticket cannot be obtained by client. We are facing following issues supporting the same on non-Windows platforms:

  1. Using NTLM in AuthenticateAsClient requires client-side implementation of MS-NLMP and this can be done using libheimntlm. This library ships as part of the Ubuntu distribution but for OSX, this needs to be obtained in binary/source form. Is this acceptable?
  2. Using NTLM in AuthenticateAsServer requires verification of the password sent by the client. The server-side of MS-NLMP can be implemented using libheimntlm but password verification is a problem. There are two options for this neither of which sounds good:
    1. Do local authentication by saving password hash locally on server. This is similar to non domain-joined Windows server case. Note that /etc/shadow cannot be reused because that contains a one-way encrypted password
    2. Join Unix server to the domain using Samba and verify password using pam_winbind.so (via pam_authenticate from libpam.so). Implementing all of MS-NRPC to achieve pass-thru authentication ourselves is quite expensive.

Can we live without server-side NTLM support in NegotiateStream for v1?

vijaykota avatar Nov 02 '15 11:11 vijaykota

cc: @stephentoub, @rajansingh10, @mconnew, @roncain, @SidharthNabar, @davidsh, @CIPop

Looking for opinions or alternatives that I can investigate

vijaykota avatar Nov 02 '15 11:11 vijaykota

Can we live without server-side NTLM support in NegotiateStream for v1?

My opinion is that we can. NTLM is known to be insecure and in my opinion should be considered from removal from the Windows implementation as well. WCF has some good points on why we shouldn't do that yet. I'll let them comment on why NTLM is still preferred in certain conditions even if security-wise it may be dangerous.

CIPop avatar Nov 02 '15 21:11 CIPop

@CIPop, I need to check, I'm unsure if WCF has a mechanism to supply explicit credentials when authenticating using NegotiateStream. The use case for NTLM is when the client isn't domain joined but holds domain credentials to connect to a server in a domain. If we have no mechanism to pass through those credentials, then Kerberos only will be sufficient for our needs. My opinions about still supporting NTLM were for HTTP authentication. Additionally WCF doesn't require AuthenticateAsServer (at least in the medium term) as we're client only in core clr.

mconnew avatar Nov 13 '15 18:11 mconnew

@CIPop, I just checked and we do allow explicit credentials to be passed through to the AuthenticateAsClient call so we do need NTLM support. In fact, this is the only way we're going to be able to easily test our usage of NegotiateStream in the cloud. If OSX turns out to be problematic, then having NTLM support after RTM for that single platform would be sufficient.

mconnew avatar Nov 13 '15 19:11 mconnew

Changing milestone to Future since investigation is done for v1.

  1. For NTLM support in AuthenticateAsClient, libheimntlm can be used (needs installation on OSX)
  2. NTLM support in AuthenticateAsServer is not needed in v1 since the WCF code is client-side only

vijaykota avatar Nov 19 '15 08:11 vijaykota

NTLM is possible on Linux. See the TEE extension for Eclipse as an example.

whoisj avatar Nov 20 '15 01:11 whoisj

since ntlm is now supported , do we still need this issue as active?

shrutigarg avatar May 04 '16 09:05 shrutigarg