How to prevent multimple auth request in IE

Oct 12, 2011 at 3:50 PM

Hi All!

I'm  using waffle in my project ( ajax project) with spring security,  it works fine.

I'm using  Google Chrome and IE Explorer 8 in  my test.

I have this issue:

 The authentication  cross   waffle filter in IE is done in every request   navigating in my web app and  worse performance.

Otherwise in Chrome there is authentication just first time while in the next request  no more authentication is done. 

Why IE make auth always, I don't want this behavior.

can someone help me!

Thanks

Gianluca


Coordinator
Oct 12, 2011 at 4:48 PM

Get an HTTP trace for your app and check whether you're doing NTLM in IE with connection: close. NTLM is per-connection, so if you're closing and reopening a connection every time you get this behavior.

Oct 18, 2011 at 9:52 AM

I checked HTTP Header and the connection is keep-Alive but the content-lenght is 0

This is  the trace after  I'm  already logged in

REQUEST:

POST /ContMan/ui/template/maketemplate.jsf HTTP/1.1Accept: application/xml, text/xml, */*; q=0.01Accept-Language: itfaces-request: partial/ajaxReferer: http://localhost:8080/ContMan/ui/template/templates.jsfx-requested-with: XMLHttpRequestContent-Type: application/x-www-form-urlencodedAccept-Encoding: gzip, deflateUser-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.4; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C)

Host: localhost:8080 Content-Length: 0

 Connection: Keep-Alive Cache-Control: no-cacheCookie: blackbird={pos:0,size:0,load:true}; blackbird={pos:0,size:0,load:true}; JSESSIONID=426AC81E41EF0ACE095B1105222527E6

Authorization: NTLM TlRMTVNTUAABAAAAB7IIogYABgAyAAAACgAKACgAAAAFASgKAAAAD0dSSUNDSUFSRElNSUxBTk8=
RESPONSE:
HTTP/1.1 401 UnauthorizedServer: Apache-Coyote/1.1WWW-Authenticate: NTLM TlRMTVNTUAACAAAADAAMADgAAAAFwomiPKEVYRZD2LjoxQwAAAAAAJYAlgBEAAAABQEoCgAAAA9NAEkATABBAE4ATwACAAwATQBJAEwAQQBOAE8AAQAUAEcAUgBJAEMAQwBJAEEAUgBEAEkABAAmAG0AaQBsAGEAbgBvAC4AYQBiAGEAYwBvAHMAbwBmAHQALgBpAHQAAwA8AGcAcgBpAGMAYwBpAGEAcgBkAGkALgBtAGkAbABhAG4AbwAuAGEAYgBhAGMAbwBzAG8AZgB0AC4AaQB0AAAAAAA=Connection: keep-aliveTransfer-Encoding: chunkedDate: Tue, 18 Oct 2011 09:34:19 GMT

After this follow the second post:

POST /ContMan/ui/template/maketemplate.jsf HTTP/1.1Accept: application/xml, text/xml, */*; q=0.01Accept-Language: itfaces-request: partial/ajaxReferer: http://localhost:8080/ContMan/ui/template/templates.jsfx-requested-with: XMLHttpRequestContent-Type: application/x-www-form-urlencodedAccept-Encoding: gzip, deflateUser-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.4; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C)Host: localhost:8080

Content-Length: 4440

Connection: Keep-Alive

Cache-Control: no-cacheCookie: blackbird={pos:0,size:0,load:true}; blackbird={pos:0,size:0,load:true}; JSESSIONID=426AC81E41EF0ACE095B1105222527E6Authorization: NTLM TlRMTVNTUAADAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAAAAAAAEgAAAAAAAAASAAAAAAAAABIAAAABcKIogUBKAoAAAAP

 

The only difference that  I'm finding is the content lenght  I don't if this could be a problem.

 

Thanks

Gianluca

Coordinator
Oct 18, 2011 at 11:14 PM

Take a look at http://code.dblock.org/ntlm-please-show-id-with-every-post