Resource URL: /platform/<<version=3>>/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=3>>/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": "object", 
  "properties": {
    "ads": {
      "items": {
        "type": "object", 
        "description": "Specifies the properties for an ADS authentication provider.", 
        "properties": {
          "machine_name": {
            "type": "string", 
            "description": "Specifies name to join AD as."
          }, 
          "machine_account": {
            "type": [
              {
                "type": "string", 
                "description": "Specifies the SAM account name of the machine account."
              }, 
              {
                "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": [
              {
                "type": "integer", 
                "description": "Specifies the timeout for the domain controller for which the local node has affinity."
              }, 
              {
                "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": [
              {
                "type": "string", 
                "description": "Specifies the domain controller for which the node has affinity."
              }, 
              {
                "type": "null"
              }
            ]
          }, 
          "id": {
            "type": [
              {
                "type": "string", 
                "description": "Specifies the ID of the Active Directory provider instance."
              }, 
              {
                "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": [
              {
                "type": "string", 
                "description": "Specifies the fully qualified hostname stored in the machine account."
              }, 
              {
                "type": "null"
              }
            ]
          }, 
          "lookup_domains": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Limits user and group lookups to the specified domains."
          }, 
          "instance": {
            "type": "string", 
            "description": "Specifies Active Directory provider instnace."
          }, 
          "authentication": {
            "type": "boolean", 
            "description": "Enables authentication and identity management through the authentication provider."
          }, 
          "domain_offline_alerts": {
            "type": "boolean", 
            "description": "Sends an alert if the domain goes offline."
          }, 
          "include_trusted_domains": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Includes trusted domains when 'ignore_all_trusts' is set to true."
          }, 
          "groupnet": {
            "type": "string", 
            "description": "Groupnet identifier."
          }, 
          "restrict_findable": {
            "type": "boolean", 
            "description": "Check the provider for filtered lists of findable and unfindable users and groups."
          }, 
          "forest": {
            "type": [
              {
                "type": "string", 
                "description": "Specifies the Active Directory forest."
              }, 
              {
                "type": "null"
              }
            ]
          }, 
          "status": {
            "type": [
              {
                "type": "string", 
                "description": "Specifies the status of the provider."
              }, 
              {
                "type": "null"
              }
            ]
          }, 
          "login_shell": {
            "type": "string", 
            "description": "Specifies the login shell path."
          }, 
          "home_directory_template": {
            "type": "string", 
            "description": "Specifies the path to the home directory template."
          }, 
          "findable_users": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Sets list of users that can be resolved."
          }, 
          "ignored_trusted_domains": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Includes trusted domains when 'ignore_all_trusts' is set to false."
          }, 
          "lookup_users": {
            "type": "boolean", 
            "description": "Looks up AD users in other providers before allocating a user ID."
          }, 
          "unfindable_groups": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Specifies groups that cannot be resolved by the provider."
          }, 
          "site": {
            "type": [
              {
                "type": "string", 
                "description": "Specifies the site for the Active Directory."
              }, 
              {
                "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": [
              {
                "type": "integer", 
                "description": "Specifies the current time for the domain controllers."
              }, 
              {
                "type": "null"
              }
            ]
          }, 
          "name": {
            "type": [
              {
                "type": "string", 
                "description": "Specifies the Active Directory provider name."
              }, 
              {
                "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": {
            "type": "integer", 
            "description": "Specifies the time in seconds between provider online checks."
          }, 
          "unfindable_users": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Specifies users that cannot be resolved by the provider."
          }, 
          "netbios_domain": {
            "type": [
              {
                "type": "string", 
                "description": "Specifies the NetBIOS domain name associated with the machine account."
              }, 
              {
                "type": "null"
              }
            ]
          }, 
          "findable_groups": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Sets list of groups that can be resolved."
          }, 
          "machine_password_changes": {
            "type": "boolean", 
            "description": "Enables periodic changes of the machine password for security."
          }, 
          "primary_domain": {
            "type": [
              {
                "type": "string", 
                "description": "Specifies the AD domain to which the provider is joined."
              }, 
              {
                "type": "null"
              }
            ]
          }, 
          "create_home_directory": {
            "type": "boolean", 
            "description": "Automatically creates a home directory on the first login."
          }
        }
      }, 
      "type": "array"
    }
  }
}

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

Method POST: Create a new ADS provider.

        URL: POST /platform/<<version=3>>/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": {
    "machine_name": {
      "type": "string", 
      "description": "Specifies name to join AD as."
    }, 
    "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": {
      "type": "string", 
      "description": "Specifies the DNS search domain. Set this parameter if the DNS search domain has a unique name or address."
    }, 
    "node_dc_affinity_timeout": {
      "type": "integer", 
      "description": "Specifies the timeout for the domain controller for which the local node has affinity."
    }, 
    "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."
    }, 
    "lookup_domains": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Limits user and group lookups to the specified domains."
    }, 
    "instance": {
      "type": "string", 
      "description": "Specifies Active Directory provider instnace."
    }, 
    "authentication": {
      "type": "boolean", 
      "description": "Enables authentication and identity management through the authentication provider."
    }, 
    "domain_offline_alerts": {
      "type": "boolean", 
      "description": "Sends an alert if the domain goes offline."
    }, 
    "organizational_unit": {
      "type": "string", 
      "description": "Specifies the organizational unit."
    }, 
    "include_trusted_domains": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Includes trusted domains when 'ignore_all_trusts' is set to true."
    }, 
    "groupnet": {
      "type": "string", 
      "description": "Groupnet identifier."
    }, 
    "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": {
      "type": "string", 
      "description": "Specifies the domain controller for which the node has affinity."
    }, 
    "login_shell": {
      "type": "string", 
      "description": "Specifies the login shell path."
    }, 
    "home_directory_template": {
      "type": "string", 
      "description": "Specifies the path to the home directory template."
    }, 
    "findable_users": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Sets list of users that can be resolved."
    }, 
    "ignored_trusted_domains": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Includes trusted domains when 'ignore_all_trusts' is set to false."
    }, 
    "lookup_users": {
      "type": "boolean", 
      "description": "Looks up AD users in other providers before allocating a user ID."
    }, 
    "unfindable_groups": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Specifies groups that cannot be resolved by the provider."
    }, 
    "sfu_support": {
      "enum": [
        "none", 
        "rfc2307"
      ], 
      "type": "string", 
      "description": "Specifies whether to support RFC 2307 attributes on ADS domain controllers."
    }, 
    "user": {
      "required": true, 
      "type": "string", 
      "description": "Specifies the user name that has permission to join a machine to the given domain."
    }, 
    "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": {
      "required": true, 
      "type": "string", 
      "description": "Specifies the password used during domain join."
    }, 
    "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": {
      "type": "string", 
      "description": "Specifies the machine account name when creating a SAM account with Active Directory. The default cluster name is called 'default'."
    }, 
    "controller_time": {
      "type": "integer", 
      "description": "Specifies the current time for the domain controllers."
    }, 
    "name": {
      "required": true, 
      "type": "string", 
      "description": "Specifies the Active Directory provider name."
    }, 
    "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": {
      "type": "integer", 
      "description": "Specifies the time in seconds between provider online checks."
    }, 
    "unfindable_users": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Specifies users that cannot be resolved by the provider."
    }, 
    "findable_groups": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Sets list of groups that can be resolved."
    }, 
    "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": "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."
    }
  }
}
