Intellicus Enterprise Reporting and Business Insights 19.0

Callback Authentication

0 views June 28, 2020 0

Intellicus allows its customers to apply user authentication check.

Configuring Authentication Check

System Administrator configures Intellicus Call Back Authentication check.  Customer system administrator configures the Intellicus call back authentication mechanism. For configuration the administrator will go to organization screen where he/she selects the option for call back authentication check.

Callback Authentication Check
Figure 4: Callback Authentication Check

Customer administrator selects the option of Call Back Mechanism for Authentication check.

Using call back authentication check requires administrator to provide the following:

  1. Filtering mode among Local, Socket or RMI
  2. Implementer class name which is a Java, C, or COM Class.

Callback Authentication Check

Your Code implements Intellicus Call back authentication interface.

If Intellicus authentication checks is not what customer wants, Intellicus also supports call back authentication check where Intellicus calls customer’s code to apply the authentication check.

For Intellicus to call customers code customer will have to provide the implementation of the call back interface exposed by Intellicus.

Intellicus supports call back using various technologies:

Local Java

  • Implementer: Java Class
  • Call Type: In Memory

You provide Java implementation of Intellicus authentication call back interface and Intellicus calls it at runtime. The custom code library must be placed in Intellicus Report Server class path before starting the server.

Local COM

  • Implementer: COM Dll written in VB, VC++
  • Call Type: JNI COM call to Dll.

You provide a COM DLL implementation of the Intellicus authentication call back COM interface.  The report Server should be running on a Windows Platform.

Remote Call back

  • Implementer: COM Dll written in VB, VC++
  • Call Type: TCP Call to DLL Invoker and JNI Call

You provide a COM DLL implementation of the Intellicus authentication Call back interface. The report Server is running on non Windows Platform, thus can not support COM.

For the implementation of the interface Customer gets the interface from Intellicus.

Interface Details

For Java call back activities Intellicus provides the interface in the form of a jar file, iCallback.jar.

The Jar contains the interface exposed by Intellicus, IAuthenticate.

Customer would implement the methods of the interface and provide the implementation class, normally, in the form of a jar file. The jar would be deployed in the Intellicus Report Server class path for Report Server to make the calls.

Equally, Intellicus provides IntellicusContext.dll for COM DLL implementation. The implementer COM DLL should be appropriately registered with the windows registry.

Sample Implementation Code

Steps:

  1. Impletment the interface IAuthenticate.

    public class AuthCallbackImpl implements IAuthenticate

  1. Initialize the class instance using initGlobal().

    public void initGlobal() throws Exception
    public boolean authenticate() throws Exception
    {	
    	System.out.println("calling authenticate() method");	
    
    	//This is the JDBC url to connect to host application database.	String url = "jdbc:oracle:thin:@192.168.100.22:1521:test";
    		
    	try{ 
      	//configuring the database.		
    		Connection = DriverManager.getConnection( url, "scott", "tiger");
    		if(connection==null){
    			System.out.println("failed to connect to database");
    		}
    		else{
    			ResultSet rs = null;  
    			String passwordFromDB=null;	
    			Statement stmt = connection.createStatement();
    			//The EMP_ID is set through the portal the userId that is to be taken from the database.
    			rs = stmt.executeQuery("select EMP_ID,PASSWD from 				EMP where EMP_ID ='"+this.userID+"'");
    			//The result set has the field PASSWD to be used as 			//password,that is matched after then only user will
    			//be authenticated.
    			while(rs.next()){
    				//The password is also matched with the data 				//present in the database.The password
    				//is also provided through the portal.
    				passwordFromDB=rs.getString("PASSWD");
    														System.out.println("Password:*"+passwdEnteredByUser+"*");
    		System.out.println("password from 										database:*"+passwordFromDB+"*");
    		if(passwordFromDB.equals(passwdEnteredByUser))
    		{
    		   System.out.println("user AUTHENTICATED");
    		   return true;
    		}
    	}
    }
    }catch( Exception e )
    {
    	System.out.println ("message:"+e.getMessage());
    	e.printStackTrace();
    }
    return false;
    }
    

 
Call Sequence
Below are the methods of the call back filtering interface and the sequence in which they should be called.

Please refer to related Java doc for exact signature of the interface methods.

1) initGlobal()

Set the credentials and other information (helps custom class to initiate config files and database connections etc.).

 

2) authenticate()

Authentication implementation will be in this method.

 

3) setOrgID(String orgID)

A series of setters are called for setting the context and credentials of the reporting user. Reporting user’s Intellicus OrgiD.

 

4) setUserID(String userID)

Reporting user’s Intellicus UserID.

 

5) setPassword(String passwd)

Reporting user’s Intellicus Password.

 

6) setSessionID( String sessionID)

Reporting user’s Intellicus sessionID.

 

7) setSD(String sd)

Reporting user’s SecurityDescriptor. (Custom tag)

 

8) setCustomerID(String customerID)

Reporting user’s Customer ID. (Custom tag)

 

9) setLocation(String location)

Reporting user’s Location ID. (Custom tag)

 

10) setLocale(String locale)

Reporting user’s Locale. (Custom tag)

 

11) setTimestamp(String timestamp)

Reporting request Time stamp (Custom tag)

 

12) setDBName(String dbName)

Get the filtered sql if filter type is SQL.

Note: Please refer sample code available at

<Intellicus_Install_Path>SampleCodesCallBack APIsCallBack Authentication