1 #
   2 # CDDL HEADER START
   3 #
   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 
  22 #
  23 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24 # Use is subject to license terms.
  25 #
  26 
  27 #
  28 # A test purpose file to test functionality of chap authentication
  29 #
  30 
  31 # __stc_assertion_start
  32 #
  33 # ID: iscsi_auth_008
  34 #
  35 # DESCRIPTION:
  36 #       Attempt to establish TCP connection and discovery the LU with
  37 #       "RADIUS" authentication configured when mis-matched chap user and secret
  38 #       authentication fails and verify its failure on initiator host
  39 #
  40 # STRATEGY:
  41 #       Setup:
  42 #               Setup the RADIUS server configuration to be not ready with
  43 #                   mis-matched chap user and secret
  44 #               Create target portal group with specified tag 1 and ip address
  45 #               Create target node with tpgt 1 and specified auth-method of
  46 #                   "radius" authentication
  47 #               Modify target node authentication property with auth-method of
  48 #                   radius by itadm modify-target option on target host
  49 #               Create a LU on target host by zfs file system
  50 #               Create the view of LU by default to all target and host groups
  51 #               Setup initiator node to enable "SendTarget" method
  52 #               Setup SendTarget with discovery address on initiator host
  53 #               Setup RADIUS authentication enabled on initiator host
  54 #               Setup radius server and shared secret on initiator host by
  55 #                   iscsiadm modify initiator-node option
  56 #       Test:
  57 #               Check that device path of specified LU can NOT be visible by
  58 #                   iscsi initiator node
  59 #               Check that iscsi initiator node has no active connection
  60 #       Cleanup:
  61 #               Delete the target portal group
  62 #               Delete the target node
  63 #               Delete the configuration information in initiator and target
  64 #
  65 #       STRATEGY_NOTES:
  66 #
  67 # TESTABILITY: explicit
  68 #
  69 # AUTHOR: john.gu@sun.com
  70 #
  71 # REVIEWERS:
  72 #
  73 # ASSERTION_SOURCE:
  74 #
  75 # TEST_AUTOMATION_LEVEL: automated
  76 #
  77 # STATUS: IN_PROGRESS
  78 #
  79 # COMMENTS:
  80 #
  81 # __stc_assertion_end
  82 #
  83 function iscsi_auth_008
  84 {
  85         cti_pass
  86 
  87         tc_id="iscsi_auth_008"
  88 
  89         tc_desc="Attempt to establish TCP connection and discovery the LU with"
  90         tc_desc="${tc_desc} RADIUS authentication configured when mis-matched"
  91         tc_desc="${tc_desc} chap user and secret authentication fails and verify"
  92         tc_desc="${tc_desc} its failure on initiator host"
  93 
  94         print_test_case $tc_id - $tc_desc
  95 
  96         stmsboot_enable_mpxio $ISCSI_IHOST
  97 
  98         cti_unsupported "Radius Authentication is not supported by Comstar"\
  99             "iSCSI Target temporarily, test is skipped."
 100 
 101 }
 102