Solaris Trusted Extensions インストールと構成 (Solaris 10 11/06 および Solaris 10 8/07 リリース版)

Trusted Extensions システムでの Sun Java System Directory Server の構成

LDAP ネームサービスは、Trusted Extensions の対応ネームサービスです。サイトで LDAP ネームサービスがまだ実行されていない場合、Trusted Extensions が構成されているシステムで Sun Java System Directory Server (Directory Server) を構成します。サイトですでに Directory Server が実行されている場合、Trusted Extensions データベースをサーバーに追加する必要があります。Directory Server にアクセスするために、Trusted Extensions システムで LDAP プロキシを設定します。


注 –

この LDAP サーバーを NFS サーバーとして、または Sun RayTM クライアントのサーバーとして使用しない場合、ラベル付きゾーンをこのサーバーにインストールする必要はありません。


ProcedureLDAP 用に Directory Server の情報を収集する

  1. 次の項目の値を決定します。

    各項目は、Sun Java Enterprise System のインストールウィザードに表示される順序で記載されています。

    インストールウィザードのプロンプト 

    対応または情報 

    Sun Java System Directory Server version

    「管理者ユーザー ID」 

    デフォルト値は「admin」です。

    「管理者ユーザーパスワード」 

    admin123」のようなパスワードを作成します。

    「ディレクトリマネージャ DN」 

    デフォルト値は「cn=Directory Manager」です。

    「ディレクトリマネージャパスワード」 

    dirmgr89」のようなパスワードを作成します。

    「Directory Server ルート」 

    デフォルト値は「/var/opt/mps/serverroot」です。プロキシソフトウェアをインストールする場合、このパスはあとでも使用されます。

    「サーバー識別子」 

    デフォルト値はローカルシステムです。 

    「サーバーポート」 

    Directory Server を使用して標準的な LDAP ネームサービスをクライアントシステムに提供する場合は、デフォルト値「389」を使用します。

    Directory Server を使用してプロキシサーバーの今後のインストールをサポートする場合は、「10389」など標準以外のポートを入力します。

    「サフィックス」 

    dc=example-domain,dc=com」のように、ドメイン構成要素を含めます。

    「管理ドメイン」 

    example-domain.com」のように、サフィックスに対応させて作成します。

    「システムユーザー」 

    デフォルト値は「root」です。

    「システムグループ」 

    デフォルト値は「root」です。

    「データの保存場所」 

    デフォルト値は「このサーバーに設定データを保存します。」です。

    「データの保存場所」 

    デフォルト値は「このサーバーにユーザー/グループデータを保存します。 」です。

    「Administration Port」 

    デフォルト値はサーバーポートです。デフォルトを変更するために推奨される慣例は、ソフトウェアバージョンに 1000 を掛けた数値です。ソフトウェアバージョン 5.2 の場合、この慣例ではポート 5200 になります。

ProcedureSun Java System Directory Server をインストールする

Directory Server パッケージは、Sun Software Gateway の Web サイトから入手できます。

  1. Sun Web サイトで Sun Java System Directory Server パッケージを検索します。

    1. Sun Software Gateway のページで、「Get It」タブをクリックします。

    2. 「Sun Java Identity Management Suite」の前のチェックボックスをクリックします。

    3. 「Submit」ボタンをクリックします。

    4. 登録していない場合は、登録します。

    5. ログインしてこのソフトウェアをダウンロードします。

    6. 画面左上の「Download Center」をクリックします。

    7. 「Identity Management」領域で、使用しているプラットフォームに適切な最新のソフトウェアをダウンロードします。

  2. /etc/hosts ファイルで、使用するシステムのホスト名エントリに FQDN を追加します。

    FQDN とは「完全指定のドメイン名 (Fully Qualified Domain Name )」のことです。この名前は、次のようにホスト名と管理ドメインの組み合わせになります。


    192.168.5.5 myhost myhost.example-domain.com
  3. Directory Server パッケージをインストールします。

    「LDAP 用に Directory Server の情報を収集する」からの情報を使って質問に答えます。

  4. 起動するたびに Directory Server も起動されるようにします。

    1. init.d スクリプトを追加します。

      次の例は、SERVER_ROOT および SERVER_INSTANCE 変数を変更してインストールに合わせます。


      /etc/init.d/ldap.directory-myhost
      ---------------------------------------
      #!/sbin/sh
      
      SERVER_ROOT=/var/Sun/mps
      SERVER_INSTANCE=myhost
      
      case "$1" in
      start)
      ${SERVER_ROOT}/slapd-${SERVER_INSTANCE}/start-slapd
      ;;
      stop)
      
      ${SERVER_ROOT}/slapd-${SERVER_INSTANCE}/stop-slapd
      ;;
      *)
      
      echo "Usage: $0 { start | stop }"
      exit 1
      esac
      exit 0
    2. init.d スクリプトを rc2.d ディレクトリにリンクします。


      /usr/bin/ln \
      /etc/init.d/ldap.directory-myhost \
      /etc/rc2.d/S70ldap.directory-myhost
  5. インストールを確認します。

    1. インストールディレクトリを調べます。

      slapd-server-hostname という名前のサブディレクトリが存在するはずです。

    2. Directory Server を起動します。


      # installation-directory/slapd-server-hostname/restart-slapd
    3. slapd プロセスが存在することを確認します。


      # ps -ef | grep slapd
      ./ns-slapd -D installation-directory/slapd-server-instance -i
      installation-directory/slapd-server-instance/
