5 Modifying OAM Configuration Properties

You can change OAM configuration by modifying the oam-config.xml file or by modifying OAM configuration properties using OAM REST API.

5.1 Exporting and Importing the OAM Configuration File

To modify the oam-config.xml file, export the file from the database, update it, and then import it back to the database.

To update the oam-config.xml file in UNIX/Linux environment:
  1. Set the following environment variables for Oracle Access Manager:
    • ORACLE_HOME
    • DOMAIN_HOME
    • JAVA_HOME
    • DB_ORACLE_HOME
  2. Create the prop.properties file.
    The following shows an example of the prop.properties file.
    oam.entityStore.ConnectString=jdbc:oracle:thin:@dbhost.example.com:1521/servicename.example.com
    oam.entityStore.schemaUser=MYPREFIX_OAM
    oam.entityStore.schemaPassword=xxxxx
    oam.importExportDirPath=/tmp
    oam.frontending=params=oamhost.example.com;14100;http
  3. Export oam-config.xml located in the DOMAIN_HOME/config/fmwconfig/ directory into temporary location (tmp) by running the following command:
    java -cp config-utility.jar:ojdbc8.jar oracle.security.am.migrate.main.ConfigCommand <path to which configuration must be exported> export <prop.properties>

    For example:

    $JAVA_HOME/bin/java -cp $ORACLE_HOME/idm/oam/server/tools/config-utility/config-utility.jar:$DB_ORACLE_HOME/jdbc/lib/ojdbc8.jar oracle.security.am.migrate.main.ConfigCommand $DOMAIN_HOME export /tmp/prop.properties
  4. Open the oam-config.xml file under temp folder in a text editor and update the required attribute.
  5. Import oam-config.xml into the database by running the following command:
    java -cp config-utility.jar:ojdbc8.jar oracle.security.am.migrate.main.ConfigCommand <path to which configuration must be exported> import <prop.properties>

    For example:

    $JAVA_HOME/bin/java -cp $ORACLE_HOME/idm/oam/server/tools/config-utility/config-utility.jar:$DB_ORACLE_HOME/jdbc/lib/ojdbc8.jar oracle.security.am.migrate.main.ConfigCommand $DOMAIN_HOME import /tmp/prop.properties

    To update the oam-config.xml file in Windows environment:

    1. Navigate to <OS_DRIVE>\Users\<USERNAME>\<Documents>

      Here, <USERNAME> is the username of the logged-in user.

    2. Create the prop.properties file with the following entries:
      oam.entityStore.ConnectString=jdbc:oracle:thin:@<DB_HOSTNAME>:<DB_PORT></SERVICE_NAME>
      oam.entityStore.schemaUser=<OAM_SCHEMA_NAME>
      oam.entityStore.schemaPassword=<OAM_SCHEMA_PASSWORD>
      oam.importExportDirPath=<DIRECTORY_PATH>
      oam.frontending=params=WebLogicHost:OAMManagedServerPort:http(s)
    3. Copy config-utility.jar and ojdbc8.jar to <OS_DRIVE>\Users\<USERNAME>\Documents>.
    4. Set JAVA_HOME=<1.8.0_131_JDK_OR_HIGHER>
    5. Open the command prompt and navigate as shown:
      cd <OS_DRIVE>\Users\<USERNAME>\Documents>
    6. Run the following commands for export and import:

      For export:

      java -cp ".;config-utility.jar;ojdbc8.jar" oracle.security.am.migrate.main.ConfigCommand\<MIDDLEWARE_HOME>\user_projects\domains\<OAM_DOMAIN> export prop.properties

      For import:

      java -cp ".;config-utility.jar;ojdbc8.jar" oracle.security.am.migrate.main.ConfigCommand\<MIDDLEWARE_HOME>\user_projects\domains\<OAM_DOMAIN> import prop.properties

5.2 Modifying OAM Configuration Parameters Using OAM REST API

