Investigate feasibility of supporting NTLM protocol on non-Windows platforms
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.)
related https://github.com/dotnet/corefx/issues/3609 and https://github.com/dotnet/corefx/issues/3718
Changing milestone since NegotiateStream xplat is planned for RTM
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
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:
- 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?
- 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:
- 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
- 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?
cc: @stephentoub, @rajansingh10, @mconnew, @roncain, @SidharthNabar, @davidsh, @CIPop
Looking for opinions or alternatives that I can investigate
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, 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.
@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.
Changing milestone to Future since investigation is done for v1.
- For NTLM support in AuthenticateAsClient, libheimntlm can be used (needs installation on OSX)
- NTLM support in AuthenticateAsServer is not needed in v1 since the WCF code is client-side only
NTLM is possible on Linux. See the TEE extension for Eclipse as an example.
since ntlm is now supported , do we still need this issue as active?