注意事項

LDAP 構成の問題解決のストラテジについては、『Solaris のシステム管理 (ネーミングとディレクトリサービス : DNS、NIS、LDAP 編)』の第 13 章「LDAP のトラブルシューティング (参照情報)」を参照してください。

ProcedureSun Java System Directory Server のアクセスログを保護する

この手順で作成する LDIF スクリプトによって、アクセスログに関して次の規則が定められます。

  1. アクセスログを管理するためのスクリプトを作成します。

    次の内容の /var/tmp/logs-access.ldif ファイルを作成します。


    dn: cn=config
    changetype: modify
    replace: nsslapd-accesslog-logging-enabled
    nsslapd-accesslog-logging-enabled: on
    -
    replace: nsslapd-accesslog-level
    nsslapd-accesslog-level: 256
    -
    replace: nsslapd-accesslog-logbuffering
    nsslapd-accesslog-logbuffering: on
    -
    replace: nsslapd-accesslog-logrotationtime
    nsslapd-accesslog-logrotationtime: 1
    -
    replace: nsslapd-accesslog-logrotationtimeunit
    nsslapd-accesslog-logrotationtimeunit: day
    -
    replace: nsslapd-accesslog-maxlogsize
    nsslapd-accesslog-maxlogsize: 500
    -
    replace: nsslapd-accesslog-maxlogsperdir
    nsslapd-accesslog-maxlogsperdir: 100
    -
    replace: nsslapd-accesslog-logexpirationtime
    nsslapd-accesslog-logexpirationtime: 3
    -
    replace: nsslapd-accesslog-logexpirationtimeunit
    nsslapd-accesslog-logexpirationtimeunit: month
    -
    replace: nsslapd-accesslog-logmaxdiskspace
    nsslapd-accesslog-logmaxdiskspace: 20000
    -
    replace: nsslapd-accesslog-logminfreediskspace
    nsslapd-accesslog-logminfreediskspace: 500
  2. スクリプトを実行します。


    # ldapmodify -h localhost -D 'cn=directory manager' \
    -f /var/tmp/logs-access.ldif
    
  3. パスワードを入力します。


    Enter bind password: Type the appropriate password
    modifying entry cn=config

ProcedureSun Java System Directory Server のエラーログを保護する

この手順で作成する LDIF スクリプトによって、エラーログに関して次の規則が定められます。

  1. エラーログを管理するためのスクリプトを作成します。

    次の内容の /var/tmp/logs-error.ldif ファイルを作成します。


    dn: cn=config
    changetype: modify
    replace: nsslapd-errorlog-logging-enabled
    nsslapd-errorlog-logging-enabled: on
    -
    replace: nsslapd-errorlog-logexpirationtime
    nsslapd-errorlog-logexpirationtime: 3
    -
    replace: nsslapd-errorlog-logexpirationtimeunit
    nsslapd-errorlog-logexpirationtimeunit: month
    -
    replace: nsslapd-errorlog-logrotationtime
    nsslapd-errorlog-logrotationtime: 1
    -
    replace: nsslapd-errorlog-logrotationtimeunit
    nsslapd-errorlog-logrotationtimeunit: week
    -
    replace: nsslapd-errorlog-maxlogsize
    nsslapd-errorlog-maxlogsize: 500
    -
    replace: nsslapd-errorlog-maxlogsperdir
    nsslapd-errorlog-maxlogsperdir: 30
    -
    replace: nsslapd-errorlog-logmaxdiskspace
    nsslapd-errorlog-logmaxdiskspace: 20000
    -
    replace: nsslapd-errorlog-logminfreediskspace
    nsslapd-errorlog-logminfreediskspace: 500
  2. スクリプトを実行します。


    # ldapmodify -h localhost -D 'cn=directory manager' -f
    /var/tmp/logs-error.ldif
    
  3. プロンプトに答えます。


    Enter bind password: Type the appropriate password
    modifying entry cn=config

ProcedureSun Java System Directory Server のマルチレベルポートを設定する

