Example 2: User Management in an Oracle Internet Directory Store

25-30 Oracle Fusion Middleware Application Security Guide Additional requirements and notes for each class are provided below.

25.10.3.2 oracle.security.idm.spi.AbstractIdentityStoreFactory

The class extending this SPI class must have following constructors: 1. The default constructor one which has no arguments. 2. A constructor that accepts a java.util.Hashtable object as an argument. You can use the hash table to accept any configuration properties required by the provider. The configuration properties are passed to this constructor during the user and role configuration phase. The properties are key-value pairs passed in the Hashtable argument: ■ The key must be java.lang.String. ■ The value can be java.lang.Object. It is recommended that the value be of type String. This guarantees that the property can be specified in jps-config.xml, which is a text file.

25.10.3.3 oracle.security.idm.spi.AbstractIdentityStore

The User and Role SPI Reference provides details about the methods that need to be implemented in this class. Note that: ■ Method getStoreConfiguration is optional and can throw OperationNotSupportedException. ■ Method getSubjectParser can return null. When there are no search results to be returned, all search APIs should throw: oracle.security.idm.ObjectNotFoundException Table 25–5 SPI Classes to Extend for Custom Provider Class Usage Notes oracle.security.idm.spi.AbstractIdentityStoreFactory The extending class must include a default constructor and a constructor accepting a java.util.Hashtable object. oracle.security.idm.spi.AbstractIdentityStore oracle.security.idm.spi.AbstractRoleManager oracle.security.idm.spi.AbstractUserManager oracle.security.idm.spi.AbstractRoleProfile oracle.security.idm.spi.AbstractUserProfile oracle.security.idm.spi.AbstractSimpleSearchFilter The constructor of the extending class must call the constructor of the abstract super class. oracle.security.idm.spi.AbstractComplexSearchFilter The constructor of the extending class must call the constructor of the abstract super class. oracle.security.idm.spi.AbstractSearchResponse See Also: The User and Role SPI Reference for details about the methods that need to be implemented in this class. All listed methods must be implemented. Developing with the User and Role API 25-31 Never return an empty SearchResponse.

25.10.3.4 oracle.security.idm.spi.AbstractRoleManager

The User and Role SPI Reference provides details about the methods that need to be implemented in this class. Note that only the following methods need concreteactual implementations: ■ getGrantedRoles ■ getOwnedRoles ■ getManagedRoles ■ isGranted ■ isManagedBy ■ isOwnedBy ■ isDropRoleSupported – should always return false ■ isCreateRoleSupported – should always return false ■ isModifyRoleSupported – should always return false The remaining methods must throw the following in their respective implementations: oracle.security.idm.OperationNotSupportedException

25.10.3.5 oracle.security.idm.spi.AbstractUserManager

The User and Role SPI Reference provides details about the methods that need to be implemented in this class. Only the following methods need concreteactual implementations: ■ authenticateUserUser, char[] ■ authenticateUserString, char[] ■ isDropUserSupported – should always return false ■ isCreateUserSupported – should always return false ■ isModifyUserSupported – should always return false The remaining methods must throw the following in their respective implementations: oracle.security.idm.OperationNotSupportedException

25.10.3.6 oracle.security.idm.spi.AbstractRoleProfile

oracle.security.idm.spi.AbstractRoleProfile is an abstract class that can be used to return a detailed role profile. The User and Role SPI Reference provides details about the methods that need to be implemented in this class. Only the following methods need concreteactual implementations: ■ getDisplayName ■ getGUID ■ getName