Resource URL: /platform/<<version=1>>/auth/providers/ads

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

     Methods: GET, POST

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

Method GET: List all ADS providers.

       URL: GET /platform/<<version=1>>/auth/providers/ads

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": [
    {
      "additionalProperties": false, 
      "type": "object", 
      "description": "A list of errors that may be returned.", 
      "properties": {
        "errors": {
          "items": {
            "additionalProperties": false, 
            "type": "object", 
            "description": "An object describing a single error.", 
            "properties": {
              "field": {
                "type": "string", 
                "description": "The field with the error if applicable."
              }, 
              "message": {
                "type": "string", 
                "description": "The error message."
              }, 
              "code": {
                "type": "string", 
                "description": "The error code."
              }
            }
          }, 
          "type": "array"
        }
      }
    }, 
    {
      "additionalProperties": false, 
      "type": "object", 
      "properties": {
        "ads": {
          "minItems": 0, 
          "items": {
            "type": "object", 
            "description": "Specifies the properties for an ADS authentication provider.", 
            "properties": {
              "machine_account": {
                "type": [
                  {
                    "minLength": 0, 
                    "type": "string", 
                    "description": "Specifies the SAM account name of the machine account.", 
                    "maxLength": 255
                  }, 
                  {
                    "type": "null"
                  }
                ]
              }, 
              "ignore_all_trusts": {
                "type": "boolean", 
                "description": "If set to true, ignores all trusted domains."
              }, 
              "lookup_normalize_users": {
                "type": "boolean", 
                "description": "Normalize AD user names to lowercase before look up."
              }, 
              "system": {
                "type": [
                  {
                    "type": "boolean", 
                    "description": "If set to true, indicates that this provider instance was created by OneFS and cannot be removed."
                  }, 
                  {
                    "type": "null"
                  }
                ]
              }, 
              "node_dc_affinity_timeout": {
                "type": [
                  {
                    "minimum": 0, 
                    "type": "integer", 
                    "description": "Specifies the timeout for the domain controller for which the local node has affinity.", 
                    "maximum": 4294967295
                  }, 
                  {
                    "type": "null"
                  }
                ]
              }, 
              "allocate_uids": {
                "type": "boolean", 
                "description": "Allocates a user ID for an unmapped Active Directory (ADS) user. ADS users without UIDs can be proactively assigned a UID by the ID mapper. IF the ID mapper option is disabled, UIDs are not proactively assigned, and when an identify for a user does not include a UID, the system may allocate one."
              }, 
              "nss_enumeration": {
                "type": "boolean", 
                "description": "Enables the Active Directory provider to respond to 'getpwent' and 'getgrent' requests."
              }, 
              "node_dc_affinity": {
                "type": [
                  {
                    "minLength": 0, 
                    "type": "string", 
                    "description": "Specifies the domain controller for which the node has affinity.", 
                    "maxLength": 255
                  }, 
                  {
                    "type": "null"
                  }
                ]
              }, 
              "id": {
                "type": [
                  {
                    "minLength": 0, 
                    "type": "string", 
                    "description": "Specifies the ID of the Active Directory provider instance.", 
                    "maxLength": 255
                  }, 
                  {
                    "type": "null"
                  }
                ]
              }, 
              "machine_password_lifespan": {
                "minimum": 3600, 
                "type": "integer", 
                "description": "Sets maximum age of a password in seconds.", 
                "maximum": 31536000
              }, 
              "ldap_sign_and_seal": {
                "type": "boolean", 
                "description": "Enables encryption and signing on LDAP requests."
              }, 
              "hostname": {
                "type": [
                  {
                    "minLength": 0, 
                    "type": "string", 
                    "description": "Specifies the fully qualified hostname stored in the machine account.", 
                    "maxLength": 255
                  }, 
                  {
                    "type": "null"
                  }
                ]
              }, 
              "authentication": {
                "type": "boolean", 
                "description": "Enables authentication and identity management through the authentication provider."
              }, 
              "lookup_domains": {
                "minItems": 0, 
                "items": {
                  "minLength": 2, 
                  "type": "string", 
                  "maxLength": 255
                }, 
                "type": "array", 
                "description": "Limits user and group lookups to the specified domains.", 
                "maxItems": 4294967295
              }, 
              "domain_offline_alerts": {
                "type": "boolean", 
                "description": "Sends an alert if the domain goes offline."
              }, 
              "include_trusted_domains": {
                "minItems": 0, 
                "items": {
                  "minLength": 2, 
                  "type": "string", 
                  "maxLength": 255
                }, 
                "type": "array", 
                "description": "Includes trusted domains when 'ignore_all_trusts' is set to true.", 
                "maxItems": 4294967295
              }, 
              "restrict_findable": {
                "type": "boolean", 
                "description": "Check the provider for filtered lists of findable and unfindable users and groups."
              }, 
              "forest": {
                "type": [
                  {
                    "minLength": 0, 
                    "type": "string", 
                    "description": "Specifies the Active Directory forest.", 
                    "maxLength": 255
                  }, 
                  {
                    "type": "null"
                  }
                ]
              }, 
              "status": {
                "type": [
                  {
                    "minLength": 0, 
                    "type": "string", 
                    "description": "Specifies the status of the provider.", 
                    "maxLength": 255
                  }, 
                  {
                    "type": "null"
                  }
                ]
              }, 
              "login_shell": {
                "minLength": 0, 
                "type": "string", 
                "description": "Specifies the login shell path.", 
                "maxLength": 4096
              }, 
              "home_directory_template": {
                "minLength": 0, 
                "type": "string", 
                "description": "Specifies the path to the home directory template.", 
                "maxLength": 4096
              }, 
              "findable_users": {
                "minItems": 0, 
                "items": {
                  "minLength": 1, 
                  "type": "string", 
                  "maxLength": 256
                }, 
                "type": "array", 
                "description": "Sets list of users that can be resolved.", 
                "maxItems": 4294967295
              }, 
              "ignored_trusted_domains": {
                "minItems": 0, 
                "items": {
                  "minLength": 2, 
                  "type": "string", 
                  "maxLength": 255
                }, 
                "type": "array", 
                "description": "Includes trusted domains when 'ignore_all_trusts' is set to false.", 
                "maxItems": 4294967295
              }, 
              "lookup_users": {
                "type": "boolean", 
                "description": "Looks up AD users in other providers before allocating a user ID."
              }, 
              "unfindable_groups": {
                "minItems": 0, 
                "items": {
                  "minLength": 1, 
                  "type": "string", 
                  "maxLength": 256
                }, 
                "type": "array", 
                "description": "Specifies groups that cannot be resolved by the provider.", 
                "maxItems": 4294967295
              }, 
              "site": {
                "type": [
                  {
                    "minLength": 1, 
                    "type": "string", 
                    "description": "Specifies the site for the Active Directory.", 
                    "maxLength": 63
                  }, 
                  {
                    "type": "null"
                  }
                ]
              }, 
              "sfu_support": {
                "enum": [
                  "none", 
                  "rfc2307"
                ], 
                "type": "string", 
                "description": "Specifies whether to support RFC 2307 attributes on ADS domain controllers."
              }, 
              "allocate_gids": {
                "type": "boolean", 
                "description": "Allocates an ID for an unmapped Active Directory (ADS) group. ADS groups without GIDs can be proactively assigned a GID by the ID mapper. If the ID mapper option is disabled, GIDs are not proactively assigned, and when a primary group for a user does not include a GID, the system may allocate one. "
              }, 
              "lookup_groups": {
                "type": "boolean", 
                "description": "Looks up AD groups in other providers before allocating a group ID."
              }, 
              "store_sfu_mappings": {
                "type": "boolean", 
                "description": "Stores SFU mappings permanently in the ID mapper."
              }, 
              "controller_time": {
                "type": [
                  {
                    "minimum": 0, 
                    "type": "integer", 
                    "description": "Specifies the current time for the domain controllers.", 
                    "maximum": 4294967295
                  }, 
                  {
                    "type": "null"
                  }
                ]
              }, 
              "name": {
                "type": [
                  {
                    "minLength": 1, 
                    "type": "string", 
                    "description": "Specifies the Active Directory provider name.", 
                    "maxLength": 64
                  }, 
                  {
                    "type": "null"
                  }
                ]
              }, 
              "lookup_normalize_groups": {
                "type": "boolean", 
                "description": "Normalizes AD group names to lowercase before look up."
              }, 
              "assume_default_domain": {
                "type": "boolean", 
                "description": "Enables lookup of unqualified user names in the primary domain."
              }, 
              "check_online_interval": {
                "minimum": 60, 
                "type": "integer", 
                "description": "Specifies the time in seconds between provider online checks.", 
                "maximum": 86400
              }, 
              "unfindable_users": {
                "minItems": 0, 
                "items": {
                  "minLength": 1, 
                  "type": "string", 
                  "maxLength": 256
                }, 
                "type": "array", 
                "description": "Specifies users that cannot be resolved by the provider.", 
                "maxItems": 4294967295
              }, 
              "netbios_domain": {
                "type": [
                  {
                    "minLength": 1, 
                    "type": "string", 
                    "description": "Specifies the NetBIOS domain name associated with the machine account.", 
                    "maxLength": 15
                  }, 
                  {
                    "type": "null"
                  }
                ]
              }, 
              "findable_groups": {
                "minItems": 0, 
                "items": {
                  "minLength": 1, 
                  "type": "string", 
                  "maxLength": 256
                }, 
                "type": "array", 
                "description": "Sets list of groups that can be resolved.", 
                "maxItems": 4294967295
              }, 
              "machine_password_changes": {
                "type": "boolean", 
                "description": "Enables periodic changes of the machine password for security."
              }, 
              "primary_domain": {
                "type": [
                  {
                    "minLength": 2, 
                    "type": "string", 
                    "description": "Specifies the AD domain to which the provider is joined.", 
                    "maxLength": 255
                  }, 
                  {
                    "type": "null"
                  }
                ]
              }, 
              "create_home_directory": {
                "type": "boolean", 
                "description": "Automatically creates a home directory on the first login."
              }
            }
          }, 
          "type": "array", 
          "maxItems": 4294967295
        }
      }
    }
  ]
}

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

