Configure Astra to use an LDAP server
You need to select an LDAP server and configure Astra to use the server as an authentication provider. The configuration task consists of the steps described below. Each step includes a single REST API call.
1. Add a CA certificate
Perform the following REST API call to add a CA certificate to Astra.
|
This step is optional and only required if you want Astra and the LDAP to communicate over a secure channel using LDAPS. |
HTTP method | Path |
---|---|
POST |
/accounts/{account_id}/core/v1/certificates |
JSON input example
Note the following about the input parameters:
-
cert
is a JSON string containing a base64 encoded PKCS-11 formatted certificate (PEM encoded). -
isSelfSigned
should be set totrue
if the certificate is self-signed. The default isfalse
.
Curl example
JSON response example
2. Add the bind credentials
Perform the following REST API call to add the bind credentials.
HTTP method | Path |
---|---|
POST |
/accounts/{account_id}/core/v1/credentials |
JSON input example
Note the following about the input parameters:
-
bindDn
andpassword
are the base64 encoded bind credentials of the LDAP admin user that is able to connect and search the LDAP directory.bindDn
is the LDAP user's email address.
Curl example
JSON response example
Note the following the response parameters:
-
The
id
of the credential is used in subsequent workflow steps.
3. Retrieve the UUID of the LDAP setting
Perform the following REST API call to retrieve the UUID of the astra.account.ldap
setting that is included with Astra Control Center.
|
The curl example below uses a query parameter to filter the settings collection. You can instead remove the filter to get all the settings and then search for astra.account.ldap .
|
HTTP method | Path |
---|---|
GET |
/accounts/{account_id}/core/v1/settings |
Curl example
JSON response example
4. Update the LDAP setting
Perform the following REST API call to update the LDAP setting and complete the configuration. Use the id
value from the previous API call for the <SETTING_ID>
value in the URL path below.
|
You can issue a GET request for the specific setting first to see the configSchema. This will provide more information about the required fields in the configuration. |
HTTP method | Path |
---|---|
PUT |
/accounts/{account_id}/core/v1/settings/{setting_id} |
JSON input example
Note the following about the input parameters:
-
isEnabled
should be set totrue
or an error may occur. -
credentialId
is the id of the bind credential created earlier. -
secureMode
should be set toLDAP
orLDAPS
based on your configuration in the earlier step. -
Only 'Active Directory' is supported as a vendor.
Curl example
If the call is successful, the HTTP 204 response is returned.
5. Retrieve the LDAP setting
You can optionally perform the following REST API call to retrieve the LDAP settings and confirm the update.
HTTP method | Path |
---|---|
GET |
/accounts/{account_id}/core/v1/settings/{setting_id} |
Curl example
JSON response example
Locate the state
field in the response which will have one of the values in the table below.
State | Description |
---|---|
pending |
The configuration process is still active and not completed yet. |
valid |
Configuration has been completed successfully and |
error |
The LDAP configuration process failed. |