-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internet Explorer bodyless POST optimization with SPNEGO header and accept-incomplete not handled #346
Comments
This looks like something we should implement, PRs with tests welcome! |
As far as I am concerned, there a lot of work before getting even near to a PR, I need to get familiar with the code base, the test suite, and most of all the build and process... This will not happen anytime soon. |
There's quite a bit in https://github.com/dblock/waffle/blob/master/Docs/SettingUpDevelopmentEnvironment.md, and maybe as you work through it you can contribute for the next person to get started. |
Shame on me, I did not find this doc previouly. |
No worries @OlivierJaquemet :) |
Any progress on this issue? We've recently upgraded to IE11 in our company and XHR-based file uploads started to fail from time to time. As soon as I remove waffle from the filter-chain (JSF based application) it works all the time. |
@fanste the issue you are facing is probably not this one which happens only when using NTLMSSP (not kerberos), under very rare circumstances. Issue #167 is certainly the source of the problem you are observing. I had a similar bug and I could test the solution implemented by @AriSuutariST in #338 and #339 with success . As far as I know #339 has not yet been merged due to unittest issues so it is probably not yet planned for 1.8.2. In the meantime you can checkout the corresponding branch to apply and test the fix (and it would be nice to do so as it would add a second confirmation of proper implementation). |
Thanks for your feedback. I will take a look at the referenced issue and patches. |
After you got me back to this issue, I have a question: What is your waffle filter configuration? I've tried to produce a capture that is similar to yours. But it always tries to use Kerberos if I enable Negotiation. This results in
|
|
NTLM is only used for the local server instance (negTokenInit > mechTypes has it as its first element). Our testserver (somewhere in the comanies network) has MS KRB5 as its first element. I'm now using RawCap to capture the traffic of the local server. If I've understood your first post correctly, than we have the same issue. But I have a small difference: Wireshark does not show the parsed packet for I've modified Either we've hit a serious bug within IE itself or the usage of the WinAPI is incorrect (missing flags or missing additional API calls). But I'm out of ideas and far away from being a pro in concerns of NTLM. |
I think we can stop digging around as the error is not only within waffle but also occurs with Microsoft IIS 7.5. Must be a bug inside IE... I've found the following links from microsoft, but the don't fix it for me:
Edit 04.05.2016 11:03: |
For file upload, Internet Explorer may send a bodyless POST request under circumstances described in the following posts :
In such case, the behavior of the server as expected by IE is to send a 401 request to "re-establish" the authentication.
However, in my observations, when this IE "optimization" occurs, the subsequent request
Authorization: Negotiate
, with an SPNegoTokenTarg message with anaccept-incomplete
negResultLooking at the RFC : https://www.ietf.org/rfc/rfc4178.txt
The
accept-incomplete
indicates the following : "At least one additional negotiation message from the peer is needed to establish the security context."Indeed, the MSDN, documentation for
AcceptSecurityContext
indicates the possibleSEC_I_COMPLETE_AND_CONTINUE
orSEC_I_COMPLETE_NEEDED
return value which requires additionnal processing :https://msdn.microsoft.com/en-us/library/windows/desktop/aa374705(v=vs.85).aspx
waffle-jna implementation in
WindowsAuthProviderImpl.acceptSecurityToken
does not seem to be handling such case :https://github.com/dblock/waffle/blob/60451c353916863d93073a32e88006af28c94412/Source/JNA/waffle-jna/src/main/java/waffle/windows/auth/impl/WindowsAuthProviderImpl.java#L134:L170
(The result for the end user is an upload failure)
The text was updated successfully, but these errors were encountered: