Resolution: Description: ================== How to run ConfFileUserAuthLoginModule JAAS plugin sample?
Resolution: ================== ConfFileUserAuthLoginModule is an example of Java Authentication and Authorization Service (JAAS) module to provide authentication based on a file that complies with users.conf. This example module reloads the content of the file once the file changes. Therefore, administrative changes to users.conf will be noticed.
You can use similar way as FlatFileUserAuthLoginModule sample to configure ConfFileUserAuthLoginModule. However you need to pay attention to following items:
1). This sample depends on the package javax.mail (JavaMail API). The JavaMail API (mail.jar) is an optional package for Java SE and has to be downloaded separately. Java EE includes this package by default. (http://www.oracle.com/technetwork/java/javamail/index.html). You need to make sure this API can be found on the classpath. The jaas_classpath in EMS main conf file need to add mail.jar.
For example: jaas_classpath = ./SecurityPlugins.jar;./mail.jar
2). Sometimes, the user failed to authenticate for the first time however the user could login for the second time. This is due to the default jaas_login_timeout value is not long enough for users.conf being loaded when the first user tries to login. Increase the jaas_login_timeout value can solve this issue.
3). In JAAS conf file, you need to define following: Plugin class: com.tibco.example.ConfFileUserAuthLoginModule JAAS Config Options: debug=<true/false> filename="<location of an users.conf file>"
For example, a jaas.conf file looks like following: