Issue 5505 - Attribute value for 'modifiersName' in case of overlays
Summary: Attribute value for 'modifiersName' in case of overlays
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: 2008-05-10 17:10 UTC by Michael Ströder
Modified: 2014-08-01 21:04 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 Michael Ströder 2008-05-10 17:10:56 UTC
Full_Name: Michael Str�der
Version: HEAD
OS: OpenSUSE Linux 10.2
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (84.163.119.62)


HI!

Just a feature request for convenience:

Would it be possible to set the value of attribute 'modifiersName' to the DN of
the overlays' configuration entry under cn=config if an entry was modified by an
overlay? In this case one would have a direct link to the configuration if
needed. Currently 'cn=<overlay name>' (e.g cn=Referential Integrity Overlay) is
added which does not refer to an existing entry at all.

Ciao, Michael.

Comment 1 ando@openldap.org 2008-05-10 20:28:06 UTC
> Just a feature request for convenience:
>
> Would it be possible to set the value of attribute 'modifiersName' to the
> DN of
> the overlays' configuration entry under cn=config if an entry was modified
> by an
> overlay? In this case one would have a direct link to the configuration if
> needed. Currently 'cn=<overlay name>' (e.g cn=Referential Integrity
> Overlay) is
> added which does not refer to an existing entry at all.

Technically, I don't see any problem, except that overlays (and software
modules, in general) do not hold a direct reference to their config
entry's DN, if any (e.g. when back-config is not in use, the data
structure is in place, but not in LDIF form; please correct me if I'm
wrong).  I wonder whether exposing such detail makes sense, or risks
breaking any security.  Probably I'm getting paranoid...

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it
---------------------------------------


Comment 2 ando@openldap.org 2008-05-24 09:57:36 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Enhancements
Comment 3 ando@openldap.org 2008-05-24 10:19:42 UTC
ando@sys-net.it wrote:
>> Just a feature request for convenience:
>>
>> Would it be possible to set the value of attribute 'modifiersName' to the
>> DN of
>> the overlays' configuration entry under cn=config if an entry was modified
>> by an
>> overlay? In this case one would have a direct link to the configuration if
>> needed. Currently 'cn=<overlay name>' (e.g cn=Referential Integrity
>> Overlay) is
>> added which does not refer to an existing entry at all.
> 
> Technically, I don't see any problem, except that overlays (and software
> modules, in general) do not hold a direct reference to their config
> entry's DN, if any (e.g. when back-config is not in use, the data
> structure is in place, but not in LDIF form; please correct me if I'm
> wrong).  I wonder whether exposing such detail makes sense, or risks
> breaking any security.  Probably I'm getting paranoid...

As a quick fix to your legitimate issue, I've added to HEAD the 
refint_modifiersname parameter that allows to customize the name used 
for internal modifications.  Please test.

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it
---------------------------------------


Comment 4 Quanah Gibson-Mount 2008-05-27 20:20:57 UTC
changed notes
Comment 5 ando@openldap.org 2008-09-27 11:34:15 UTC
moved from Software Enhancements to Development
Comment 6 ando@openldap.org 2008-10-30 22:39:28 UTC
changed state Test to Closed
Comment 7 ando@openldap.org 2008-10-30 22:39:55 UTC
changed state Closed to Test
Comment 8 ando@openldap.org 2009-02-21 10:11:43 UTC
The BackendDB structure could have a specific bd_modifiersName field for 
internal modifications; the slap_overinst structure could have a 
on_modifiersName as well.  Both could be configurable using a(n 
optional, single-valued) olcModifiersName attribute.

Internal writes would receive the modifiersName from:

- the application; or
- the overlay's olcModifiersName; or
- the database's olcModifiersName; or
- the database's rootdn; or
- ?!?  fail?  remain anonymous?

a call to

int
slap_get_modifiersName( Operation *op, BackendDB *be, slap_overinst *on,
	struct berval *mn, struct berval *nmn )
{
	*mn = op->o_dn;
	*nmn = op->o_ndn;

	if ( BER_BVISEMPTY( nmn ) ) {
		if ( on && !BER_BVISNULL( &on->on_modifiersName ) ) {
			*mn = on->on_modifiersName;
			*nmn = on->on_nmodifiersName;
		} else if ( be ) {
			if ( !BER_BVISNULL( &be->bd_modifiersName ) ) {
				*mn = be->bd_modifiersName;
				*nmn = be->bd_nmodifiersName;
			} else if ( !BER_BVISNULL( &be->bd_rootdn ) ) {
				*mn = be->bd_rootdn;
				*nmn = be->bd_rootndn;
			}
		}
	}

	return !BER_BVISEMPTY( nm );
}

would return the appropriate value, if any.

Probably a bit too much effort, but then multiple customizations that 
need to perform internal writes would be saved the effort and the 
dispersion of having to define their own configuration bit for a common 
feature.

p.


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Fax:     +39 0382 476497
Email:   ando@sys-net.it
-----------------------------------

Comment 9 Quanah Gibson-Mount 2009-11-18 17:07:02 UTC
changed state Test to Partial
Comment 10 OpenLDAP project 2014-08-01 21:04:58 UTC
partially addressed in HEAD/RE24