Method POST: Create a new ADS provider.

        URL: POST /platform/<<version=1>>/auth/providers/ads

There are no query arguments for this method.

Required POST request body fields:
user, password, name

POST request body schema:
{
  "type": "object", 
  "description": "Specifies the properties for an ADS authentication provider.", 
  "properties": {
    "ignore_all_trusts": {
      "type": "boolean", 
      "description": "If set to true, ignores all trusted domains."
    }, 
    "lookup_normalize_users": {
      "type": "boolean", 
      "description": "Normalize AD user names to lowercase before look up."
    }, 
    "dns_domain": {
      "minLength": 2, 
      "type": "string", 
      "description": "Specifies the DNS search domain. Set this parameter if the DNS search domain has a unique name or address.", 
      "maxLength": 255
    }, 
    "node_dc_affinity_timeout": {
      "minimum": 0, 
      "type": "integer", 
      "description": "Specifies the timeout for the domain controller for which the local node has affinity.", 
      "maximum": 4294967295
    }, 
    "allocate_uids": {
      "type": "boolean", 
      "description": "Allocates a user ID for an unmapped Active Directory (ADS) user. ADS users without UIDs can be proactively assigned a UID by the ID mapper. IF the ID mapper option is disabled, UIDs are not proactively assigned, and when an identify for a user does not include a UID, the system may allocate one."
    }, 
    "nss_enumeration": {
      "type": "boolean", 
      "description": "Enables the Active Directory provider to respond to 'getpwent' and 'getgrent' requests."
    }, 
    "machine_password_lifespan": {
      "minimum": 3600, 
      "type": "integer", 
      "description": "Sets maximum age of a password in seconds.", 
      "maximum": 31536000
    }, 
    "kerberos_nfs_spn": {
      "type": "boolean", 
      "description": "Determines if connecting through NFS with Kerberos."
    }, 
    "ldap_sign_and_seal": {
      "type": "boolean", 
      "description": "Enables encryption and signing on LDAP requests."
    }, 
    "authentication": {
      "type": "boolean", 
      "description": "Enables authentication and identity management through the authentication provider."
    }, 
    "lookup_domains": {
      "minItems": 0, 
      "items": {
        "minLength": 2, 
        "type": "string", 
        "maxLength": 255
      }, 
      "type": "array", 
      "description": "Limits user and group lookups to the specified domains.", 
      "maxItems": 4294967295
    }, 
    "domain_offline_alerts": {
      "type": "boolean", 
      "description": "Sends an alert if the domain goes offline."
    }, 
    "organizational_unit": {
      "minLength": 0, 
      "type": "string", 
      "description": "Specifies the organizational unit.", 
      "maxLength": 255
    }, 
    "include_trusted_domains": {
      "minItems": 0, 
      "items": {
        "minLength": 2, 
        "type": "string", 
        "maxLength": 255
      }, 
      "type": "array", 
      "description": "Includes trusted domains when 'ignore_all_trusts' is set to true.", 
      "maxItems": 4294967295
    }, 
    "restrict_findable": {
      "type": "boolean", 
      "description": "Check the provider for filtered lists of findable and unfindable users and groups."
    }, 
    "kerberos_hdfs_spn": {
      "type": "boolean", 
      "description": "Determines if connecting through HDFS with Kerberos."
    }, 
    "node_dc_affinity": {
      "minLength": 0, 
      "type": "string", 
      "description": "Specifies the domain controller for which the node has affinity.", 
      "maxLength": 255
    }, 
    "login_shell": {
      "minLength": 0, 
      "type": "string", 
      "description": "Specifies the login shell path.", 
      "maxLength": 4096
    }, 
    "home_directory_template": {
      "minLength": 0, 
      "type": "string", 
      "description": "Specifies the path to the home directory template.", 
      "maxLength": 4096
    }, 
    "findable_users": {
      "minItems": 0, 
      "items": {
        "minLength": 1, 
        "type": "string", 
        "maxLength": 256
      }, 
      "type": "array", 
      "description": "Sets list of users that can be resolved.", 
      "maxItems": 4294967295
    }, 
    "ignored_trusted_domains": {
      "minItems": 0, 
      "items": {
        "minLength": 2, 
        "type": "string", 
        "maxLength": 255
      }, 
      "type": "array", 
      "description": "Includes trusted domains when 'ignore_all_trusts' is set to false.", 
      "maxItems": 4294967295
    }, 
    "lookup_users": {
      "type": "boolean", 
      "description": "Looks up AD users in other providers before allocating a user ID."
    }, 
    "unfindable_groups": {
      "minItems": 0, 
      "items": {
        "minLength": 1, 
        "type": "string", 
        "maxLength": 256
      }, 
      "type": "array", 
      "description": "Specifies groups that cannot be resolved by the provider.", 
      "maxItems": 4294967295
    }, 
    "sfu_support": {
      "enum": [
        "none", 
        "rfc2307"
      ], 
      "type": "string", 
      "description": "Specifies whether to support RFC 2307 attributes on ADS domain controllers."
    }, 
    "user": {
      "minLength": 0, 
      "required": true, 
      "type": "string", 
      "description": "Specifies the user name that has permission to join a machine to the given domain.", 
      "maxLength": 256
    }, 
    "allocate_gids": {
      "type": "boolean", 
      "description": "Allocates an ID for an unmapped Active Directory (ADS) group. ADS groups without GIDs can be proactively assigned a GID by the ID mapper. If the ID mapper option is disabled, GIDs are not proactively assigned, and when a primary group for a user does not include a GID, the system may allocate one. "
    }, 
    "password": {
      "minLength": 0, 
      "required": true, 
      "type": "string", 
      "description": "Specifies the password used during domain join.", 
      "maxLength": 255
    }, 
    "lookup_groups": {
      "type": "boolean", 
      "description": "Looks up AD groups in other providers before allocating a group ID."
    }, 
    "store_sfu_mappings": {
      "type": "boolean", 
      "description": "Stores SFU mappings permanently in the ID mapper."
    }, 
    "account": {
      "minLength": 0, 
      "type": "string", 
      "description": "Specifies the machine account name when creating a SAM account with Active Directory. The default cluster name is called 'default'.", 
      "maxLength": 255
    }, 
    "controller_time": {
      "minimum": 0, 
      "type": "integer", 
      "description": "Specifies the current time for the domain controllers.", 
      "maximum": 4294967295
    }, 
    "name": {
      "minLength": 1, 
      "required": true, 
      "type": "string", 
      "description": "Specifies the Active Directory provider name.", 
      "maxLength": 64
    }, 
    "lookup_normalize_groups": {
      "type": "boolean", 
      "description": "Normalizes AD group names to lowercase before look up."
    }, 
    "assume_default_domain": {
      "type": "boolean", 
      "description": "Enables lookup of unqualified user names in the primary domain."
    }, 
    "check_online_interval": {
      "minimum": 60, 
      "type": "integer", 
      "description": "Specifies the time in seconds between provider online checks.", 
      "maximum": 86400
    }, 
    "unfindable_users": {
      "minItems": 0, 
      "items": {
        "minLength": 1, 
        "type": "string", 
        "maxLength": 256
      }, 
      "type": "array", 
      "description": "Specifies users that cannot be resolved by the provider.", 
      "maxItems": 4294967295
    }, 
    "findable_groups": {
      "minItems": 0, 
      "items": {
        "minLength": 1, 
        "type": "string", 
        "maxLength": 256
      }, 
      "type": "array", 
      "description": "Sets list of groups that can be resolved.", 
      "maxItems": 4294967295
    }, 
    "machine_password_changes": {
      "type": "boolean", 
      "description": "Enables periodic changes of the machine password for security."
    }, 
    "create_home_directory": {
      "type": "boolean", 
      "description": "Automatically creates a home directory on the first login."
    }
  }
}

POST response body schema:
{
  "type": [
    {
      "additionalProperties": false, 
      "type": "object", 
      "description": "A list of errors that may be returned.", 
      "properties": {
        "errors": {
          "items": {
            "additionalProperties": false, 
            "type": "object", 
            "description": "An object describing a single error.", 
            "properties": {
              "field": {
                "type": "string", 
                "description": "The field with the error if applicable."
              }, 
              "message": {
                "type": "string", 
                "description": "The error message."
              }, 
              "code": {
                "type": "string", 
                "description": "The error code."
              }
            }
          }, 
          "type": "array"
        }
      }
    }, 
    {
      "type": "object", 
      "properties": {
        "id": {
          "minLength": 0, 
          "required": true, 
          "type": "string", 
          "description": "ID of created item that can be used to refer to item in the collection-item resource path.", 
          "maxLength": 255
        }
      }
    }
  ]
}
