rfc:ldap_controls

PHP RFC: LDAP controls

Introduction

This RFC is an attempt at providing a complete and practical support for controls in php-ldap. People should be able to create controls, send them with a request, and get the controls from the results as well.

There is a patch for this from 2012: https://bugs.php.net/bug.php?id=61921

Proposal

In the actual state, controls can be set or get with ldap_get_option and ldap_set_option, in which case they are represented by associative arrays like this:

array(
 'oid' => <string>,
 'iscritical' => <boolean>,
 'value' => <ber encoded value>
)

The value is directly the ber encoded value, and PHP provides no easy way to encode/decode ber encoding directly.

The other way controls can be used is through ldap_control_paged_results/ldap_control_paged_result_response for the control for paged results.

Backward Incompatible Changes

ldap_control_paged_results and ldap_control_paged_result_response may get deprecated. Using ldap_get_option and ldap_set_option with LDAP_OPT_SERVER_CONTROLS or LDAP_OPT_CLIENT_CONTROLS may not work exactly the same.

Proposed PHP Version(s)

PHP 7.3 or PHP 8

RFC Impact

New Constants

Describe any new constants so they can be accurately and comprehensively explained in the PHP documentation.

Open Issues

Make sure there are no open issues when the vote starts!

Unaffected PHP Functionality

List existing areas/features of PHP that will not be changed by the RFC.

This helps avoid any ambiguity, shows that you have thought deeply about the RFC's impact, and helps reduces mail list noise.

Future Scope

Support for controls should be added directly in ldap_search and others.

Proposed Voting Choices

Include these so readers know where you are heading and can discuss the proposed voting options.

State whether this project requires a 2/3 or 50%+1 majority (see voting)

Patches and Tests

Links to any external patches and tests go here.

Implementation

After the project is implemented, this section should contain

  1. the version(s) it was merged to
  2. a link to the git commit(s)
  3. a link to the PHP manual entry for the feature
  4. a link to the language specification section (if any)

References

Rejected Features

Keep this updated with features that were discussed on the mail lists.

rfc/ldap_controls.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1