Trusted Extensions で作業するには、Directory Server のサーバーポートを大域ゾーンのマルチレベルポート (MLP) として設定する必要があります。

  1. Solaris 管理コンソールを起動します。


    # /usr/sbin/smc &
    
  2. This Computer (this-host: Scope=Files, Policy=TSOL) ツールボックスを選択します。

  3. 「システムの構成」をクリックしてから「コンピュータとネットワーク」をクリックします。

    パスワードを入力するよう求められます。

  4. 適切なパスワードを入力します。

  5. 「トラステッドネットワークゾーン」をダブルクリックします。

  6. 大域ゾーンをダブルクリックします。

  7. TCP プロトコルのマルチレベルポートを追加します。

    1. 「ゾーンの IP アドレスに対するマルチレベルポートの追加」をクリックします。

    2. ポート番号として 389 と入力し、「了解」をクリックします。

  8. UDP プロトコルのマルチレベルポートを追加します。

    1. 「ゾーンの IP アドレスに対するマルチレベルポートの追加」をクリックします。

    2. ポート番号として 389 と入力します。

    3. udp プロトコルを選択して、「了解」をクリックします。

  9. 「了解」をクリックして設定を保存します。

  10. カーネルを更新します。


    # tnctl -fz /etc/security/tsol/tnzonecfg
    

ProcedureSun Java System Directory Server にデータを入力する

ラベル構成、ユーザー、および遠隔システムに関する Trusted Extensions データを保持するために、複数の LDAP データベースが作成および変更されています。この手順では、Directory Server データベースに Trusted Extensions 情報を取り込みます。

  1. ネームサービスデータベースにデータを入力するために使用するファイルのステージング領域を作成します。


    # mkdir -p /setup/files
    
  2. サンプルの /etc ファイルをステージング領域にコピーします。


    # cd /etc
    # cp aliases group hosts networks netmasks protocols /setup/files
    # cp rpc services auto_master /setup/files
    
    # cd /etc/security
    # cp auth_attr prof_attr exec_attr /setup/files/
    #
    # cd /etc/security/tsol
    # cp tnrhdb tnrhtp /setup/files
    

    Solaris 10 11/06 リリースをパッチを適用しないで実行している場合、ipnodes ファイルをコピーします。


    # cd /etc/inet
    # cp ipnodes /setup/files
    
  3. /setup/files/auto_master ファイルから +auto_master エントリを削除します。

  4. ?:::::? エントリを /setup/files/auth_attr ファイルから削除します。

  5. /setup/files/prof_attr ファイルから :::: エントリを削除します。

  6. ステージング領域にゾーン自動マップを作成します。

    次の自動マップのリストで、各ペアの最初の行はファイルの名前を示します。2 行めはファイルの内容を示します。ゾーン名は、Trusted Extensions ソフトウェアに含まれているデフォルトの label_encodings ファイルからのラベルを特定します。

    • ここに示された行のゾーン名を実際のゾーン名に置き換えてください。

    • myNFSserver でホームディレクトリの NFS サーバーを特定します。


    /setup/files/auto_home_public
     * myNFSserver_FQDN:/zone/public/root/export/home/&
    
    /setup/files/auto_home_internal
     * myNFSserver_FQDN:/zone/internal/root/export/home/&
    
    /setup/files/auto_home_needtoknow
     * myNFSserver_FQDN:/zone/needtoknow/root/export/home/&
    
    /setup/files/auto_home_restricted
     * myNFSserver_FQDN:/zone/restricted/root/export/home/&
  7. ネットワーク上のすべてのシステムを /setup/files/tnrhdb ファイルに追加します。

    ここではワイルドカードは使用できません。通信を行うすべてのシステムの IP アドレスは、ラベル付きゾーンの IP アドレスも含めてこのファイル内に存在する必要があります。

    1. トラステッドエディタを開き、/setup/files/tnrhdb を編集します。

    2. Trusted Extensions ドメインのラベル付きシステムのすべての IP アドレスを追加します。

      ラベル付きシステムのタイプは cipso です。また、ラベル付きシステムのセキュリティーテンプレートの名前も cipso です。したがって、デフォルト構成では cipso エントリは次のようになります。


      192.168.25.2:cipso

      注 –

      このリストには、大域ゾーンおよびラベル付きゾーンの IP アドレスが含まれます。


    3. ドメインが通信できるラベルなしシステムをすべて追加します。

      ラベルなしシステムのタイプは unlabeled です。ラベルなしシステムのセキュリティーテンプレートの名前は admin_low です。したがって、デフォルト構成ではラベルなしシステムのエントリは次のようになります。


      192.168.35.2:admin_low
    4. ファイルを保存し、エディタを終了します。

    5. ファイルの構文を検査します。


      # tnchkdb -h /setup/files/tnrhdb
      
    6. エラーを修正してから作業を続行します。

  8. /setup/files/tnrhdb ファイルを /etc/security/tsol/tnrhdb ファイルにコピーします。

  9. ldapaddent コマンドを使用して、ステージング領域のすべてのファイルにデータを入力します。


    # /usr/sbin/ldapaddent -D "cn=directory manager" \
    -w dirmgr123 -a simple -f /setup/files/hosts hosts