spring-projects / spring-projects/spring-security-kerberos

Error message "Negotiate Header was invalid"

Open
#89 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
199
Forks
222
PR merge metrics
No merged PRs in 30d

Description

hello,

we are seeing occasionally below error in a number of applications using spring security

Error:

Negotiate Header was invalid: Negotiate TlRMTVNTUAABAAAAl4II4gAAAAAAAAAAAAAAAAAAAAAGAbEdAAAADw==
2016-04-07T09:45:38.000+00:00 [App/0] OUT org.springframework.security.authentication.BadCredentialsException: Kerberos validation not successful
2016-04-07T09:45:38.000+00:00 [App/0] OUT at com.fil.dc.authentication.provider.KerberosServiceAuthenticationProvider.authenticate(KerberosServiceAuthenticationProvider.java:44) ~[dc-Authentication-Api-1.0.0.jar:na] 

Caused by: org.ietf.jgss.GSSException: Defective token detected (Mechanism level: GSSHeader did not find the right tag)
2016-04-07T09:45:35.000+00:00 [App/0] OUT at sun.security.jgss.GSSHeader.<init>(GSSHeader.java:97) ~[na:1.8.0_71-]
2016-04-07T09:45:35.000+00:00 [App/0] OUT at sun.security.jgss.GSSContextImpl.acceptSecContext(GSSContextImpl.java:306) ~[na:1.8.0_71-]
2016-04-07T09:45:35.000+00:00 [App/0] OUT at org.springframework.security.kerberos.authentication.sun.SunJaasKerberosTicketValidator$KerberosValidateAction.run(SunJaasKerberosTicketValidator.java:170) ~[spring-security-kerberos-core-1.0.1.RELEASE.jar:1.0.1.RELEASE] 


http://forum.spring.io/forum/spring-projects/security/121613-spring-security-spnego-kerberos-sso

Since the application is deployed in cloud foundry and the error is occasional we have ruled out some of the suggestions on web
i.e.

  1. application and ARS deployed on same server
  2. network connectivity issues - since we have not seen any firewall drops.

I found this archived link of spring forums with no conclusive solution before the forums were closed.
http://forum.spring.io/forum/spring-projects/security/121613-spring-security-spnego-kerberos-sso.

Please can you advise if an issue was found with a solution or guide towards a direction because it seems instead of SPNEGO, NTLM is being used.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with KerberosServiceAuthenticationProvider.authenticate and SunJaasKerberosTicketValidator.SunJaasKerberosTicketValidator, then trace the reported GSSHeader failure and the Negotiate header handling. Reproduce the intermittent case if possible, determine why an NTLM token reaches Kerberos validation, and document a confirmed cause and resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
authentication, backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.