5.7 Custom Geolocation Data Provider Integration

This section documents describes how to integrate the custom geolocation data provider. The API presented here allows developers to integrate the custom geolocation data provider within RISK based authentication of the Access Manager architecture. The following topics are covered:

5.7.1 Prerequisites

  • Access Manager latest version

  • Your development environment requires the same installation as outlined in the NetIQ Access Manager 4.5 Installation and Upgrade Guide.

  • Copy the nidp.jar, NAMCommon.jar and risk-*.jar and third party Geo Location data provider jar files in the following directory of your Identity Server to your development project:

    • On Linux: /opt/novell/nam/idp/webapps/nidp/WEB-INF/lib

    • On Windows: C:\Program Files (x86)\Novell\Tomcat\webapps\nidp\WEB-INF\lib

5.7.2 Understanding the Geo Location Provider interface

Method

Description

init()

Takes Properties as its arguments. This properties object contains the parameters which are passed through the Admin Console for this Custom class. The method used to initialize the Geo Location Provider Class.

readGeoLocInfo()

Takes InetAddress as its arguments. It returns the Geo Location information as Geolocation Bean.

5.7.3 Creating a Custom Geolocation Provider Class

You can create the custom geolocation provider class as follows:

Implementing Provider Interface

import com.novell.nam.nidp.risk.core.geoloc.Provider;
public interface Provider {
  public void init(Properties props);
  		public GeoLocBean readGeoLocInfo(InetAddress IPAddress) throws GeoLocException;
}

We can create the Custom Provider class by implements the above interface. We should override the above init() and readGeoLocInfo() methods.

Extending Abstract Provider Class

import com.novell.nam.nidp.risk.core.geoloc.AbstractProvider;
public abstract class AbstractProvider implements Provider {
  abstract public void init(Properties props);
  abstract public GeoLocBean readGeoLocInfo(InetAddress IPAddress)
throws GeoLocException;
  
		public AbstractProvider(Properties props){
		init(props);
   }
   }

We can create the Custom Provider class by extending the above AbstractProvider class. We should override the above init() and readGeoLocInfo() abstract methods.

5.7.4 Custom Geolocation Provider Class Example

import com.novell.nam.nidp.risk.core.geoloc.AbstractProvider;
import com.novell.nam.nidp.risk.core.geoloc.exception.GeoLocException;
import com.novell.nam.nidp.risk.core.geoloc.model.GeoLocBean;

public class MyCustomGeoProvider extends AbstractProvider {
  public MyCustomGeoProvider (Properties props) {
  super(props);
  }
// The argument 'props' contains
the configuration parameters which are provided in the admin console for
this custom class.
	@Override
  public void init(Properties props) {
  }
// This method should return the geo location
information
@Override
public GeoLocBean readGeoLocInfo(InetAddress IPAddress)
throws GeoLocException                          {
// read the geolocation information from any external provider using web service calls or any sources
    return null;
	}
}

5.7.5 5.7.5 Deploying Your Custom Geolocation Provider Class

  1. Create a jar file for your custom geolocation provider class and any associated classes.

  2. Copy the jar files to the following location in Identity Server:

    Linux: /opt/novell/nam/idp/webapps/nidp/WEB-INF/lib

    Windows: C:\Program Files (x86)\Novell\Tomcat\webapps\nidp\WEB-INF\lib

    If Identity Server is in a cluster, the file needs to be copied to all members of the cluster.

  3. In Administration Console, click Access Manager > policies> Risk Configuration > > Geolocation.

  4. Select Custom Provider from the list and specify the following details:

    Provider Name: Specify a name that Administration Console can use to identity this custom provider.

    Java Class Path: This allows you to specify the path name of your custom Geo Provider Java class.

    Class Property: Specify the parameters and values which will be passed to the custom class at runtime.

    Property Name: Name of the parameter.

    Value: Value of the parameter.

  5. Click OK.

  6. Restart Identity Server.

  7. On Identity Servers page, click Update.

  8. Update any associated devices that are using this Identity Server configuration.

Figure 5-3 Specify Geolocation Rule Name