4.5 Sample Codes

You can find the sample codes for the following extensions in novell-nacm3_2.tar.gz on the NetIQ Access Manager Developer Tools and Examples page.

For more information, see NetIQ Access Manager 3.2 - Sample Code.

4.5.1 Data Extension for External Attribute Source Policy

This example demonstrates how an External Attribute Source policy retrieves information from external sources. It provides details about:

  • How to configure and install the External Attribute Source Data policy extension in the Administration Console.

  • Implementation details of the extension factory and extension classes.

  • How to use the information retrieved from the External Attribute Source policies as shared secret. It also explains how to use that shared secret to configure other policies or use them in the Identity servers to retrieve attributes from external sources.

The policy extension example includes NameAttributeFromMailIDFactory.java and NameAttributeFromMailID.java.

4.5.2 Template Policy Extensions

This includes the following two types:

  • Template Condition Policy

  • Template Data Policy

Template Condition Policy

You can use this example as a template to implement a policy extension of type Condition that is com.novell.nxpe.NxpeCondition. This example provides a basic framework that can be used as a starting point for creating data policy (com.novell.nxpe.NxpeContextDataElement.) extensions. It provides details about:

  • How to configure and install a Condition policy extension in the Administration Console.

  • Implementation details of the extension factory and extension classes.

The policy extension example includes PolicyConditionExtnFactoryTemplate.java and PolicyConditionExtnTemplate.java.

Template Data Policy

You can use this example as a template to implement a policy extension of type Data that is com.novell.nxpe.NxpeContextDataElement. This example provides a basic framework that can be used as a starting point for creating such policy extensions. It provides details about:

  • How to configure and install the Data policy extension in the Administration Console.

  • Implementation details of the extension factory and extension classes.

The policy extension example includes PolicyDataExtnFactoryTemplate.java and PolicyDataExtnTemplate.java.

4.5.3 LDAP Group Data Element

This example illustrates how a policy extension can use external data sources to obtain information. This policy extension connects to the required LDAP repository, runs a search on it, and returns the results. An Identity Injection policy is created in this example that uses this policy extension.

The policy extension example includes LDAPGroupDataElement.java and LDAPGroupDataElementFactory.java.

4.5.4 PasswordClass

This authentication class extends the base class LocalAuthenticationClass and performs a form based authentication. The policy extension example includes passwordClass.java.

For more information, see Section 2.4, Understanding the Authentication Class Example and Section 2.6, Deploying Your Authentication Class.