Re: [PATCH] target: remove the auth_type field from iscsi_session

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



st 9. 6. 2021 v 1:14 odesílatel Roman Bolshakov <r.bolshakov@xxxxxxxxx> napsal:
>
> Hi Maurizio,
>
> It might still be useful to carry the meaning of "effective auth_type"
> in case of complex auth configuration. Otherwise there's no way to check
> what auth settings took effect for a particular session/I_T nexus.
>
> I think we should rather print auth_type value someplace in configfs
> than delete the field altogether.

Ok I see what you mean.

If acls are used, identifying the CHAP-protected sessions is
trivial... you just have
to look under configfs /tptg_1/acls/.../auth and tptg_1/acls/.../info

If dynamic sessions are allowed and the tgt parameter AuthMethod  is
"CHAP,None",
you could end up having some initiators using CHAP and some not...
AFAIK, in this case, there is currently no way to find out if a
particular session used CHAP or not.

If it could really be useful to know that, then one possible solution
is to add this
information to the "dynamic_sessions" list in configfs,
but I'm not really sure this is acceptable because it could break the
user applications
that rely on this list.

Another solution that comes to my mind is to create a new configfs
node "sessions_info"
that contains a list of all connected initiators, their iqns,
authentication method etc.
but if the list is too long it could be truncated (attribute's max
size is PAGE_SIZE).

Or we could create a new configfs directory "sessions" and each
session would have it's own
entry there.

Maurizio



>
> Regards,
> Roman
>
> >       if (strstr("None", authtype))
> >               return 1;
> >       else if (strstr("CHAP", authtype))
> > diff --git a/include/target/iscsi/iscsi_target_core.h b/include/target/iscsi/iscsi_target_core.h
> > index 1eccb2ac7d02..f0495515ca6a 100644
> > --- a/include/target/iscsi/iscsi_target_core.h
> > +++ b/include/target/iscsi/iscsi_target_core.h
> > @@ -647,7 +647,6 @@ struct iscsi_session {
> >
> >       /* LIO specific session ID */
> >       u32                     sid;
> > -     char                    auth_type[8];
> >       /* unique within the target */
> >       int                     session_index;
> >       /* Used for session reference counting */
> > --
> > Maurizio Lombardi
> >
>





[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux