Linux ホストでの認証のセットアップ

Linux ホストに対して、片方向 CHAP 認証をセットアップすることができます。

始める前に

システムは、システムがホスト iSER イニシエーターを認証する片方向 CHAP 認証をサポートします。

手順

Linux ホストで認証をセットアップするには、以下の手順を実行します。

  1. 適切なエディターを使用して /etc/iscsi/iscsid.conf または /etc/iscsid.conf を開きます。
  2. CHAP 設定のパラグラフに進みます。

    以下に出力例を示します。

    図 1. Linux ホストの CHAP 設定
    #*************
    #CHAP Settings
    #*************
    
    #To enable CHAP authentication set node.session.auth.authmethod
    #to CHAP. The default is None.
    #node.session.auth.authmethod = CHAP
    
    #To set a CHAP username and password for initiator
    #authentication by the target(s), uncomment the following lines:
    #node.session.auth.username = username
    #node.session.auth.password = password
    node.session.auth.username = rhel_username
    node.session.auth.password = xxxxxxxxxxxxx
    #To set a CHAP username and password for target(s)
    #authentication by the initiator, uncomment the following lines:
    #node.session.auth.username_in = username_in
    #node.session.auth.password_in = password_in
    node.session.auth.password_in = yyyyyyyyyyyyy
    #To enable CHAP authentication for a discovery session to the target
    #set discovery.sendtargets.auth.authmethod to CHAP. The default is None.
    #discovery.sendtargets.auth.authmethod = CHAP
    discovery.sendtargets.auth.authmethod = CHAP
    #To set a discovery session CHAP username and password for the initiator
    #authentication by the target(s), uncomment the following lines:
    #discovery.sendtargets.auth.username = username
    #discovery.sendtargets.auth.password = password
    
    #To set a discovery session CHAP username and password for target(s)
    #authentication by the initiator, uncomment the following lines:
    #discovery.sendtargets.auth.username_in = username_in
    #discovery.sendtargets.auth.password_in = password_in
    
  3. 片方向認証をセットアップします。
    1. CHAP ユーザー名とパスワードをイニシエーター名に設定します。
      1. node.session.auth.authmethod = CHAP
      2. node.session.auth.username = <initiator's user name>
      3. node.session.auth.password = <CHAP secret for host>
    2. ディスカバリー・セッションの CHAP ユーザー名とパスワードをイニシエーター名に設定します。
      1. discovery.sendtargets.auth.authmethod = CHAP
      2. discovery.sendtargets.auth.username = <initiator's user name>
      3. discovery.sendtargets.auth.password = <CHAP secret for host>
    3. これらの設定を保存します。CHAP シークレットが有効になるには、すべての現行セッションをログアウトして、システムの iSER ターゲットを再検出する必要があります。