Resource URL: /platform/<<version=3>>/auth/providers/ldap

    Overview: This resource applies the standard collection pattern to LDAP
              providers.

     Methods: GET, POST

********************************************************************************

Method GET: List all LDAP providers.

       URL: GET /platform/<<version=3>>/auth/providers/ldap

Query arguments:
scope=<enum> Where <enum> is one of user, default, effective.  If specified as
             "effective" or not specified, all fields are returned.  If
             specified as "user", only fields with non-default values are
             shown.  If specified as "default", the original values are
             returned.

GET response body schema:
{
  "type": "object", 
  "properties": {
    "ldap": {
      "items": {
        "type": "object", 
        "description": "Specifies the properties for the LDAP authentication provider.", 
        "properties": {
          "cn_attribute": {
            "type": "string", 
            "description": "Specifies the canonical name."
          }, 
          "group_domain": {
            "type": "string", 
            "description": "Specifies the domain for this provider through which groups are qualified."
          }, 
          "netgroup_triple_attribute": {
            "type": "string", 
            "description": "Specifies the LDAP Netgroup Triple attribute."
          }, 
          "group_filter": {
            "type": "string", 
            "description": "Specifies the LDAP filter for group objects."
          }, 
          "system": {
            "type": [
              {
                "type": "boolean", 
                "description": "If true, indicates that this provider instance was created by OneFS and cannot be removed."
              }, 
              {
                "type": "null"
              }
            ]
          }, 
          "login_shell": {
            "type": "string", 
            "description": "Specifies the login shell path."
          }, 
          "unique_group_members_attribute": {
            "type": "string", 
            "description": "Sets the LDAP Unique Group Members attribute."
          }, 
          "base_dn": {
            "type": "string", 
            "description": "Specifies the root of the tree in which to search identities."
          }, 
          "group_base_dn": {
            "type": "string", 
            "description": "Specifies the distinguished name of the entry where LDAP searches for groups are started."
          }, 
          "netgroup_base_dn": {
            "type": "string", 
            "description": "Specifies the distinguished name of the entry where LDAP searches for netgroups are started."
          }, 
          "id": {
            "type": [
              {
                "type": "string", 
                "description": "Specifies the ID of the LDAP provider."
              }, 
              {
                "type": "null"
              }
            ]
          }, 
          "gid_attribute": {
            "type": "string", 
            "description": "Specifies the LDAP GID attribute."
          }, 
          "provider_domain": {
            "type": "string", 
            "description": "Specifies the provider domain."
          }, 
          "uid_attribute": {
            "type": "string", 
            "description": "Specifies the the LDAP UID Number attribute."
          }, 
          "member_of_attribute": {
            "type": "string", 
            "description": "Specifies the LDAP Query Member Of attribute, which performs reverse membership queries."
          }, 
          "bind_timeout": {
            "type": "integer", 
            "description": "Specifies the timeout in seconds when binding to an LDAP server."
          }, 
          "unfindable_users": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Specifies users that cannot be resolved by the provider."
          }, 
          "listable_groups": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Specifies the groups that can be viewed in the provider."
          }, 
          "bind_dn": {
            "type": "string", 
            "description": "Specifies the distinguished name for binding to the LDAP server."
          }, 
          "netgroup_search_scope": {
            "enum": [
              "default", 
              "base", 
              "onelevel", 
              "subtree", 
              "children"
            ], 
            "type": "string", 
            "description": "Specifies the depth from the base DN to perform LDAP searches."
          }, 
          "authentication": {
            "type": "boolean", 
            "description": "If true, enables authentication and identity management through the authentication provider."
          }, 
          "email_attribute": {
            "type": "string", 
            "description": "Specifies the LDAP Email attribute."
          }, 
          "restrict_findable": {
            "type": "boolean", 
            "description": "If true, checks the provider for filtered lists of findable and unfindable users and groups."
          }, 
          "restrict_listable": {
            "type": "boolean", 
            "description": "If true, checks the provider for filtered lists of listable and unlistable users and groups."
          }, 
          "server_uris": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Specifies the server URIs."
          }, 
          "status": {
            "type": [
              {
                "type": "string", 
                "description": "Specifies the status of the provider."
              }, 
              {
                "type": "null"
              }
            ]
          }, 
          "search_timeout": {
            "type": "integer", 
            "description": "Specifies the search timeout period in seconds."
          }, 
          "gecos_attribute": {
            "type": "string", 
            "description": "Specifies the LDAP GECOS attribute."
          }, 
          "home_directory_template": {
            "type": "string", 
            "description": "Specifies the path to the home directory template."
          }, 
          "findable_users": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Specifies the list of users that can be resolved."
          }, 
          "group_members_attribute": {
            "type": "string", 
            "description": "Specifies the LDAP Group Members attribute."
          }, 
          "crypt_password_attribute": {
            "type": "string", 
            "description": "Specifies the hashed password value."
          }, 
          "alternate_security_identities_attribute": {
            "type": "string", 
            "description": "Specifies the attribute name used when searching for alternate security identities."
          }, 
          "user_search_scope": {
            "enum": [
              "default", 
              "base", 
              "onelevel", 
              "subtree", 
              "children"
            ], 
            "type": "string", 
            "description": "Specifies the depth from the base DN to perform LDAP searches."
          }, 
          "user_domain": {
            "type": "string", 
            "description": "Specifies the domain for this provider through which users are qualified."
          }, 
          "unfindable_groups": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Specifies the groups that cannot be resolved by the provider."
          }, 
          "enumerate_users": {
            "type": "boolean", 
            "description": "If true, allows the provider to enumerate users."
          }, 
          "netgroup_members_attribute": {
            "type": "string", 
            "description": "Specifies the LDAP Netgroup Members attribute."
          }, 
          "unlistable_users": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Specifies a user that cannot be listed by the provider."
          }, 
          "homedir_attribute": {
            "type": "string", 
            "description": "Specifies the LDAP Homedir attribute."
          }, 
          "normalize_groups": {
            "type": "boolean", 
            "description": "Normalizes group names to lowercase before look up."
          }, 
          "groupnet": {
            "type": "string", 
            "description": "Groupnet identifier."
          }, 
          "enumerate_groups": {
            "type": "boolean", 
            "description": "If true, allows the provider to enumerate groups."
          }, 
          "shell_attribute": {
            "type": "string", 
            "description": "Specifies the the LDAP Shell attribute."
          }, 
          "search_scope": {
            "enum": [
              "base", 
              "onelevel", 
              "subtree", 
              "children"
            ], 
            "type": "string", 
            "description": "Specifies the default depth from the base DN to perform LDAP searches."
          }, 
          "ntlm_support": {
            "enum": [
              "all", 
              "v2only", 
              "none"
            ], 
            "type": "string", 
            "description": "Specifies which NTLM versions to support for users with NTLM-compatible credentials."
          }, 
          "name": {
            "type": [
              {
                "type": "string", 
                "description": "Specifies the name of the LDAP provider."
              }, 
              {
                "type": "null"
              }
            ]
          }, 
          "ignore_tls_errors": {
            "type": "boolean", 
            "description": "If true, continues over secure connections even if identity checks fail."
          }, 
          "user_base_dn": {
            "type": "string", 
            "description": "Specifies the distinguished name of the entry at which to start LDAP searches for users."
          }, 
          "unlistable_groups": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Specifies a group that cannot be listed by the provider."
          }, 
          "balance_servers": {
            "type": "boolean", 
            "description": "If true, connects the provider to a random server."
          }, 
          "listable_users": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Specifies the users that can be viewed in the provider."
          }, 
          "enabled": {
            "type": "boolean", 
            "description": "If true, enables the LDAP provider."
          }, 
          "nt_password_attribute": {
            "type": "string", 
            "description": "Specifies the LDAP NT Password attribute."
          }, 
          "check_online_interval": {
            "type": "integer", 
            "description": "Specifies the time in seconds between provider online checks."
          }, 
          "bind_mechanism": {
            "enum": [
              "simple", 
              "gssapi", 
              "digest-md5"
            ], 
            "type": "string", 
            "description": "Specifies which bind mechanism to use when connecting to an LDAP server. The only supported option is the 'simple' value."
          }, 
          "name_attribute": {
            "type": "string", 
            "description": "Specifies the LDAP UID attribute, which is used as the login name."
          }, 
          "require_secure_connection": {
            "type": "boolean", 
            "description": "Determines whether to continue over a non-TLS connection."
          }, 
          "netgroup_filter": {
            "type": "string", 
            "description": "Specifies the LDAP filter for netgroup objects."
          }, 
          "findable_groups": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Specifies the list of groups that can be resolved."
          }, 
          "user_filter": {
            "type": "string", 
            "description": "Specifies the LDAP filter for user objects."
          }, 
          "normalize_users": {
            "type": "boolean", 
            "description": "Normalizes user names to lowercase before look up."
          }, 
          "group_search_scope": {
            "enum": [
              "default", 
              "base", 
              "onelevel", 
              "subtree", 
              "children"
            ], 
            "type": "string", 
            "description": "Specifies the depth from the base DN to perform LDAP searches."
          }, 
          "certificate_authority_file": {
            "type": "string", 
            "description": "Specifies the path to the root certificates file."
          }, 
          "create_home_directory": {
            "type": "boolean", 
            "description": "Automatically create the home directory on the first login."
          }
        }
      }, 
      "type": "array"
    }
  }
}

