The chapter provides information on how to customize Oracle Adaptive Access Manager by using the OAAM Extensions Shared Library.
It contains the following sections:
Shared libraries are collections of programming and data that can be used by multiple applications. They can permit applications to use memory efficiently by sharing common programming and resources. You can customize Oracle Adaptive Access Manager by adding custom jars and files to the OAAM Extensions Shared Library.
The OAAM Extensions Shared Library,
oracle.oaam.extensions.war, is located in
/oaam/oaam_extensions/generic. It is deployed in both the OAAM Server and OAAM Admin servers. By default
oracle.oaam.extensions.war contains the
MANIFEST.MF, which has the definition of the OAAM Extensions Shared Library.
Follow these steps to add customizations to Oracle Adaptive Access Manager:
Ensure the property
bharosa.uio.proxy.mode.flag is set as appropriate.
The default for the property
false. If you are using an UIO proxy deployment, the property should be set to
true. To configure custom branding for multitenancy with the OAAM Proxy, the property
bharosa.uio.proxy.mode.flag must be set to
Create a work folder called
The folder can be created anywhere as long as it is outside the installation folder.
Unzip the oracle.oaam.extensions.war into the work folder.
oaam_extensions folder, create the following subfolders:
META-INF folder, create a file named
MANIFEST.MF and ensure it contains the following lines:
Extension-Name: oracle.oaam.extensions Specification-Version:188.8.131.52.9 Implementation-Version:184.108.40.206.9
The specification version and implementation version must be more than the versions in the file currently. For example, if the implementation version in the file is 220.127.116.11.0, you could change it to 18.104.22.168.9. Errors are thrown if the verion is not incremented.
Compile custom java classes that extend or implement Oracle Adaptive Access Manager classes, adding the jars from the
$ORACLE_IDM_HOME\oaam\cli\lib folder to the build class path.
Add the custom JAR files to the
oaam_extensions\WEB-INF\lib folder. For example,
Add custom properties to a file named
bharosa_server.properties and save it in the
Information about enums are provided in Section 7.3, "User-Defined Enumerations."
Add custom JSPs to the
oracle.oaam.extensions.war from the parent folder of
oaam_extensions using the command:
jar -cvfm oracle.oaam.extensions.war oaam_extensions\META-INF\MANIFEST.MF -C oaam_extensions/ .
Stop all managed servers if they are running:
MW_HOME/user_projects/domains/domain_name/bin/stopManagedWeblogic.sh oaam_admin_server1 MW_HOME/user_projects/domains/domain_name/bin/stopManagedWeblogic.sh oaam_server_server1
Start the WebLogic Server where Oracle Adaptive Access Manager is deployed and log into the WebLogic Administration Console.
Deploy the new
oracle.oaam.extensions.war file as a shared library with
oaam_admin_server1 as target applications.
Navigate to Domain Environment > Deployments and lock the console.
Click the Install button.
Browse to the location of the
oracle.oaam.extensions.war file and select it by clicking the option next to the WAR file and clicking Next.
Ensure Install this deployment as a library is selected and click Next.
Select deployment targets,
Click Next again to accept the defaults in this next page and then click Finish.
Click the Save button and then Activate Changes.
Start the OAAM Admin and OAAM managed servers.
MW_HOME/user_projects/domains/domain_name/bin/startManagedWeblogic.sh oaam_admin_server1 MW_HOME/user_projects/domains/domain_name/bin/startManagedWeblogic.sh oaam_server_server1
Test the custom functionality and make sure files added to
oracle.oaam.extensions.war are used by Oracle Adaptive Access Manager applications.
To override any Oracle Adaptive Access Manager properties or extend Oracle Adaptive Access Manager, add those properties and enumerations to bharosa_server.properties and client_resource_<locale>.properties when appropriate.
User-defined enums are a collection of properties that represent a list of items. Each element in the list may contain several different attributes. The definition of a user-defined enum begins with a property ending in the keyword ".enum" and has a value describing the use of the user-defined enum. Each element definition then starts with the same property name as the enum, and adds on an element name and has a value of a unique integer as an ID. The attributes of the element follow the same pattern, beginning with the property name of the element, followed by the attribute name, with the appropriate value for that attribute.
The following is an example of an enum defining credentials displayed on the login screen of an OAAM Server implementation:
bharosa.uio.default.credentials.enum = Enum for Login Credentials bharosa.uio.default.credentials.enum.companyid=0 bharosa.uio.default.credentials.enum.companyid.name=CompanyID bharosa.uio.default.credentials.enum.companyid.description=Company ID bharosa.uio.default.credentials.enum.companyid.inputname=comapanyid bharosa.uio.default.credentials.enum.companyid.maxlength=24 bharosa.uio.default.credentials.enum.companyid.order=0 bharosa.uio.default.credentials.enum.username=1 bharosa.uio.default.credentials.enum.username.name=Username bharosa.uio.default.credentials.enum.username.description=Username bharosa.uio.default.credentials.enum.username.inputname=userid bharosa.uio.default.credentials.enum.username.maxlength=18 bharosa.uio.default.credentials.enum.username.order=1