Skip to content

Commit

Permalink
ISPN-7675 Use a special JAAS login configuration file for Kerberos te…
Browse files Browse the repository at this point in the history
…sts on IBM JDK
  • Loading branch information
tristantarrant authored and wburns committed Mar 27, 2017
1 parent e7064f0 commit b3b987d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -48,7 +48,8 @@ public RemoteInfinispanServer getRemoteServer() {
}

protected Subject getSubject(String login, String password) throws LoginException {
System.setProperty("java.security.auth.login.config", HotRodKrbAuthIT.class.getResource("/jaas_krb_login.conf")
String krbLogin = System.getProperty("java.vendor").contains("IBM") ? "/ibm_jaas_krb_login.conf" : "/jaas_krb_login.conf";
System.setProperty("java.security.auth.login.config", HotRodKrbAuthIT.class.getResource(krbLogin)
.getPath());
System.setProperty("java.security.krb5.conf", HotRodKrbAuthIT.class.getResource("/krb5.conf").getPath());
LoginContext lc = new LoginContext("HotRodKrbClient", new SimpleLoginHandler(login + "@" + KRB_REALM, password));
Expand Down
@@ -0,0 +1,3 @@
HotRodKrbClient {
com.ibm.security.auth.module.Krb5LoginModule required refreshKrb5Config=true client=TRUE;
};

0 comments on commit b3b987d

Please sign in to comment.