Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I indicate to clients that SPNEGO is supported but NTLM is not for HTTP requests?

The two WWW-Authenticate additions Microsoft makes use of that I am currently aware of are

  • NTLM
  • Negotiate

If Negotiate is sent down from the server, based on a set of conditions Kerberos will be used

  • Intranet Zone
  • Accessing the server using a Hostname rather then IP
  • Integrated Windows Authentication in IE is enabled, the host is trusted in Firefox
  • The Server is not local to the browser
  • The client's Kerberos system is authenticated to a domain controller

Then Kerberos will be attempted between the server and the client, if something above is not met, then NTLM will be attempted.

My question is, is there some way for the server to indicate that NTLM should not be sent? I currently handle this by keeping track of the request in the session, and if a NTLM message is received, it disables Kerberos and WWW-Authenticate for the rest of that sessions life.

like image 574
Scott Markwell Avatar asked Jan 28 '09 23:01

Scott Markwell


People also ask

How does SPNEGO authentication work?

SPNEGO authentication in the Liberty server sees the HTTP header with the SPNEGO token, validates the SPNEGO token, and gets the identity (principal) of the user. After the Liberty server gets the identity of the user, it validates the user in its user registry and performs the authorization checks.

Is SPNEGO a Kerberos?

SPNEGO (Simple Protocol GSSAPI Negotiation Mechanism) is a mechanism used in a client-server context to negotiate the choice of security technology. It is used when the parties have no clue about the authentication protocols their correspondent supports. The negotiable security mechanism includes Kerberos.

What is SPNEGO protocol?

The SPNEGO protocol allows for a negotiation between the client (browser) and the server regarding the authentication mechanism to use. The client identity presented by the browser can be verified by WebSEAL using Kerberos authentication mechanisms.

How do I enable SPNEGO?

Procedure. In the administrative console, clickSecurity >Global security. Under Authentication, expand Web and SIP Security and then click SPNEGO web authentication. Note: You must configure the filter before enabling SPNEGO web authentication.


3 Answers

The initial WWW-Authenticate header only specifies negotiate. It can't say anything more, such as "no NTLM".

I think it's possible to respond to the first Authenticate: {Base64 NTLMSSP} header sent by the client with 401 unauthorized and a second Negotiate header, which can include a response token, possibly including a SupportedMechanisms that specifies Kerberos Only.

But I suspect that will only get you "unauthorized", because it was falling back to NTLM in the first place.

like image 168
davenpcj Avatar answered Sep 30 '22 03:09

davenpcj


Yes you can. Take a look at the reference docs of the SPNEGO HTTP Servlet Filter project.

like image 43
Pat Gonzalez Avatar answered Sep 30 '22 04:09

Pat Gonzalez


You can do that, (at least in theory) yes. IE might do totally weird stuff like sending Kerberos Tokens without the appropriate SPNEGO ASN.1 encapsulation, but well, thats a different topic. In a conforming SPNEGO (https://www.rfc-editor.org/rfc/rfc4178#section-4.1) Implementation you could do that.

If you can manipulate the NegTokenInit mechTypes member to only contain Kerberos it forces the client to send Kerberos or fail to authenticate.

like image 42
schlenk Avatar answered Sep 30 '22 04:09

schlenk