Issue 9204 - slapo-constraint allows anyone to apply Relax control
Summary: slapo-constraint allows anyone to apply Relax control
Status: CONFIRMED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: overlays (show other issues)
Version: 2.4.49
Hardware: All All
: --- normal
Target Milestone: 2.7.0
Assignee: OpenLDAP project
URL:
Keywords:
Depends on: 6198 9211
Blocks:
  Show dependency treegraph
 
Reported: 2020-04-06 17:32 UTC by Ryan Tandy
Modified: 2023-11-02 17:26 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Ryan Tandy 2020-04-06 17:32:56 UTC
slapo-constraint doesn't limit who can use the Relax control, beyond the global limits applied by slapd. In practice, for many modifications this means any configured constraints are advisory only.

In my opinion this should be considered a bug, in design if not implementation. I expect many admins would not read the man page closely enough to realize the behaviour does technically adhere to the letter of what's written there.

Either slapd should require manage privileges for the Relax control globally, or slapo-constraint should perform a check for manage privilege itself, like slapo-unique does.

Quoting ando in https://bugs.openldap.org/show_bug.cgi?id=5705#c4:

> Well, a user with "manage" privileges on related data could bypass 
> constraints enforced by slapo-constraint(5) by using the "relax" 
> control.  The rationale is that a user with manage privileges could be 
> able to repair an entry that needs to violate a constraint for good 
> reasons.  Note that the user:
> 
> - must have enough privileges to do it (manage)
> 
> - must inform the DSA that intends to violate the constraint (by using 
> the control)

but such privileges are currently not being required.
Comment 1 Quanah Gibson-Mount 2020-04-06 20:43:08 UTC
Agreed, this seems like a serious oversight/bug that essentially violates the entire idea of having these types of constraints.