LDAP authentication API allows to check ldap user credentials and change LDAP settings.

Login

URI: https://hub.cfengine.com/ldap/login

Method: POST

Parameters:

Example response:

HTTP 200 Ok
{
    "success": true,
    "message": "You are successfully authenticated"
}

Get settings

URI: https://hub.cfengine.com/ldap/settings

Method: GET

Headers:

Example response:

HTTP 200 Ok
{
    "success": true,
    "data": {
        "domain_controller": "local.loc",
        "base_dn": "DC=local,DC=loc",
        "login_attribute": "cn",
        "port": 365,
        "use_ssl": false,
        "use_tls": false,
        "timeout": 5,
        "admin_username": "cn=admin,DC=local,DC=loc",
        "admin_password": "Password is set"
    }
}

Output:

Update settings

URI: https://hub.cfengine.com/ldap/settings

Method: PATCH

Note that the PATCH HTTP method only requires partial JSON for an update. Such as {“port”:3269} instead of the entire set of parameters.

Headers:

Parameters:

Example response:

HTTP 200 Ok
{
    "success": true,
    "message": "Settings successfully saved."
}