+3
−0
+8
−0
+6
−1
+1
−0
+1
−0
Loading
This patch adds structures that will be used to implement NVMe in-band
authentication using the DH-HMAC-CHAP protocol. They're mostly empty for
now, the following patches will implement each step of this process.
The authentication is executed by exchanging several messages using the
AUTHENTICATION_SEND and AUTHENTICATION_RECEIVE commands from the Fabrics
Command Set. The messages sent by the host map to the SEND commands,
while those sent by the controller map to the RECEIVE commands.
The flow roughly consists of 5 steps:
1. The host sends a AUTH_negotiate message to listing the hash function
and Diffie-Hellman group it supports.
2. The controller responds with a DH-HMAC-CHAP_challenge message
selecting one of the hash functions and DH groups from those sent by
the host along with a challenge value and an optional DH public key.
3. The host calculates an HMAC of the challenge (optionally augmented
with a DH secret) and sends it back to the controller using a
DH-HMAC-CHAP_reply message along with its DH public key. If
bidirectional authentication is requested, it includes its own
challenge value in that message.
4. The controller verifies the response to the challenge received from
the host comparing it to its HMAC calculation. If successful, it
sends a DH-HMAC-CHAP_success1 message with an optional response to
the host challenge.
5. If bidirectional authentication wasn't requested, the authentication
process is finished at this point. Otherwise the host verifies
controller's response to the host's challenge and, if successful,
sends a DH-HMAC-CHAP_success2 message.
Any errors during this process are reported by sending either an
AUTH_failure1 message (sent by the controller) or AUTH_failure2 (sent by
the host).
Signed-off-by:
Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I84cc1574e15884e1e3d3d03e517cb38f05e12ef6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21981
Reviewed-by:
Ben Walker <ben@nvidia.com>
Reviewed-by:
Jim Harris <jim.harris@samsung.com>
Community-CI: Mellanox Build Bot
Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com>