To modify OAM configuration parameters by using OAM REST API:

  1. Edit the oamconfig_modify.xml file, change the OAM parameters. The following is a sample:

    <Configuration>
    <Setting Name="host" Type="xsd:string" Path="/DeployedComponent/Server/NGAMServer/Instance/oam_server1/host">@OAM_SERVER@1</Setting>
    <Setting Name="host" Type="xsd:string" Path="/DeployedComponent/Server/NGAMServer/Instance/oam_server2/host">@OAM_SERVER@2</Setting>
    <Setting Name="Port" Type="xsd:integer" Path="/DeployedComponent/Server/NGAMServer/Instance/oam_server1/oamproxy/Port">@OAP_PORT@</Setting>
    <Setting Name="Port" Type="xsd:integer" Path="/DeployedComponent/Server/NGAMServer/Instance/oam_server2/oamproxy/Port">@OAP_PORT@</Setting>
    <Setting Name="serverhost" Type="xsd:string" Path="/DeployedComponent/Server/NGAMServer/Profile/OAMServerProfile/OAMSERVER/serverhost">@LBR_HOST@</Setting>
    <Setting Name="serverport" Type="xsd:string" Path="/DeployedComponent/Server/NGAMServer/Profile/OAMServerProfile/OAMSERVER/serverport">@LBR_PORT@</Setting>
    <Setting Name="serverprotocol" Type="xsd:string" Path="/DeployedComponent/Server/NGAMServer/Profile/OAMServerProfile/OAMSERVER/serverprotocol">@LBR_PROTOCOL@</Setting>
    <Setting Name="serverhost" Type="xsd:string" Path="/DeployedComponent/Server/NGAMServer/Profile/OAMServerProfile/OAMServerBackChannel/serverhost">@LBR_HOST@</Setting>
    <Setting Name="serverport" Type="xsd:string" Path="/DeployedComponent/Server/NGAMServer/Profile/OAMServerProfile/OAMServerBackChannel/serverport">@LBR_PORT@</Setting>
    <Setting Name="serverprotocol" Type="xsd:string" Path="/DeployedComponent/Server/NGAMServer/Profile/OAMServerProfile/OAMServerBackChannel/serverprotocol">@LBR_PROTOCOL@</Setting>
    <Setting Name="OAMRestEndPointHostName" Type="xsd:string" Path="/DeployedComponent/Agent/WebGate/Instance/accessgate-oic/UserDefinedParameters/OAMRestEndPointHostName">@LBR_HOST@</Setting>
    <Setting Name="OAMRestEndPointPort" Type="xsd:string" Path="/DeployedComponent/Agent/WebGate/Instance/accessgate-oic/UserDefinedParameters/OAMRestEndPointPort">@LBR_PORT@</Setting>
    <Setting Name="providerid" Type="xsd:string" Path="/DeployedComponent/Server/NGAMServer/Profile/STS/fedserverconfig/providerid">@LBR_PROTOCOL@://@LBR_HOST@:@LBR_PORT@/oam/fed</Setting>
    <Setting Name="Value" Type="xsd:string" Path="/DeployedComponent/Server/NGAMServer/Instance/oam_server1/CoherenceConfiguration/LocalHost/Value">@OAM_SERVER@1</Setting>
    <Setting Name="Value" Type="xsd:string" Path="/DeployedComponent/Server/NGAMServer/Instance/oam_server2/CoherenceConfiguration/LocalHost/Value">@OAM_SERVER@2</Setting>
    <Setting Name="assertionissuer" Type="xsd:string" Path="/DeployedComponent/Server/NGAMServer/Profile/STS/issuancetemplates/saml11-issuance-template/assertionissuer">@LBR_HOST@</Setting>
    <Setting Name="assertionissuer" Type="xsd:string" Path="/DeployedComponent/Server/NGAMServer/Profile/STS/issuancetemplates/saml20-issuance-template/assertionissuer">@LBR_HOST@</Setting>
    <Setting Name="openid20realm" Type="xsd:string" Path="/DeployedComponent/Server/NGAMServer/Profile/STS/spglobal/openid20realm">@LBR_PROTOCOL@://@LBR_HOST@:@LBR_PORT@</Setting>
    <Setting Name="logoutRedirectUrl" Type="xsd:string" Path="/DeployedComponent/Agent/WebGate/Instance/accessgate-oic/logoutRedirectUrl">@LBR_PROTOCOL@://@LBR_HOST@:@LBR_PORT@/oam/server/logout</Setting>
    <Setting Name="security" Type="xsd:string" Path="/DeployedComponent/Agent/WebGate/Instance/accessgate-oic/security">simple</Setting>
    <Setting Name="security" Type="xsd:string" Path="/DeployedComponent/Agent/WebGate/Instance/IAMSuiteAgent/security">simple</Setting>
    <Setting Name="logoutRedirectUrl" Type="xsd:string" Path="/DeployedComponent/Agent/WebGate/Instance/IAMSuiteAgent/UserDefinedParameters/logoutRedirectUrl">@LBR_PROTOCOL@://@LBR_HOST@:@LBR_PORT@/oam/server/logout</Setting>
    <Setting Name="Timeout" Type="htf:timeInterval" Path="/DeployedComponent/Server/NGAMServer/Profile/Sme/SessionConfigurations/Timeout">15 M</Setting>
    
    <Setting Name="PrimaryServerList" Type="htf:list" Path="/DeployedComponent/Agent/WebGate/Instance/IAMSuiteAgent/PrimaryServerList">
    <Setting Name="0" Type="htf:map" Path="/DeployedComponent/Agent/WebGate/Instance/IAMSuiteAgent/PrimaryServerList/0">
    <Setting Name="host" Type="xsd:string" Path="/DeployedComponent/Agent/WebGate/Instance/accessgate-oic/PrimaryServerList/0/host">@OAP_HOST@</Setting>
    <Setting Name="port" Type="xsd:string" Path="/DeployedComponent/Agent/WebGate/Instance/accessgate-oic/PrimaryServerList/0/port">@OAP_SERVICEPORT@</Setting>
    <Setting Name="numOfConnections" Type="xsd:string" Path="/DeployedComponent/Agent/WebGate/Instance/accessgate-oic/PrimaryServerList/0/numOfConnections">20</Setting>
    </Setting>
    </Setting>
    
    <Setting Name="PrimaryServerList" Type="htf:list" Path="/DeployedComponent/Agent/WebGate/Instance/accessgate-oic/PrimaryServerList">
    <Setting Name="0" Type="htf:map" Path="/DeployedComponent/Agent/WebGate/Instance/accessgate-oic/PrimaryServerList/0">
    <Setting Name="port" Type="xsd:string" Path="/DeployedComponent/Agent/WebGate/Instance/accessgate-oic/PrimaryServerList/0/port">@OAP_SERVICEPORT@</Setting>
    <Setting Name="numOfConnections" Type="xsd:string" Path="/DeployedComponent/Agent/WebGate/Instance/accessgate-oic/PrimaryServerList/0/numOfConnections">20</Setting>
    <Setting Name="host" Type="xsd:string" Path="/DeployedComponent/Agent/WebGate/Instance/accessgate-oic/PrimaryServerList/0/host">@OAP_HOST@</Setting>
    </Setting>
    </Setting>
    </Configuration>
  2. Run the following cURL command:

    curl -x '' -X PUT $ADMIN_PROTOCOL://$ADMIN_HOST:$ADMIN_PORT/iam/admin/config/api/v1/config -ikL -H 'Content-Type: application/xml' --user $user -H 'cache-control: no-cache' -d @$cur_dir/output/oamconfig_modify.xml