Issue 6817 - idassert-bind with SASL issues
Summary: idassert-bind with SASL issues
Status: RESOLVED PARTIAL
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-31 17:44 UTC by ando@openldap.org
Modified: 2017-04-07 23:54 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ando@openldap.org 2011-01-31 17:44:23 UTC
Full_Name: Pierangelo Masarati
Version: HEAD/re24
OS: irrelevant
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (2.40.14.92)
Submitted by: ando


When idassert-bind is configured to use SASL bind, an "authcID" needs to be
provided, while the "binddn" is not needed.  However, if a "binddn" is not
provided as well, in some cases the proxiedAuthz control may be used
incorrectly.  The need to configure the "binddn" is not documented, so this ITS
is minimally addressed by documenting this requirement.

If the "binddn" is provided, everything works as expected, with the only minor
issue that the DN of the user as it is known to back-meta may not match the
actual identity the "authcID" assumed on the remote server.  The "right" way to
address this problem consists in performing a "WhoAmI" (RFC 4532) right after
the bind, or better use a "authorization identity control" (RFC 3829) along with
the bind operation.  Both approaches should be implemented, but they should not
be used unless explicitly requested.

p.
Comment 1 ando@openldap.org 2011-02-03 14:36:18 UTC
changed notes
changed state Open to Active
Comment 2 ando@openldap.org 2011-02-03 14:36:30 UTC
changed notes
Comment 3 Howard Chu 2011-02-28 10:06:08 UTC
masarati@aero.polimi.it wrote:
> Full_Name: Pierangelo Masarati
> Version: HEAD/re24
> OS: irrelevant
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (2.40.14.92)
> Submitted by: ando
>
>
> When idassert-bind is configured to use SASL bind, an "authcID" needs to be
> provided, while the "binddn" is not needed.  However, if a "binddn" is not
> provided as well, in some cases the proxiedAuthz control may be used
> incorrectly.  The need to configure the "binddn" is not documented, so this ITS
> is minimally addressed by documenting this requirement.

I tripped over this change while investigating #6711. Adding this requirement 
is certainly not the right solution; SASL Binds ordinarily don't require a 
BindDN and requiring it here just makes things confusing.

Also with the fixes that I made for #6711 I don't believe the issue exists any 
more. Please describe the conditions where the problem occurs.

> If the "binddn" is provided, everything works as expected, with the only minor
> issue that the DN of the user as it is known to back-meta may not match the
> actual identity the "authcID" assumed on the remote server.  The "right" way to
> address this problem consists in performing a "WhoAmI" (RFC 4532) right after
> the bind, or better use a "authorization identity control" (RFC 3829) along with
> the bind operation.  Both approaches should be implemented, but they should not
> be used unless explicitly requested.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 4 ando@openldap.org 2011-03-02 13:21:48 UTC
> masarati@aero.polimi.it wrote:
>> Full_Name: Pierangelo Masarati
>> Version: HEAD/re24
>> OS: irrelevant
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (2.40.14.92)
>> Submitted by: ando
>>
>>
>> When idassert-bind is configured to use SASL bind, an "authcID" needs to
>> be
>> provided, while the "binddn" is not needed.  However, if a "binddn" is
>> not
>> provided as well, in some cases the proxiedAuthz control may be used
>> incorrectly.  The need to configure the "binddn" is not documented, so
>> this ITS
>> is minimally addressed by documenting this requirement.
>
> I tripped over this change while investigating #6711. Adding this
> requirement
> is certainly not the right solution; SASL Binds ordinarily don't require a
> BindDN and requiring it here just makes things confusing.
>
> Also with the fixes that I made for #6711 I don't believe the issue exists
> any
> more. Please describe the conditions where the problem occurs.

At the time I looked at this issue, there were places in the code where
after an idassert-bind the lc_bound_ndn would receive a copy of idassert's
authcDN.  In case of SASL, this is empty/null; then back-ldap (and meta)
would fail from recognizing the connection as successfully bound.  I
understand there are better solutions; for example, ldapconn_t could have
a "bound" flag, or so.  I understand that code may need some reworking,
but I can't work at that now, sorry.  p.

>> If the "binddn" is provided, everything works as expected, with the only
>> minor
>> issue that the DN of the user as it is known to back-meta may not match
>> the
>> actual identity the "authcID" assumed on the remote server.  The "right"
>> way to
>> address this problem consists in performing a "WhoAmI" (RFC 4532) right
>> after
>> the bind, or better use a "authorization identity control" (RFC 3829)
>> along with
>> the bind operation.  Both approaches should be implemented, but they
>> should not
>> be used unless explicitly requested.
>
> --
>    -- Howard Chu
>    CTO, Symas Corp.           http://www.symas.com
>    Director, Highland Sun     http://highlandsun.com/hyc/
>    Chief Architect, OpenLDAP  http://www.openldap.org/project/
>
>


