5.7 Custom Geolocation Data Provider Integration

This section describes how to integrate the custom geolocation data provider. The API presented here allows you to integrate the custom geolocation data provider with risk-based authentication.

5.7.1 Prerequisites

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. 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;
}

You can create the Custom Provider class by implementing this interface. Override the 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 GeoLocBean readGeoLocInfo(InetAddress IPAddress)
throws GeoLocException;
  
    public AbstractProvider(Properties props){
    init(props);
   }
   }

You can create a custom provider class by extending the AbstractProvider class. 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 forthis 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 Deploying Your Custom Geolocation Provider Class

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

  2. Add jar files to the /opt/novell/nam/idp/webapps/rba-core/WEB-INF/lib directory by using Advanced File Configurator.

    For information about how to add a file, see Adding Configurations to a Cluster in the NetIQ Access Manager 5.0 Administration Guide.

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

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

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

    Java Class Path: The path name of your custom Geo Provider Java class.

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

    Property Name: The name of the parameter.

    Value: The value of the parameter.

  5. Click OK.

  6. Restart Identity Server.

  7. On the Identity Servers page, click Update.

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