Linux ホストでの認証のセットアップ
Linux ホストに対して、片方向 CHAP 認証をセットアップすることができます。ご使用のホストに対して機能する片方向認証を構成した後、オプションとして双方向認証をセットアップすることができます。
始める前に
システムは、次の 2 つのチャレンジ・ハンドシェーク認証プロトコル (CHAP) 方式をサポートします。
- 片方向 CHAP 認証 (システムが、ホスト iSCSI イニシエーターを認証します)。
- 双方向 CHAP 認証 (システムとイニシエーターの両方が相互に認証を行います)
注: 片方向認証と双方向認証に選択する CHAP シークレットは、異なる必要があります。
手順
Linux ホストで認証をセットアップするには、以下の手順を実行します。
- 適切なエディターを使用して /etc/iscsi/iscsid.conf または /etc/iscsid.conf を開きます。
- 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 = iqn.suse.nmp.com 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
- 認証をセットアップします。
- 片方向認証をセットアップします。
- CHAP ユーザー名とパスワードをイニシエーター名に設定します。
- node.session.auth.authmethod = CHAP
- node.session.auth.username = <initiator IQN name>
- node.session.auth.password = <CHAP secret for host>
- ディスカバリー・セッションの CHAP ユーザー名とパスワードをイニシエーター名に設定します。
- discovery.sendtargets.auth.authmethod = CHAP
- discovery.sendtargets.auth.username = <initiator IQN name>
- discovery.sendtargets.auth.password = <CHAP secret for host>
- これらの設定を保存します。CHAP シークレットが有効になるには、すべての現行セッションをログアウトして、システムの iSCSI ターゲットを再検出する必要があります。
注: 上記の例では、xxxxxxxxxxxxx はホストの CHAP シークレットであり、iqn.suse.nmp.com はイニシエーターの IQN 名です。 この IQN 名は、mkhost コマンドを使用してシステムでホスト・オブジェクトを作成する場合に使用されるものと同じ名前でなければなりません。 - CHAP ユーザー名とパスワードをイニシエーター名に設定します。
- 双方向認証をセットアップします。注: 双方向認証のセットアップは必須ではありません。 双方向認証用の構成を行う前に、ご使用のホストに対して片方向認証が構成され、機能していることを確認してください。
- password_in を編集して、システムで chsystem コマンドを使用してセットアップする CHAP シークレットに変更します。
- ターゲットに CHAP ユーザー名とパスワードを設定します。
- node.session.auth.password_in = <CHAP secret for clustered system>
- ターゲットにディスカバリー・セッションの CHAP ユーザー名とパスワードを設定します。
- discovery.sendtargets.auth.password_in = <CHAP secret for clustered system>
- ターゲットに CHAP ユーザー名とパスワードを設定します。
- これらの設定を保存します。CHAP シークレットが有効になるには、すべての現行セッションをログアウトして、システムの iSCSI ターゲットを再検出する必要があります。
- password_in を編集して、システムで chsystem コマンドを使用してセットアップする CHAP シークレットに変更します。
- 片方向認証をセットアップします。
関連タスク: