b6ab3116fc
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> |
||
---|---|---|
.. | ||
app | ||
bdev | ||
blobfs | ||
blobstore | ||
common | ||
cpp_headers | ||
env | ||
event | ||
ioat | ||
iscsi_tgt | ||
json_config | ||
lvol | ||
nvme | ||
nvmf | ||
pmem | ||
spdkcli | ||
unit | ||
vhost | ||
Makefile | ||
spdk_cunit.h |