Description
The addDuoLDAPIdentitySource operation handles configuration related to DuoLDAPIdentitySource model.
This API call is not allowed on the standby unit in an HA pair.
HTTP request
POST /api/fdm/v6/object/duoldapidentitysources
Data Parameters
Parameter | Required | Type | Description | |||
---|---|---|---|---|---|---|
name | True | string | The name of the Identity Source | |||
description | False | string | Description for this Duo LDAP Object Field level constraints: must match pattern ^((?!;).)*$. (Note: Additional constraints might exist) |
|||
apiHostname | True | string | Hostname of the Duo LDAP server. This is the API hostname you obtain from your Duo account. The name starts with api- and ends with .duosecurity.com. Field level constraints: cannot be null, must be a valid host (FQDN or IP) or a list of valid hosts. (Note: Additional constraints might exist) |
|||
port | True | integer | The normal port is 636. Field level constraints: cannot be null, must be between 1 and 65535 (inclusive). (Note: Additional constraints might exist) |
|||
timeout | False | integer | Timeout in seconds to connect to Duo. The default timeout is 120 seconds while the minimum timeout is 1 second and the max timeout is 300 seconds. Field level constraints: must be between 1 and 300 (inclusive). (Note: Additional constraints might exist) |
|||
integrationKey | True | string | The Duo integration key. Obtain this key from your Duo account. Field level constraints: cannot be null, must match pattern ^[A-Z0-9]+$, length must be between 20 and 20 (inclusive). (Note: Additional constraints might exist) |
|||
secretKey | True | string | Secret key for Duo. Obtain this key from your Duo account. Field level constraints: cannot be null. (Note: Additional constraints might exist) |
|||
interface | False | object | Interface to connect to Duo, or null. If you do not specify an interface, the system uses the routing table to find the right interface. Allowed types are: [EtherChannelInterface, PhysicalInterface, SubInterface, VirtualTunnelInterface, VlanInterface] |
|||
type | True | string | duoldapidentitysource |
Example
curl -X POST \
--header "Accept: application/json" \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"apiHostname": "string",
"description": "string",
"id": "string",
"integrationKey": "string",
"interface": {
"id": "string",
"name": "string",
"type": "string",
"version": "string"
},
"name": "string",
"port": 0,
"secretKey": "string",
"timeout": 0,
"type": "duoldapidentitysource",
"version": "string"
}' \
"https://${HOST}:${PORT}/api/fdm/v6/object/duoldapidentitysources"
from bravado.requests_client import RequestsClient
from bravado.client import SwaggerClient
def get_client(host, token):
http_client = RequestsClient()
http_client.ssl_verify = False
http_client.set_api_key(
host,
"Bearer {}".format(token),
param_name="Authorization",
param_in="header"
)
return SwaggerClient.from_url(
"https://{}/apispec/ngfw.json".format(host),
http_client=http_client,
config={
"validate_responses": False,
"validate_swagger_spec": False
}
)
def add_duo_ldap_identity_source(client, body):
return client.DuoLDAPIdentitySource.addDuoLDAPIdentitySource(
body=body
).response().result
if __name__ == "__main__":
host = "ftd.example.com"
token = "access_token"
client = get_client(host, token)
body = {'apiHostname': 'string',
'description': 'string',
'integrationKey': 'string',
'interface': {'id': 'string',
'name': 'string',
'type': 'string',
'version': 'string'},
'name': 'string',
'port': 0,
'secretKey': 'string',
'timeout': 0,
'type': 'duoldapidentitysource'}
add_duo_ldap_identity_source(client, body)