Comment 5 ando@openldap.org 2011-03-02 13:25:07 UTC
> masarati@aero.polimi.it wrote:
>> Full_Name: Pierangelo Masarati
>> Version: HEAD/re24
>> OS: irrelevant
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (2.40.14.92)
>> Submitted by: ando
>>
>>
>> When idassert-bind is configured to use SASL bind, an "authcID" needs to
>> be
>> provided, while the "binddn" is not needed.  However, if a "binddn" is
>> not
>> provided as well, in some cases the proxiedAuthz control may be used
>> incorrectly.  The need to configure the "binddn" is not documented, so
>> this ITS
>> is minimally addressed by documenting this requirement.
>
> I tripped over this change while investigating #6711. Adding this
> requirement
> is certainly not the right solution; SASL Binds ordinarily don't require a
> BindDN and requiring it here just makes things confusing.

I understand the fix I'm suggesting can sound counter-intuitive.  The
documentation should clearly indicate that the binddn in case of SASL is
for *local* and *internal* issues, and will not be part of the
authentication process.  As an alternative, lc_bound_ndn could receive a
dummy DN (e.g. "cn=auth") to merely indicate a successful bind (or receive
the actual identity from the remote server using the authid control along
with the bind or performing a whoami extop later, as already implemented).

p.

> Also with the fixes that I made for #6711 I don't believe the issue exists
> any
> more. Please describe the conditions where the problem occurs.
>
>> If the "binddn" is provided, everything works as expected, with the only
>> minor
>> issue that the DN of the user as it is known to back-meta may not match
>> the
>> actual identity the "authcID" assumed on the remote server.  The "right"
>> way to
>> address this problem consists in performing a "WhoAmI" (RFC 4532) right
>> after
>> the bind, or better use a "authorization identity control" (RFC 3829)
>> along with
>> the bind operation.  Both approaches should be implemented, but they
>> should not
>> be used unless explicitly requested.
>
> --
>    -- Howard Chu
>    CTO, Symas Corp.           http://www.symas.com
>    Director, Highland Sun     http://highlandsun.com/hyc/
>    Chief Architect, OpenLDAP  http://www.openldap.org/project/
>
>


Comment 6 Howard Chu 2011-03-04 23:13:13 UTC
masarati@aero.polimi.it wrote:
>> masarati@aero.polimi.it wrote:
>>> Full_Name: Pierangelo Masarati
>>> Version: HEAD/re24
>>> OS: irrelevant
>>> URL: ftp://ftp.openldap.org/incoming/
>>> Submission from: (NULL) (2.40.14.92)
>>> Submitted by: ando
>>>
>>>
>>> When idassert-bind is configured to use SASL bind, an "authcID" needs to
>>> be
>>> provided, while the "binddn" is not needed.  However, if a "binddn" is
>>> not
>>> provided as well, in some cases the proxiedAuthz control may be used
>>> incorrectly.  The need to configure the "binddn" is not documented, so
>>> this ITS
>>> is minimally addressed by documenting this requirement.
>>
>> I tripped over this change while investigating #6711. Adding this
>> requirement
>> is certainly not the right solution; SASL Binds ordinarily don't require a
>> BindDN and requiring it here just makes things confusing.
>
> I understand the fix I'm suggesting can sound counter-intuitive.  The
> documentation should clearly indicate that the binddn in case of SASL is
> for *local* and *internal* issues, and will not be part of the
> authentication process.  As an alternative, lc_bound_ndn could receive a
> dummy DN (e.g. "cn=auth") to merely indicate a successful bind (or receive
> the actual identity from the remote server using the authid control along
> with the bind or performing a whoami extop later, as already implemented).

Using a dummy DN here sounds OK.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 7 Quanah Gibson-Mount 2011-06-08 23:00:23 UTC
changed notes
changed state Active to Partial
Comment 8 Quanah Gibson-Mount 2011-06-22 00:54:34 UTC
changed notes
Comment 9 OpenLDAP project 2017-04-07 23:54:14 UTC
back-ldap ok in HEAD
back-meta TODO
back-ldap done in RE24
back-ldap redone in RE24
Comment 10 Quanah Gibson-Mount 2017-04-07 23:54:14 UTC
changed notes
moved from Incoming to Software Bugs