Issue 7649 - Feature request: numSubordinates attribute
Summary: Feature request: numSubordinates attribute
Status: UNCONFIRMED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- enhancement
Target Milestone: 2.7.0
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-26 14:45 UTC by Gavin Henry
Modified: 2023-10-12 17:10 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 Gavin Henry 2013-07-26 14:45:53 UTC
Full_Name: Gavin Henry
Version: 
OS: 
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (212.159.59.85)
Submitted by: ghenry


Dear all,

It would be great if we supported a numSubordinates attribute so you can request
a count of the number of entries say at a base of
ou=suretec.hosted.surevoip.co.uk,ou=Contacts,dc=surevoip,dc=co,dc=uk rather than
retrieve them all and count them up. I know there is a contrib noopsrch overlay
that others are using. 

The only reference I can see that other directories has is based on this:

http://tools.ietf.org/html/draft-ietf-boreham-numsubordinates-01

Thanks,

Gavin.
Comment 1 Howard Chu 2013-07-26 15:03:33 UTC
ghenry@OpenLDAP.org wrote:
> Full_Name: Gavin Henry
> Version:
> OS:
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (212.159.59.85)
> Submitted by: ghenry
>
>
> Dear all,
>
> It would be great if we supported a numSubordinates attribute so you can request
> a count of the number of entries say at a base of
> ou=suretec.hosted.surevoip.co.uk,ou=Contacts,dc=surevoip,dc=co,dc=uk rather than
> retrieve them all and count them up. I know there is a contrib noopsrch overlay
> that others are using.
>
> The only reference I can see that other directories has is based on this:
>
> http://tools.ietf.org/html/draft-ietf-boreham-numsubordinates-01

Need to think about this some more. While it's true that the back-hdb/mdb 
backends already have this information and can easily provide it, it 
introduces new security concerns that sysadmins would have to be aware of. 
I.e., clients could use numsubordinates to discover the existence of entries 
they are not permitted to access. Which means sysadmins would need to add new 
ACLs specifically for controlling access to numsubordinates.

If we just add the feature, and sysadmins aren't aware it was added, then they 
have a security hole.

-- 
   -- 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 2 Gavin Henry 2013-07-26 15:08:54 UTC
> Need to think about this some more. While it's true that the back-hdb/mdb
> backends already have this information and can easily provide it, it
> introduces new security concerns that sysadmins would have to be aware of.
> I.e., clients could use numsubordinates to discover the existence of entries
> they are not permitted to access. Which means sysadmins would need to add
> new ACLs specifically for controlling access to numsubordinates.
>
> If we just add the feature, and sysadmins aren't aware it was added, then
> they have a security hole.

That's very true. If it's an operational attribute wouldn't normal
ACLs apply? For example if you are only permitted to see "self" in
ou=Users, then you shouldn't be able to request numSubordinates on
ou=Users or if you do you only see 1.

Thanks.

-- 
Kind Regards,

Gavin Henry.
Managing Director.

T +44 (0) 1224 279484
M +44 (0) 7930 323266
F +44 (0) 1224 824887
E ghenry@suretec.co.uk

Open Source. Open Solutions(tm).

http://www.suretecsystems.com/

Suretec Systems is a limited company registered in Scotland. Registered
number: SC258005. Registered office: 24 Cormack Park, Rothienorman,
Inverurie,
Aberdeenshire, AB51 8GL.

Subject to disclaimer at http://www.suretecgroup.com/disclaimer.html

Do you know we have our own VoIP provider called SureVoIP? See
http://www.surevoip.co.uk

Did you see our API? http://www.surevoip.co.uk/api

Comment 3 Michael Ströder 2013-07-26 15:47:03 UTC
On Fri, 26 Jul 2013 15:03:41 GMT hyc@symas.com wrote
> Need to think about this some more. While it's true that the back-hdb/mdb 
> backends already have this information and can easily provide it, it 
> introduces new security concerns that sysadmins would have to be aware of. 
> I.e., clients could use numsubordinates to discover the existence of entries 
> they are not permitted to access. Which means sysadmins would need to add new
> ACLs specifically for controlling access to numsubordinates.
> 
> If we just add the feature, and sysadmins aren't aware it was added, then
> they  have a security hole.

True, but not really a new security consideration for an admin.
We already have 'hasSubordinates' anyway.
And for whatever new operational attribute introduced in former times the admin
was considered responsible to restrict access by appropriate ACLs.

I also find such an attribute to be very useful in some use-cases.

Another aspect is how searches like (numSubordinates>=1) can be efficiently
handled, e.g. in cases where most entries will have numSubordinates=0. Yes, I
admit I use it for count-like searches where using no-op search control is too
expensive.

Ciao, Michael.


Comment 4 Howard Chu 2013-07-26 20:07:45 UTC
moved from Incoming to Software Enhancements