********************************************************************************

Method POST: Create a new LDAP provider.

        URL: POST /platform/<<version=3>>/auth/providers/ldap

There are no query arguments for this method.

Required POST request body fields:
base_dn, server_uris, name

POST request body schema:
{
  "type": "object", 
  "description": "Specifies the properties for the LDAP authentication provider.", 
  "properties": {
    "cn_attribute": {
      "type": "string", 
      "description": "Specifies the canonical name."
    }, 
    "group_domain": {
      "type": "string", 
      "description": "Specifies the domain for this provider through which groups are qualified."
    }, 
    "netgroup_triple_attribute": {
      "type": "string", 
      "description": "Specifies the LDAP Netgroup Triple attribute."
    }, 
    "group_filter": {
      "type": "string", 
      "description": "Specifies the LDAP filter for group objects."
    }, 
    "login_shell": {
      "type": "string", 
      "description": "Specifies the login shell path."
    }, 
    "unique_group_members_attribute": {
      "type": "string", 
      "description": "Sets the LDAP Unique Group Members attribute."
    }, 
    "base_dn": {
      "required": true, 
      "type": "string", 
      "description": "Specifies the root of the tree in which to search identities."
    }, 
    "group_base_dn": {
      "type": "string", 
      "description": "Specifies the distinguished name of the entry where LDAP searches for groups are started."
    }, 
    "netgroup_base_dn": {
      "type": "string", 
      "description": "Specifies the distinguished name of the entry where LDAP searches for netgroups are started."
    }, 
    "gid_attribute": {
      "type": "string", 
      "description": "Specifies the LDAP GID attribute."
    }, 
    "provider_domain": {
      "type": "string", 
      "description": "Specifies the provider domain."
    }, 
    "uid_attribute": {
      "type": "string", 
      "description": "Specifies the the LDAP UID Number attribute."
    }, 
    "member_of_attribute": {
      "type": "string", 
      "description": "Specifies the LDAP Query Member Of attribute, which performs reverse membership queries."
    }, 
    "bind_timeout": {
      "type": "integer", 
      "description": "Specifies the timeout in seconds when binding to an LDAP server."
    }, 
    "unfindable_users": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Specifies users that cannot be resolved by the provider."
    }, 
    "listable_groups": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Specifies the groups that can be viewed in the provider."
    }, 
    "bind_dn": {
      "type": "string", 
      "description": "Specifies the distinguished name for binding to the LDAP server."
    }, 
    "netgroup_search_scope": {
      "enum": [
        "default", 
        "base", 
        "onelevel", 
        "subtree", 
        "children"
      ], 
      "type": "string", 
      "description": "Specifies the depth from the base DN to perform LDAP searches."
    }, 
    "authentication": {
      "type": "boolean", 
      "description": "If true, enables authentication and identity management through the authentication provider."
    }, 
    "bind_password": {
      "type": "string", 
      "description": "Specifies the password for the distinguished name for binding to the LDAP server."
    }, 
    "email_attribute": {
      "type": "string", 
      "description": "Specifies the LDAP Email attribute."
    }, 
    "restrict_findable": {
      "type": "boolean", 
      "description": "If true, checks the provider for filtered lists of findable and unfindable users and groups."
    }, 
    "restrict_listable": {
      "type": "boolean", 
      "description": "If true, checks the provider for filtered lists of listable and unlistable users and groups."
    }, 
    "server_uris": {
      "items": {
        "type": "string"
      }, 
      "required": true, 
      "type": "array", 
      "description": "Specifies the server URIs."
    }, 
    "search_timeout": {
      "type": "integer", 
      "description": "Specifies the search timeout period in seconds."
    }, 
    "gecos_attribute": {
      "type": "string", 
      "description": "Specifies the LDAP GECOS attribute."
    }, 
    "home_directory_template": {
      "type": "string", 
      "description": "Specifies the path to the home directory template."
    }, 
    "findable_users": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Specifies the list of users that can be resolved."
    }, 
    "group_members_attribute": {
      "type": "string", 
      "description": "Specifies the LDAP Group Members attribute."
    }, 
    "crypt_password_attribute": {
      "type": "string", 
      "description": "Specifies the hashed password value."
    }, 
    "alternate_security_identities_attribute": {
      "type": "string", 
      "description": "Specifies the attribute name used when searching for alternate security identities."
    }, 
    "user_search_scope": {
      "enum": [
        "default", 
        "base", 
        "onelevel", 
        "subtree", 
        "children"
      ], 
      "type": "string", 
      "description": "Specifies the depth from the base DN to perform LDAP searches."
    }, 
    "user_domain": {
      "type": "string", 
      "description": "Specifies the domain for this provider through which users are qualified."
    }, 
    "unfindable_groups": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Specifies the groups that cannot be resolved by the provider."
    }, 
    "enumerate_users": {
      "type": "boolean", 
      "description": "If true, allows the provider to enumerate users."
    }, 
    "netgroup_members_attribute": {
      "type": "string", 
      "description": "Specifies the LDAP Netgroup Members attribute."
    }, 
    "unlistable_users": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Specifies a user that cannot be listed by the provider."
    }, 
    "homedir_attribute": {
      "type": "string", 
      "description": "Specifies the LDAP Homedir attribute."
    }, 
    "normalize_groups": {
      "type": "boolean", 
      "description": "Normalizes group names to lowercase before look up."
    }, 
    "groupnet": {
      "type": "string", 
      "description": "Groupnet identifier."
    }, 
    "enumerate_groups": {
      "type": "boolean", 
      "description": "If true, allows the provider to enumerate groups."
    }, 
    "shell_attribute": {
      "type": "string", 
      "description": "Specifies the the LDAP Shell attribute."
    }, 
    "search_scope": {
      "enum": [
        "base", 
        "onelevel", 
        "subtree", 
        "children"
      ], 
      "type": "string", 
      "description": "Specifies the default depth from the base DN to perform LDAP searches."
    }, 
    "ntlm_support": {
      "enum": [
        "all", 
        "v2only", 
        "none"
      ], 
      "type": "string", 
      "description": "Specifies which NTLM versions to support for users with NTLM-compatible credentials."
    }, 
    "name": {
      "required": true, 
      "type": "string", 
      "description": "Specifies the name of the LDAP provider."
    }, 
    "ignore_tls_errors": {
      "type": "boolean", 
      "description": "If true, continues over secure connections even if identity checks fail."
    }, 
    "user_base_dn": {
      "type": "string", 
      "description": "Specifies the distinguished name of the entry at which to start LDAP searches for users."
    }, 
    "unlistable_groups": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Specifies a group that cannot be listed by the provider."
    }, 
    "balance_servers": {
      "type": "boolean", 
      "description": "If true, connects the provider to a random server."
    }, 
    "listable_users": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Specifies the users that can be viewed in the provider."
    }, 
    "enabled": {
      "type": "boolean", 
      "description": "If true, enables the LDAP provider."
    }, 
    "nt_password_attribute": {
      "type": "string", 
      "description": "Specifies the LDAP NT Password attribute."
    }, 
    "check_online_interval": {
      "type": "integer", 
      "description": "Specifies the time in seconds between provider online checks."
    }, 
    "bind_mechanism": {
      "enum": [
        "simple", 
        "gssapi", 
        "digest-md5"
      ], 
      "type": "string", 
      "description": "Specifies which bind mechanism to use when connecting to an LDAP server. The only supported option is the 'simple' value."
    }, 
    "name_attribute": {
      "type": "string", 
      "description": "Specifies the LDAP UID attribute, which is used as the login name."
    }, 
    "require_secure_connection": {
      "type": "boolean", 
      "description": "Determines whether to continue over a non-TLS connection."
    }, 
    "netgroup_filter": {
      "type": "string", 
      "description": "Specifies the LDAP filter for netgroup objects."
    }, 
    "findable_groups": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Specifies the list of groups that can be resolved."
    }, 
    "user_filter": {
      "type": "string", 
      "description": "Specifies the LDAP filter for user objects."
    }, 
    "normalize_users": {
      "type": "boolean", 
      "description": "Normalizes user names to lowercase before look up."
    }, 
    "group_search_scope": {
      "enum": [
        "default", 
        "base", 
        "onelevel", 
        "subtree", 
        "children"
      ], 
      "type": "string", 
      "description": "Specifies the depth from the base DN to perform LDAP searches."
    }, 
    "certificate_authority_file": {
      "type": "string", 
      "description": "Specifies the path to the root certificates file."
    }, 
    "create_home_directory": {
      "type": "boolean", 
      "description": "Automatically create the home directory on the first login."
    }
  }
}

POST response body schema:
{
  "type": "object", 
  "properties": {
    "id": {
      "required": true, 
      "type": "string", 
      "description": "ID of created item that can be used to refer to item in the collection-item resource path."
    }
  }
}
