-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to specify the DHCHAP key (hostkey) to other files. #429
Comments
Hi @SwatiChaw - Thanks for reporting this issue. I guess I should have clarified that the file Users that do not want to use the default configuration should create Please try the same test but using Thanks. |
Hi @martin-belanger, Thanks a lot for the clarification. I have re-run the same test with the suggested changes. All tests Passed this time. I want to try one more scenario where Target is configured with 4 subsystems (subsystem1, subsystem2, subsystem3, subsystem4), each configured with a different hostkey(from a single host). For e.g. Host1 configured with hostkey1 ---> to access subsytem1 During the manual connect, using nvme-cli, a different hostkey can be passed with each connect command from a single host to connect to different subsystems. But I am not sure how to achieve the same with auto-discovery. Could you suggest if this scenario can be tested using nvme-stas? and if possible, how to achieve this? |
IIRC, you should be able to manually configure each subsystem in For example:
This is something that I have not tested much because at the time that I implemented nvme-stas authentication was still fairly new in |
Forgot to mention that when you're done changing the configuration you can apply the changes as follows:
|
Thanks for sharing the details. root# nvme connect --help Connect to NVMeoF subsystem Options: nvme connect -t tcp -n ${subsystem1} -a 10.129.136.200 -s 4420 --hostnqn=nqn.2014-08.org.nvmexpress:uuid:$hostid --hostid=$hostid --dhchap-secret=$hostkey1nvme connect -t tcp -n ${subsystem2} -a 10.129.136.200 -s 4420 --hostnqn=nqn.2014-08.org.nvmexpress:uuid:$hostid --hostid=$hostid --dhchap-secret=$hostkey2nvme-cli allows connecting to multiple subsystems, from the same host, with a different hostkey, Is this supported in automated discovery? I don't see "dhchap-secret" specified in /etc/stas/stacd.conf |
Ah! Now I see what you mean. The option to specify a different host key ( On the other hand, I'm not sure in which circumstances one would want to configure multiple host keys. There's already a lot of keys to configure all over the place. If one has to do this on several hosts (think 100s of hosts) it can get pretty tedious. By the way, I don't know if you're familiar with the work done by the nvmexpress group (https://nvmexpress.org/), but you may want to have a look at TP8019 - Authentication Verification Entity for_DH-HMAC-CHAP 2022.12.14a. This document discusses an authentication server where all the keys/secrets can be configure in a central place. |
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:
Experiments Summary:
/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)/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)key
filed of/etc/stas/sys.conf.doc
file. (e.g: key=DHHC-1:01:3mR5goAg1lA1uFfXqcP+E6HBapjfrksp6fSsMmQGqd1m7+7l:)Could you please explain if it is a right behavior?
The text was updated successfully, but these errors were encountered: