Bug 2057063 - Add support for recursively deleting subentries
Summary: Add support for recursively deleting subentries
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: 389-ds-base
Version: 9.1
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: 9.1
Assignee: mreynolds
QA Contact: RHDS QE
David Voženílek
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-22 16:36 UTC by mreynolds
Modified: 2022-12-07 14:36 UTC (History)
7 users (show)

Fixed In Version: 389-ds-base-2.1.3-1.el9
Doc Type: Enhancement
Doc Text:
.Directory Server now supports recursive delete operations when using `ldapdelete` With this enhancement, Directory Server now supports the `Tree Delete Control [1.2.840.113556.1.4.805]` OpenLDAP control. As a result, you can use the `ldapdelete` utility to recursively delete subentries of a parent entry.
Clone Of:
Environment:
Last Closed: 2022-11-15 10:30:16 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker IDMDS-2028 0 None None None 2022-02-22 16:42:21 UTC
Red Hat Issue Tracker IDMDS-2047 0 None None None 2022-02-28 10:54:06 UTC
Red Hat Issue Tracker RHELPLAN-113069 0 None None None 2022-02-22 16:42:26 UTC
Red Hat Product Errata RHSA-2022:8162 0 None None None 2022-11-15 10:31:04 UTC

Description mreynolds 2022-02-22 16:36:33 UTC
Is your feature request related to a problem? Please describe.
If a parent entries contains any subentry object children there is no way to recursively delete such entry because neither the Subentries Control [1.3.6.1.4.1.4203.1.10.1] (used by OpenLDAP's ldapdelete) nor Tree Delete Control [1.2.840.113556.1.4.805] are supported and so the only resort is to delete such subentries first 1 by 1 before their parent entry can be deleted.

Describe the solution you'd like
Implementing support for Subentries Control [1.3.6.1.4.1.4203.1.10.1] as per RFC3676 should be pretty easy and straightforward and would allow OpenLDAP's ldapdelete pruning iteration to work properly.

Implementing support for Tree Delete Control [1.2.840.113556.1.4.805] as per draft-armijo-ldap-treedelete-02 is a bit more involved however it can be extremely useful for recursive delete operations on large subtrees mainly due to performance considerations.

Ideally it would be nice to have both implemented of course.

Describe alternatives you've considered
Currently the only alternative I know of is to grab the list of subentry objects DNs with ldapsearch and then feed them to ldapdelete with some slicing and dicing in between so those DNs are acceptable.

Comment 1 mreynolds 2022-02-22 16:37:41 UTC
Upstream ticket:

https://github.com/389ds/389-ds-base/issues/4970

Comment 17 errata-xmlrpc 2022-11-15 10:30:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: 389-ds-base security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:8162


Note You need to log in before you can comment on or make changes to this bug.