Setting up authentication for Linux hosts

You can set up one-way CHAP authentication for Linux® hosts.

Before you begin

The system supports one-way CHAP authentication where the system authenticates the host iSER initiator.

Procedure

To set up authentication for a Linux host, follow these steps:

  1. Open /etc/iscsi/iscsid.conf or /etc/iscsid.conf by using an appropriate editor.
  2. Go to the CHAP settings paragraph.

    The following example shows the output:

    Figure 1. CHAP settings for a Linux host
    #*************
    #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:
    #clustername = 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. Set up one-way authentication.
    1. Set a CHAP user name and password to your initiator name.
      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. Set a discovery session CHAP user name and password to your initiator name.
      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. Save these settings. You must log out of any current sessions and rediscover the system iSER target for the CHAP secret to be effective.