ldapsdk icon indicating copy to clipboard operation
ldapsdk copied to clipboard

transactions support in unboundid ldap

Open sherry442 opened this issue 1 year ago • 3 comments

Hi,

Is unboundid ldap sdk has support for transaction handling? If yes, can you please explain from which version this is available.

Thanks & Regards, Sheriff

sherry442 avatar Dec 07 '23 05:12 sherry442

The LDAP SDK has support for standard LDAP transactions as described in RFC 5805, and this has been supported since 2010 when the RFC was made official. The Javadoc for the StartTransactionExtendedRequest class has an example that shows how to use it, but it consists of three main parts:

  1. Use the StartTransactionExtendedRequest to start a transaction in the server and get a transaction ID.
  2. Submit all of the write operations that are part of the transaction. Each of those requests should include a TransactionSpecificationRequestControl with the transaction ID obtained from the start transaction result.
  3. When you're ready, you can commit (or abort) the transaction with an EndTransactionExtendedRequest.

Note that this requires an LDAP server that provide support for standard LDAP transactions. The Ping Identity Directory Server definitely supports them. I believe that the most recent versions of OpenLDAP support them as well. I'm not sure about any other types of servers.

The Ping Identity Directory Server also supports a proprietary MultiUpdateExtendedRequest that allows you to submit all of the operations to process atomically in a single request so that you can avoid the multiple round trips required when using standard LDAP transactions.

dirmgr avatar Dec 07 '23 16:12 dirmgr

The Ping Identity Directory Server also supports a proprietary [MultiUpdateExtendedRequest](https://docs.ldap.com/ldap-sdk/docs/javadoc/index.html?com/unboundid/ldap/sdk/unboundidds/extensions/MultiUpdateExtendedRequest.html) that allows you to submit all of the operations to process atomically in a single request so that you can avoid the multiple round trips required when using standard LDAP transactions.

Will it work with AD/Samba ?

gredwhite avatar Dec 11 '23 08:12 gredwhite

As far as I'm aware, Active Directory does not have any support whatsoever for processing multiple operations as a single atomic unit.

dirmgr avatar Dec 11 '23 14:12 dirmgr