Closed jayhendren closed 5 months ago
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
cc @eryx12o45 @jtyr click here for bot help
After poking through the source code, it appears that subtree is indeed supported, but it's actually called "children" instead:
A little confusing, to me at least, since in OpenLDAP for instance, the "children" scope is equivalent to "subordinate", not "subtree".
So perhaps a documentation issue - maybe the docs here should mention that "children" is actually "subtree": https://docs.ansible.com/ansible/latest/collections/community/general/ldap_search_module.html#parameter-scope
That's definitely a good idea. Do you want to create a PR to improve the documentation? You can find it here: https://github.com/ansible-collections/community.general/blob/main/plugins/modules/ldap_search.py#L46. (If you want to change it, add a new item in description
- the items are paragraphs - and write something like Note that V(children) ...
.)
Absolutely. I created #8377.
Summary
The community.general.ldap_search module does not support the "subtree" scope. Although this module does support the "subordinate" scope, the "subordinate" scope is not supported by default on most popular LDAP server implementations, such as Active Directory or OpenLDAP.
Without support for the "subtree" scope, there is no way to use this module to search an entire LDAP tree on such LDAP servers. This limits searches to objects where the full DN or parent container of the object(s) being searched for are already known.
I am filing this as a bug report rather than a feature request since this seems like a bizarrely basic feature to be missing from an ldap search tool.
I believe this to be related to #4894 , although it seems that the OP in that issue may not have understood the difference between the "subordinate" and "subtree" scopes.
Issue Type
Bug Report
Component Name
ldap_search
Ansible Version
Community.general Version
Configuration
n/a
OS / Environment
n/a
Steps to Reproduce
n/a
Expected Results
n/a
Actual Results
n/a
Code of Conduct