From 81bc6cd81b347f178a1a2b85e33b7101d1241c41 Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Mon, 05 Oct 2026 12:38:31 +0000
Subject: [PATCH] [#1155] Make the rest2ldap bind templates and HTTP Basic credentials work as documented (#1165)

---
 opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/authz/AuthenticationStrategies.java |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/authz/AuthenticationStrategies.java b/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/authz/AuthenticationStrategies.java
index 35b40e6..5b0655e 100644
--- a/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/authz/AuthenticationStrategies.java
+++ b/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/authz/AuthenticationStrategies.java
@@ -38,7 +38,8 @@
      *            {@link ConnectionFactory} to the LDAP server used to perform the bind operation.
      * @param bindDNTemplate
      *            Tempalte of the DN to use for the bind operation. The first %s will be replaced by the provided
-     *            authentication-id (i.e: uid=%s,dc=example,dc=com)
+     *            authentication-id (i.e: uid=%s,dc=example,dc=com). A template which is just %s takes the
+     *            authentication-id as the bind DN.
      * @param schema
      *            {@link Schema} used to validate the DN format.*
      * @return a new simple bind {@link AuthenticationStrategy}
@@ -85,7 +86,8 @@
      *            {@link ConnectionFactory} to the LDAP server to authenticate with.
      * @param authcIdTemplate
      *            Authentication identity template containing a single %s which will be replaced by the authenticating
-     *            user's name. (i.e: (u:%s)
+     *            user's name. (i.e: (u:%s). After a "dn:" prefix the template is a bind DN template: just %s takes the
+     *            user name as the DN, otherwise the user name is escaped as an attribute value.
      * @param schema
      *            Schema used to perform DN validation.
      * @return a new SASL plain bind {@link AuthenticationStrategy}

--
Gitblit v1.10.0