Creating a custom security adapter class
Extend the iPortal Security Adapter class to customize authentication. The iPortal Security Extension requires access to the following libraries:
iPortalSecurityAdapter provides a set of empty methods. Extend this class and override any of the methods to provide custom IPSE authentication. To establish a secure session with iHub Information Console client using a custom security adapter, the following methods are required:
*A constructor
*authenticate( )
*getPassword( )
*getUserName( )
*getVolumeProfile( )
The login module of Visualization Platform calls methods in the custom security class to perform authentication and to retrieve login credentials to pass to iHub. The authenticate( ) method returns a boolean value to indicate whether the login credentials provided are acceptable. The getter methods return the credentials that iHub requires. Each user name and password must correspond to an authentic user account on the volume configured by the volume profile. In order to be able to log in correctly, the volumeProfile property must be set in the IPSE class to a valid volume profile entry, for example Default Volume. For example, to support a URL that authenticates using a single parameter, code, override authenticate( ) to retrieve the parameter from the HttpServletRequest and set the user name, password, and volumeProfile as in the following class:
import javax.servlet.http.*;
public class SecurityCode extends {
private String volumeProfile = "CustomAccess";
private String userName = null;
private String password = null;
public SecurityCode( ) {}
public boolean authenticate(
HttpServletRequest httpservletrequest) {
String param = httpservletrequest.getParameter("code");
boolean secured = true;
if ("12345".equalsIgnoreCase( param )) {
userName = "user1";
password = "user1";
else if ("abc".equalsIgnoreCase( param )) {
userName = "BasicUser";
password = "";
else {
secured = false;
return secured;
public String getUserName() { return userName; }
public String getPassword() { return password; }
public String getVolumeProfile() { return volumeProfile; }
If there is a user "user1" with the password "user1" on the volume configured by the volume profile "CustomAccess," a valid URL that authenticates user1 using this security adapter is as follows:
Deploying a custom security adapter
To deploy a custom security adapter, the iHub Information Console client application must have access to the class compressed into a JAR file. To meet this requirement, compile the class, compress it into a JAR, and move it into the <context root>\WEB-INF\lib directory for your iHub Information Console client application. Then, add the name of the class as the value for the SECURITY_ADAPTER_CLASS parameter in <context root>\WEB-INF
\web.xml. Finally, restart the application service running iHub Information Console client to activate this change.
How to deploy a custom security adapter to iHub Information Console client
1 Compile the IPSE application. Use a command similar to this one in a console window:
2 Create a JAR file to contain the IPSE application. Use a command similar to this one in a console window:
jar cvf SecurityCode.jar SecurityCode.class
3 Using Windows Explorer, copy SecurityCode.jar to this directory:
<your application context root>\WEB-INF\lib
4 Using a UTF-8 compliant code editor, open the following file:
<your application context root>\WEB-INF\web.xml
5 Navigate to the parameter name SECURITY_ADAPTER_CLASS.
6 Change the param-value parameter of the SECURITY_ADAPTER_CLASS to the fully qualified class name for the security adapter class. Use an entry similar to this one:
7 Save and close web.xml.
8 Restart the application server running iHub Information Console client. For the default installation, restart the Actuate Apache Tomcat for Visualization Platform Service.