numam-spdk/test
Shuhei Matsumoto b6ab3116fc iscsi: Load CHAP secrets from file once at boot and use them in memory
For secure iSCSI targets, dynamic reconfiguration of CHAP secrets is
must to have.

Currently CHAP secrets are loaded for every CHAP authentication
operation. The current implementation will not work correctly
when CHAP secrets in the file are changed dynamically.

If SPDK loads CHAP secrets from the file only at boot and they can be
configured by RPCs, user can change CHAP secrets safely during run time.

Even if there are any users who expect dynamic reconfiguration of
CHAP secrets based on the current implementation, if we provide
this better alternative based on RPCs, they will be able to continue to
satisfy their requirement.

This patch change the current implementation so that SPDK loads
CHAP secrets from the file once at boot and uses them in memory
hereafter.

Besides, use fixed size buffers to hold CHAP secrets.
Previously dynamically allocated buffers by strdup() had been used,
but it required many nomem checks and should be avoided.
Other iSCSI targets/initiators have used fixed size buffers and SPDK
follows others.

Set the size of buffers for both user names and secrets to 256 (the
last byte is for NULL termination). 256 is sufficiently large
compared with others.

CHANGELOG will be updated in the separate patch because new RPCs will
be added instead.

Change-Id: I499e792817c2ed01c3d970bbd3d34a6b1fccf65b
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/421463
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-08-27 21:13:49 +00:00
..
app jsoncat, histogram_perf: add missing dependencies 2018-08-16 14:27:18 +00:00
bdev test: fix typos in the test directory 2018-08-27 19:39:31 +00:00
blobfs app: allow full-name command line options 2018-08-13 17:30:10 +00:00
blobstore autotest_common.sh: move to test/common 2018-02-27 20:37:27 -05:00
common test/iscsi: Add installation of socat in vm_setup.sh configuration 2018-08-15 18:09:46 +00:00
cpp_headers build: add @: to remaining 'all' targets 2018-02-14 17:38:25 -05:00
env test/vtophys: reduce amount of memory requested 2018-07-26 05:28:52 +00:00
event test/event_perf: use less memory 2018-07-26 05:28:52 +00:00
ioat ioat: remove ioat kperf kernel driver test harness 2018-04-30 17:11:53 +00:00
iscsi_tgt test/qos: don't eat fio_py return value 2018-08-27 14:58:29 +00:00
json_config app: drop -w parameter (wait for rpc init) 2018-08-13 17:30:10 +00:00
lvol test: refactor the run_test function to add detailed information 2018-08-15 17:24:01 +00:00
nvme test: fix typos in the test directory 2018-08-27 19:39:31 +00:00
nvmf scripts: remove --skip-alias from which commands 2018-08-27 14:58:29 +00:00
pmem test/json: Add pmem bdev test 2018-07-05 19:09:56 +00:00
spdkcli test/spdkcli: Fix: Add missing delete_*_bdev methods 2018-07-27 16:48:02 +00:00
unit iscsi: Load CHAP secrets from file once at boot and use them in memory 2018-08-27 21:13:49 +00:00
vhost test/migration: fix typo 2018-08-22 20:24:07 +00:00
Makefile test: move lib/json up to test app directory 2018-03-29 00:31:24 -04:00
spdk_cunit.h test: remove leftover spdk_cunit declaration 2018-07-06 22:47:56 +00:00