{
  "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": {
    "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
    },
    "source": [
      {
        "id": "help",
        "kind": "help",
        "revision": "ldapsearch usage (OpenLDAP client)",
        "evidence": "Search options:\n  -b basedn  base dn for search\n  -s scope   one of base, one, sub or children (search scope)\n  -z limit   size limit (in entries, or \"none\" or \"max\") for search\n  -LLL       print responses in LDIF format without comments\n             and version\n  -A         retrieve attribute names only (no values)\nCommon options:\n  -D binddn  bind DN\n  -H URI     LDAP Uniform Resource Identifier(s)\n  -W         prompt for bind password\n  -x         Simple authentication\n  -Z         Start TLS request (-ZZ to require successful response)\nusage: ldapsearch [options] [filter [attributes...]]\n  filter\tRFC 4515 compliant LDAP search filter\n  attributes\twhitespace-separated list of attribute descriptions\n"
      }
    ],
    "field": [
      {
        "id": "uri",
        "label": "Server URI",
        "description": "For example ldap://host or ldaps://host.",
        "type": "string",
        "option": [
          "-H"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "simple",
        "label": "Simple authentication",
        "type": "boolean",
        "option": [
          "-x"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "bind_dn",
        "label": "Bind DN",
        "type": "string",
        "option": [
          "-D"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "prompt_password",
        "label": "Prompt for bind password",
        "type": "boolean",
        "option": [
          "-W"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "starttls",
        "label": "Start TLS",
        "type": "boolean",
        "option": [
          "-Z"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "base",
        "label": "Base DN",
        "type": "string",
        "option": [
          "-b"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "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"
        ]
      },
      {
        "id": "size_limit",
        "label": "Size limit (entries)",
        "type": "integer",
        "option": [
          "-z"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "ldif_plain",
        "label": "Plain LDIF output",
        "description": "LDIF without comments and version.",
        "type": "boolean",
        "option": [
          "-LLL"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "names_only",
        "label": "Attribute names only",
        "type": "boolean",
        "option": [
          "-A"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "filter",
        "label": "Filter",
        "description": "RFC 4515 search filter, e.g. (uid=alice).",
        "type": "string",
        "position": 0,
        "sources": [
          "help"
        ]
      },
      {
        "id": "attributes",
        "label": "Attributes",
        "type": "string",
        "position": 1,
        "multiple": true,
        "sources": [
          "help"
        ]
      }
    ],
    "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"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "uri",
          "simple",
          "bind_dn",
          "prompt_password",
          "base",
          "scope",
          "filter",
          "attributes"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "starttls",
          "size_limit",
          "ldif_plain",
          "names_only"
        ]
      }
    ]
  }
}
