-
Notifications
You must be signed in to change notification settings - Fork 186
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
com.sun.jna.platform.win32.Win32Exception: The logon attempt failed causes a 500 status error #203
Comments
This is exactly where a stack trace has blown for some time. I wrote into the unit tests to prevent it as I didn't understand why. Fixing this breaks the unit tests in the original areas so uncertain what that would happen then if this was in fact restoring original logic. However, some minor rewriting of tests to not look at as much under this condition gets those working again. I'm going to do a pull request but it needs good review before pulling it in for this. I also want to look at the other issue on this I think is still outstanding to see the dates around this. |
This appears to be issue #107 |
A fix to capture tomcat 6, 7, and 8 negotiate authenticator Win32Exception which started occurring around June 2015 per issue #107. Around that time Exception was switched out for IOException which allowed Win32Exception to occur. Now catch that and perform same actions as IOException. Left original unit tests capturing fall through and added new check as this shows Negotiate, NTLM where the comma was normally expected to be a space. This does fix the condition but I'm not 100% certain this is correct from unit test side.
A fix to capture tomcat 6, 7, and 8 negotiate authenticator Win32Exception which started occurring around June 2015 per issue #107. Around that time Exception was switched out for IOException which allowed Win32Exception to occur. Now catch that and perform same actions as IOException. Left original unit tests capturing fall through and added new check as this shows Negotiate, NTLM where the comma was normally expected to be a space. This does fix the condition but I'm not 100% certain this is correct from unit test side.
[issue #203] Catch Win32Exception and make 401
Resolved in PR #206 |
A fix to capture tomcat 6, 7, and 8 negotiate authenticator Win32Exception which started occurring around June 2015 per issue #107. Around that time Exception was switched out for IOException which allowed Win32Exception to occur. Now catch that and perform same actions as IOException. Left original unit tests capturing fall through and added new check as this shows Negotiate, NTLM where the comma was normally expected to be a space. This does fix the condition but I'm not 100% certain this is correct from unit test side.
A fix to capture tomcat 6, 7, and 8 negotiate authenticator Win32Exception which started occurring around June 2015 per issue #107. Around that time Exception was switched out for IOException which allowed Win32Exception to occur. Now catch that and perform same actions as IOException. Left original unit tests capturing fall through and added new check as this shows Negotiate, NTLM where the comma was normally expected to be a space. This does fix the condition but I'm not 100% certain this is correct from unit test side.
A fix to capture tomcat 6, 7, and 8 negotiate authenticator Win32Exception which started occurring around June 2015 per issue #107. Around that time Exception was switched out for IOException which allowed Win32Exception to occur. Now catch that and perform same actions as IOException. Left original unit tests capturing fall through and added new check as this shows Negotiate, NTLM where the comma was normally expected to be a space. This does fix the condition but I'm not 100% certain this is correct from unit test side.
I am using Waffle 1.8, since it was built on Sep 2015, the bug fix should be in 1.8 already. How come I am still seeing the same error? Update: Sorry my mistake. I just checked the 1.8 code, the fix is indeed there. I then looked at my error message, and I realized I was using MixedAuthenticator, and the fix is actually for NegoticateAuthenticator. Just switched the valve from MixedAuthenticator to NegoticatedAuthenticator. My problem is fixed. However, I think Waffle should fix the MixedAuthenticator code as well, just in case if people have to use MixedAuthenticator. |
Can you try version 1.8.1 and let me know if its a problem there? |
I have the same error with the 1.8.1 waffle version...Someone could help me¿? |
Can you try 1.8.3 and let us know if the issue is present?
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: gargomanjr <notifications@github.com>
Sent: Friday, March 3, 2017 2:57:03 AM
To: Waffle/waffle
Cc: Jeremy Landis; State change
Subject: Re: [Waffle/waffle] com.sun.jna.platform.win32.Win32Exception: The logon attempt failed causes a 500 status error (#203)
I have the same error with the 1.8.1 waffle version...Someone could help me¿?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub<#203 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AA7ho2UObbwc5dzpeZUhWsLYMsoFx3tOks5rh8fPgaJpZM4DsQy4>.
|
Thanks hazendaz, but I couldn't download the 1.8.3 version, ¿Which repository should I use? I fixed this error in my code extending WindowsAuthProviderImpl and throwing a AuthenticationServiceException instead of Win32Exception. Then, I used the failureHandler to handle this issue and redirect to login page. |
version 1.8.3 fix the problem!thank you!!!!!!!!! |
@gargomanjr Your welcome! |
Tomcat valve isn't catching a Win32 auth error, should be turning it into a 401.
Probably here.
The text was updated successfully, but these errors were encountered: