プライマリ・コンテンツに移動
Oracle® Fusion Middleware Oracle Access Management管理者ガイド
11g リリース2 (11.1.2.3) for All Platforms
E61950-08
目次へ移動
目次

前
次

20.3 自動ポリシー同期の有効化

サーバー間の自動データ同期に対応した自動ポリシー同期(APS)機能の有効化には、RESTサービスをテストするためのコマンドおよび同期へのカスタム変換ルールの追加に関する詳細が含まれます。

APSおよび変換ルールの詳細は、「マルチデータ・センターのデータの同期」を参照してください。

  1. すべての管理サーバーおよび管理対象サーバーを停止します。
  2. データ・センター1のノード1およびデータ・センター2のノード1の両方の$WL_DOMAIN_HOME/bin/setDomainEnv.shに次の行を追加して、ファイルを保存します。

    EXTRA_JAVA_PROPERTIES=" -Doracle.oam.EnableMDCReplication=true -DCONFIG_DS=jdbc/oamds …

  3. 管理サーバーのみを起動します。
  4. 次のコマンドを使用して、RESTサービスをテストします。

    curl -u weblogic 'http://oam1-dc1.customerpoc.com:7001/oam/services/rest/_replication/hello'

    RESPONSE: {"ok":"true"}

    curl -u weblogic 'http://oam1-dc2.poc.com:7001/oam/services/rest/_replication/hello'

    RESPONSE: {"ok":"true"}

    curl -u weblogic:Oracle123 -H 'Content-Type: application/json' -X POST 'http://oam1-dc1.poc.com:7001/oam/services/rest/_replication/setup' -d '{"name":"DC1toDC2", "source":"FINALDC1","target":"FINALDC2","documentType":"ENTITY"}'

    RESPONSE: {"enabled":"true","identifier":"201409040157218184","ok":"true","pollInterval":"900","startingSequenceNumber":"101","state":"READY"}

    #ランダムのlong数値は、すべてのレプリケーション承諾で一意になるため、次の3番目のcurlコマンドからの出力として提供される数値を使用しますが、その数値をそのまま使用しないでください。

    curl -u weblogic:Oracle123 -H 'Content-Type: application/json' 'http://oam1-dc1.poc.com:7001/oam/services/rest/_replication/201409040157218184'

    RESPONSE: {"enabled":"true","identifier":"201409040157218184","ok":"true","pollInterval":"3600","startingSequenceNumber":"101","state":"ACTIVE"}

    curl -u weblogic:Oracle123 -H 'Content-Type: application/json' 'http://oam1-dc1.poc.com:7001/oam/services/rest/_replication/201409040157218184?type=consumer'

    RESPONSE: {"enabled":"true","identifier":"201409040157218184","ok":"true","pollInterval":"900","startingSequenceNumber":"101","state":"READY"}

    curl -u weblogic:Oracle123 -H 'Content-Type: application/json' -X PUT 'http://oam1-dc1.poc.com:7001/oam/services/rest/_replication/201409040157218184' -d '{"pollInterval":"60","replicaType":"consumer"}'

    RESPONSE: {"enabled":"true","identifier":"201409040157218184","ok":"true","pollInterval":"3600","startingSequenceNumber":"101","state":"ACTIVE"}

    #Run this command on NODE1DC2 ONLY IF you want to disable Policy Writes to DC2 (or Clones) and just accept policy writes via the Master Policy Server using APS Synch: setMultiDataCenterWrite(WriteEnabledFlag="false")

  5. viを使用して、変換ルール・ファイルを$T2P_HOME/transformationrules.xmlとして作成します。

    transformationrules.xmlには、次の内容を含める必要があります。

    <?xml version="1.0" encoding="UTF-8"?><mdc-transform-rule>    <changes-to-include entity-path="/DeployedComponent/Agent/WebGate/Instance">        <replace attribute-match="/IAMSuiteAgent/PrimaryServerList/*/host" value-match="(.*)">            <replace-with n="1">${DeployedComponent/Server/NGAMServer/Profile/OAMServerProfile/OAMSERVER/serverhost}</replace-with>        </replace>    </changes-to-include>    <changes-to-include entity-path="/DeployedComponent/Server/NGAMServer/Profile/AuthenticationModules"/></mdc-transform-rule>
    
  6. データ・センター2のノード1の$WL_DOMAIN_HOME/bin/setDomainEnv.shのみに次の行を追加して、ファイルを保存します。

    EXTRA_JAVA_PROPERTIES=" -Doracle.oam.MDCRuleFile=/u01/bits/customer/MDC/transformationrules.xml -Doracle.oam.EnableMDCReplication=true -DCONFIG_DS=jdbc/oamds …

  7. 管理サーバーおよび管理対象サーバーを開始します。

これにより、T2Pデータ・レプリケーションおよびAPS構成でマルチデータ・センターの設定が完了します。データ・センター1でエージェントおよびポリシーを作成し、データ・センター2に自動移行するのを確認することで、APS機能をテストできます。