5 OAM構成プロパティの変更

OAM構成を変更するには、oam-config.xmlファイルを変更するか、OAM REST APIを使用してOAM構成プロパティを変更します。

5.1 OAM構成ファイルのエクスポートおよびインポート

oam-config.xmlファイルを変更するには、データベースからファイルをエクスポートし、更新してからデータベースにインポートします。

UNIX/Linux環境でoam-config.xmlファイルを更新するには:
  1. Oracle Access Managerの次の環境変数を設定します:
    • ORACLE_HOME
    • DOMAIN_HOME
    • JAVA_HOME
    • DB_ORACLE_HOME
  2. prop.propertiesファイルを作成します。
    prop.propertiesファイルの例を次に示します。
    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. 次のコマンドを実行して、DOMAIN_HOME/config/fmwconfig/ディレクトリにあるoam-config.xmlを一時的な場所(tmp)にエクスポートします:
    java -cp config-utility.jar:ojdbc8.jar oracle.security.am.migrate.main.ConfigCommand <path to which configuration must be exported> export <prop.properties>

    たとえば:

    $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. tempフォルダ内のoam-config.xmlファイルをテキスト・エディタで開き、必要な属性を更新します。
  5. 次のコマンドを実行して、oam-config.xmlをデータベースにインポートします:
    java -cp config-utility.jar:ojdbc8.jar oracle.security.am.migrate.main.ConfigCommand <path to which configuration must be exported> import <prop.properties>

    たとえば:

    $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

    Windows環境でoam-config.xmlファイルを更新するには:

    1. <OS_DRIVE>\Users\<USERNAME>\<Documents>に移動します

      ここで、<USERNAME>はログイン・ユーザーのユーザー名です。

    2. 次のエントリでprop.propertiesファイルを作成します:
      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. config-utility.jarおよびojdbc8.jarを<OS_DRIVE>\Users\<USERNAME>\Documents>にコピーします。
    4. JAVA_HOME=<1.8.0_131_JDK_OR_HIGHER>を設定します
    5. コマンド・プロンプトを開き、示されているとおりに移動します:
      cd <OS_DRIVE>\Users\<USERNAME>\Documents>
    6. エクスポートおよびインポートのための次のコマンドを実行します:

      エクスポートの場合:

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

      インポートの場合:

      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 OAM REST APIを使用したOAM構成パラメータの変更

OAM REST APIを使用してOAM構成パラメータを変更するには:

  1. oamconfig_modify.xmlファイルを編集し、OAMパラメータを変更します。出力例は次のようになります。

    <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. 次のcURLコマンドを実行します:

    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