During my exploration of nvme-stas for auto discovery and connect when NVMe-oF target is configured with authentication, seem couple of things are not working as per expectation.
To set the context, when a target is configured with Uni-directional authentication, the dhchap key need to configure to file /etc/stas/sys.conf.doc at initiator. Based on the details mentioned in the field description following experiment are performed.
# key: The host's DHCHAP key to be used for authentication. This is an
# optional parameter only required when authentication is needed.
# A value starting with "file://" indicates that the Host Key can
# be retrieved from a separate file. Typically, nvme-cli saves the
# Host Key in /etc/nvme/hostkey. For compatibility with nvme-cli,
# nvme-stas defaults to looking for the existence of this file and
# will read the Key from it. Otherwise, you can overwrite the default
# Key by specifying its value here or specifying another file that
# contains an alternate Host Key to use.
# Type: string
# Default: file:///etc/nvme/hostkey
System Details:
| Component |
Version |
| NVMe-STAS |
2.3.1 |
| OS |
Ubuntu 24.04 LTS |
| Kernel |
6.8.0-45-generic |
Experiments Summary:
| SNO |
Description |
Result |
Status |
| 1 |
Configure the DHCHAP key in /etc/nvme/hostkey file and set the correct file path in key filed of /etc/stas/sys.conf.doc file. (eg: key=file:///etc/nvme/hostkey) |
The test subsystem got connected automatically |
PASS |
| 2 |
Delete /etc/nvme/hostkey file and configure the DHCHAP key in /etc/nvme/hostkey2 file. Set the file path /etc/nvme/hostkey2 in key filed of /etc/stas/sys.conf.doc file. (eg: key=file:///etc/nvme/hostkey2) |
The test subsystem was not connected automatically |
FAIL |
| 3 |
Set the DHCHAP key directly into the key filed of /etc/stas/sys.conf.doc file. (e.g: key=DHHC-1:01:3mR5goAg1lA1uFfXqcP+E6HBapjfrksp6fSsMmQGqd1m7+7l:) |
The test subsystem was not connected automatically |
FAIL |
Could you please explain if it is a right behavior?
During my exploration of nvme-stas for auto discovery and connect when NVMe-oF target is configured with authentication, seem couple of things are not working as per expectation.
To set the context, when a target is configured with Uni-directional authentication, the dhchap key need to configure to file
/etc/stas/sys.conf.docat initiator. Based on the details mentioned in the field description following experiment are performed.# key: The host's DHCHAP key to be used for authentication. This is an
# optional parameter only required when authentication is needed.
# A value starting with "file://" indicates that the Host Key can
# be retrieved from a separate file. Typically, nvme-cli saves the
# Host Key in /etc/nvme/hostkey. For compatibility with nvme-cli,
# nvme-stas defaults to looking for the existence of this file and
# will read the Key from it. Otherwise, you can overwrite the default
# Key by specifying its value here or specifying another file that
# contains an alternate Host Key to use.
# Type: string
# Default: file:///etc/nvme/hostkey
System Details:
Experiments Summary:
/etc/nvme/hostkeyfile and set the correct file path in key filed of/etc/stas/sys.conf.docfile. (eg: key=file:///etc/nvme/hostkey)/etc/nvme/hostkeyfile and configure the DHCHAP key in/etc/nvme/hostkey2file. Set the file path/etc/nvme/hostkey2in key filed of/etc/stas/sys.conf.docfile. (eg: key=file:///etc/nvme/hostkey2)keyfiled of/etc/stas/sys.conf.docfile. (e.g: key=DHHC-1:01:3mR5goAg1lA1uFfXqcP+E6HBapjfrksp6fSsMmQGqd1m7+7l:)Could you please explain if it is a right behavior?