id = "openldap" name = "OpenLDAP" homepage = "https://www.openldap.org" description = "An open-source implementation of the Lightweight Directory Access Protocol." executables = ["ldapsearch", "ldapadd", "ldapmodify", "slapcat", "slaptest"] [dotfiles] # The official OpenLDAP administrator guide documents .ldaprc as the # per-user override for client configuration; system ldap.conf is not a user # dotfile. # https://www.openldap.org/doc/admin24/guide.pdf paths = ["~/.ldaprc"] secret = [] [commands] format = 1 label = "Search LDAP directory" description = "Run ldapsearch with simple or SASL authentication, a base DN, scope and filter. Search extensions, passwords on the command line and file-driven batch mode are outside this form." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = true, short_bundles = true } [[commands.source]] id = "help" kind = "help" revision = "ldapsearch usage (OpenLDAP client)" evidence = """ Search options: -b basedn base dn for search -s scope one of base, one, sub or children (search scope) -z limit size limit (in entries, or "none" or "max") for search -LLL print responses in LDIF format without comments and version -A retrieve attribute names only (no values) Common options: -D binddn bind DN -H URI LDAP Uniform Resource Identifier(s) -W prompt for bind password -x Simple authentication -Z Start TLS request (-ZZ to require successful response) usage: ldapsearch [options] [filter [attributes...]] filter RFC 4515 compliant LDAP search filter attributes whitespace-separated list of attribute descriptions """ [[commands.field]] id = "uri" label = "Server URI" description = "For example ldap://host or ldaps://host." type = "string" option = ["-H"] sources = ["help"] [[commands.field]] id = "simple" label = "Simple authentication" type = "boolean" option = ["-x"] sources = ["help"] [[commands.field]] id = "bind_dn" label = "Bind DN" type = "string" option = ["-D"] sources = ["help"] [[commands.field]] id = "prompt_password" label = "Prompt for bind password" type = "boolean" option = ["-W"] sources = ["help"] [[commands.field]] id = "starttls" label = "Start TLS" type = "boolean" option = ["-Z"] sources = ["help"] [[commands.field]] id = "base" label = "Base DN" type = "string" option = ["-b"] sources = ["help"] [[commands.field]] id = "scope" label = "Search scope" type = "enum" option = ["-s"] choices = [{ value = "base", label = "Base" }, { value = "one", label = "One level" }, { value = "sub", label = "Subtree" }, { value = "children", label = "Children" }] sources = ["help"] [[commands.field]] id = "size_limit" label = "Size limit (entries)" type = "integer" option = ["-z"] sources = ["help"] [[commands.field]] id = "ldif_plain" label = "Plain LDIF output" description = "LDIF without comments and version." type = "boolean" option = ["-LLL"] sources = ["help"] [[commands.field]] id = "names_only" label = "Attribute names only" type = "boolean" option = ["-A"] sources = ["help"] [[commands.field]] id = "filter" label = "Filter" description = "RFC 4515 search filter, e.g. (uid=alice)." type = "string" position = 0 sources = ["help"] [[commands.field]] id = "attributes" label = "Attributes" type = "string" position = 1 multiple = true sources = ["help"] [[commands.task]] id = "simple-search" label = "Search with simple bind" set = { simple = [true], prompt_password = [true], ldif_plain = [true] } fields = ["uri", "simple", "bind_dn", "prompt_password", "base", "scope", "filter", "attributes", "ldif_plain"] required = ["uri", "base"] [[commands.group]] id = "basic" label = "Basic" fields = ["uri", "simple", "bind_dn", "prompt_password", "base", "scope", "filter", "attributes"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["starttls", "size_limit", "ldif_plain", "names_only"]