Search code examples
kerberoscasweblogic12cjaasgssapi

Weblogic 12c kerberos application


I have written an application which extends CAS 3.5.3

CAS supports Kerberos protocol for authentication. So when I deploy this application on tomcat/jboss etc, I am able to login to my application via Kerberos. I have done settings on jboss. However wasn't able to find any concrete documentation for weblogic. The documents I have found is http://www.oracle.com/technetwork/articles/idm/weblogic-sso-kerberos-1619890.html - but this seems to be for securing the Weblogic console and now for my application.

When I try to login, getting the following error :-

Caused by: java.lang.IllegalArgumentException: No Configuration was registered that can handle the configuration named jcifs.spnego.accept at com.bea.common.security.jdkutils.JAASConfiguration.getAppConfigurationEntry(JAASConfiguration.java:130) at javax.security.auth.login.LoginContext.init(LoginContext.java:259) at javax.security.auth.login.LoginContext.(LoginContext.java:425) ... 144 more


Solution

  • It took quiet a long time to get this right, the steps are pretty simple. If you application is using jaas and you already have Kerberos authentication code (cas) in your webapp, the following solved my issue :-

    1)Keep your jaas file inside /WEB-INF/classes dir. 2) pass this as an java opt, in startweblogic.cmd

    set JAVA_OPTIONS=%JAVA_OPTIONS% -Djava.security.auth.login.config=\WEB-INF\classes\jaas.conf

    reboot the server and try to login.