Skip to content

iscsi target: fix login negotiation

Mike Christie target-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2iscsi target: make function to get auth from conndrivers/target/iscsi/iscsi_target_nego.c+23 -120 replies
2/2iscsi target: Fix CHAP negotiation setupdrivers/target/iscsi/iscsi_target_nego.c+40 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] iscsi target: fix login negotiation

The following patches fix login negotiation when the user has disabled authentication, and the initiator is presenting CHAP,None. The problem is that the target initializes AuthMethod to CHAP (normal session) or CHAP,None (discovery session), but when the user does authentication=0/ enforce_discovery_auth=0 we can end up setting AuthMethod to CHAP,None. The user would then have not setup CHAP settings like userid/password since they disabled it, so later the login will fail if the initiator presents CHAP,None, because the target sees CHAP and tries to do that since it had set CHAP,None when disabling auth but there are not valid values.

As an alternative to these patches we could also have the configfs file update the AuthMethod when it is written to. For example when userid, password, authentication, enforce_discovery_auth, etc are written to we could update AuthMethod, but I was worried that userspace apps/users could set these in funky orders like initializing the CHAP values then setting authentication/enforce=0 and in that case we might end up not using CHAP when we used to.