To retrieve the Active Directory/LDAP authentication configuration, send the following request:
GET https://<IA_IP_address>:<port_number>/config/v1/auth/x509/authorization
Note
To use this request, your user account must have sudo access.
Required headers:
Cookie: px=<token> X-Username: <user> X-Role: <role> Content type: application/json
Options
IA_IP_address—The IP address of the NDR appliance running the NDR API.
port_number—The port number of the NDR appliance running the NDR API.
token—This token authenticates the session. By default, the session times out after 24 hours.
user—The user ID.
role—The user's role.
Content-Type—Response should be in JSON.
Example
GET https://xxx.xxx.xxx.xxx:443/config/v1/auth/x509/authorization
Required headers:
Cookie: px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx X-Username: wheel X-Role: wheel
LDAP authentication configuration: Response
HTTP/1.1 [Response Code] [Response Message]
Server: [Server]
Date: [Date]
Content-Type: [Content Type]{
"encryptionType": "type",
"hosts": [hosts],
"baseDn": "dc=baseDN",
"bindDn": "cn=bindDN",
"bindPw": "",
"uiapiMappingField": "field",
"sudoMappingField": "field",
"usernameMappingField": "field",
"usernameSchemaAttribute": "field"
}Response fields
Response code—A standard HTTP response code.
200—Request successful; the configuration was successful.
Response message—A standard HTTP response message.
OK—Request successful; the configuration was successful.
Server—The server being used.
Date—Standard HTML date format.
Content type—The response format.
Example
HTTP/1.1 200 OK
Server: nginx
Date: Mon, 19 Aug 2019 09:38:41 GMT
Content-Type: application/json; charset=utf-8
{
"encryptionType": "",
"hosts": ["localhost:389"],
"baseDn": "dc=com,dc=fireeye",
"bindDn": "cn=admin",
"bindPw": "admin",
"uiapiMappingField": "",
"sudoMappingField": "",
"usernameMappingField": "x509-cert-subject-cn",
"usernameSchemaAttribute": ""
}cURL code sample: LDAP authentication configuration
curl -k -X GET --cookie "px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "Content-Type: application/json" -H "X-Username: wheel" -H "X-Role: wheel" https://xxx.xxx.xxx.xxx:443/config/v1/auth/x509/authorization
This cURL sample includes the following options:
-k—This option explicitly allows cURL to perform insecure SSL connections and transfers, which allows you to test your SSL connection without installing a CA certificate.-X GET—Specifies using the GET method.--cookie "px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"—This option specifies the authentication token for this session.-H "Content-Type: application/json"—Specifies that the response should be in JSON.-H "X-Username: wheel"—User name.-H "X-Role: wheel"—User role.https://xxx.xxx.xxx.xxx:443/config/v1/auth/x509/authorization—The LDAP request URL. Replacexxx.xxx.xxx.xxxwith the IP address of your NDR appliance.
Results
This example retrieves the LDAP authorization configuration.