すべてのレプリケーション操作が SSL 接続で行われるように、レプリケーションに関わる Directory Server を構成することができます。
次の手順に、2 つのマスターを持つレプリケーショントポロジでレプリケーションを設定するコマンド例を示します。
この例では、自己署名証明書を使用した簡単なレプリケーション設定を示しています。本稼働環境に SSL によるレプリケーションを設定する場合、証明機関によって信頼された証明書を使用する方がセキュリティーが向上します。
サプライヤサーバー証明書が、SSL ハンドシェイク時にクライアントとして機能できない SSL サーバー専用証明書である場合、SSL を経由するレプリケーションは失敗します。
レプリケーションが SSL によってセキュリティー保護されていても、レプリケーションマネージャーの認証はまだ簡単なバインドとパスワードを使用して行われます。クライアントベースの認証を使用して、レプリケーションのセキュリティーを完全に保護することができますが、これには、複雑な設定が必要です。
このタスクは DSCC を使用して実行することができます。詳細については、「Directory Service Control Center のインタフェース」および DSCC オンラインヘルプを参照してください。
新しいサーバーを作成し、それらを起動します。
$ dsadm create -p 1389 -P 1636 /local/ds1 $ dsadm create -p 2389 -P 2636 /local/ds2 $ dsadm start /local/ds1 $ dsadm start /local/ds2 |
すべてのサーバーで、空のサフィックスを作成します。
$ dsconf create-suffix -e -i -w password-file -p 1389 dc=example,dc=com $ dsconf create-suffix -e -i -w password-file -p 2389 dc=example,dc=com |
すべてのサーバーで、マルチマスターパスワードファイルを設定します。
$ dsconf set-server-prop -e -i -w password-file -h example1.server -p 1389 \ def-repl-manager-pwd-file:/local/ds1/replmanrpwd1.txt $ dsconf set-server-prop -e -i -w password-file -h example2.server -p 2389 \ def-repl-manager-pwd-file:/local/ds1/replmanrpwd2.txt |
すべてのサーバーで、レプリケーションを有効にします。
$ dsconf enable-repl -h example1.server -p 1389 -e -i -w password-file -d 1 master dc=example,dc=com $ dsconf enable-repl -h example2.server -p 2389 -e -i -w password-file -d 2 master dc=example,dc=com |
すべてのサーバーで、既存のデフォルトの証明書を表示します。
$ dsadm show-cert -F der -o certfile1 /local/ds1 defaultCert $ dsadm show-cert -F der -o certfile2 /local/ds2 defaultCert |
すべてのサーバーに、ほかのすべてのサーバーからの CA によって信頼された証明書を追加します。
$ dsadm add-cert --ca /local/ds1 "ds2 Repl Manager Cert" certfile2 $ dsadm add-cert --ca /local/ds2 "ds1 Repl Manager Cert" certfile1 |
すべてのマスターサーバーとハブ (ソース) サーバーで、すべてのコンシューマ (ターゲット) サーバーとのレプリケーションアグリーメントを作成します。
レプリケーションアグリーメントにはセキュリティー保護された LDAP ポートを使用します。
$ dsconf create-repl-agmt -h example1.server -p 1389 -e -i -w password-file\ --auth-protocol "ssl-simple" dc=example,dc=com example2.server:2636 $ dsconf create-repl-agmt -h example2.server -p 2389 -e -i -w password-file\ --auth-protocol "ssl-simple" dc=example,dc=com example1.server:1636 |
すべてのレプリケーションアグリーメントで、認証パスワードファイルを、レプリケーションアグリーメント内のコンシューマ (ターゲット) サーバーのレプリケーションマネージャーパスワードファイルとして設定します。
$ dsconf set-repl-agmt-prop -h example1.server -p 1389 -e -i -w password-file\ dc=example,dc=com example2.server:2636 auth-pwd-file:/local/ds1/replmanrpwd2.txt $ dsconf set-repl-agmt-prop -h example2.server -p 2389 -e -i -w password-file\ dc=example,dc=com example1.server:1636 auth-pwd-file:/local/ds1/replmanrpwd1.txt |
サフィックスの初期化が完了すると、サプライヤはすべてのレプリケーション更新メッセージを SSL 経由でコンシューマに送信します。証明書を使用するオプションを選んだ場合は、証明書が利用されます。SSL のアグリーメント設定を使用して DSCC からカスタマーの初期化を行う場合も、セキュリティー保護された接続が使われます。
すべてのサーバーで、設定の変更を反映するため、サーバーを再起動します。
$ dsadm restart /local/ds1 $ dsadm restart /local/ds2 |
いずれかのマスターサーバーで、サフィックスを初期化します。
$ dsconf import -h example1.server -p 1389 -e -i \ -w password-file /tmp/Example.ldif dc=example,dc=com |
まだ初期化されていないすべてのサーバーで、レプリケーションアグリーメントを使用して、サーバーを初期化します。
$ dsconf init-repl-dest -e -i -w password-file \ -h example1.server -p 1389 dc=example,dc=com example1.server:2636 |