Kerberos error: GSSHeader did not find the right tag

ⅰ亾dé卋堺 提交于 2019-12-18 20:11:27

问题


I’m trying to make Kerberos authentication connection to a SOAP service wsdl url. I’m able to establish connection successfully and make service calls. After I start my server, I’m able to make successful service call at least once. However after few requests (1 or more ), I suddenly get invalid token error. Once I get the error, future calls do not work and error persists.

IF I restart my server, then again service call works at least once. And above cycle continues.

I’m unable to figure out why suddenly token gets invalid, though it worked earlier. And restarting server makes token valid again.

Here is error stacktrace:

Caused by: GSSException: Defective token detected (Mechanism level: GSSHeader did not find the right tag)
        at sun.security.jgss.GSSHeader.<init>(GSSHeader.java:97)
        at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:237)
        at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179)

回答1:


Without seeing the Base 64 value or a hex dump, I assume that the client is sending a NTLM type 1 token and Java does not support NTLM.




回答2:


I could not find root cause for why token is invalid. But here is how i get around this issue.

My authentication was working for first time after I restart my server and bean is loaded again in context. So I changed scope of my spring bean to prototype so that every time new proxy bean is created.



来源:https://stackoverflow.com/questions/31942234/kerberos-error-gssheader-did-not-find-the-right-tag

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!