Kerberos broken after upgrading from Java6 to Java7

后端 未结 3 1769
轻奢々
轻奢々 2021-02-05 22:17

I have a working application using the spring-security kerberos extension, running on jboss, running java 6.

I\'m in the process of upgrading my jvm from java 6 to jav

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-05 23:02

    Yes! We patched SunJaasKerberosTicketValidator to look like this and it worked:

    String keyTabPath = this.keyTabLocation.getURL().toExternalForm();
    String runtimeVersion = System.getProperty("java.version");
    if (runtimeVersion.startsWith("1.7")) 
    {
          LOG.info("Detected jdk 7. Modifying keytabpath");
          if (keyTabPath != null)
          {
            if (keyTabPath.startsWith("file:")) 
            {
                keyTabPath = keyTabPath.substring(5);
            }
          }
    }
    LOG.info("KeyTabPath: " + keyTabPath);
    LoginConfig loginConfig = new LoginConfig(keyTabPath, this.servicePrincipal,
                    this.debug);
    

提交回复
热议问题