- Technology stack
- Architecture of the Solution
- Installing and Configuring MULTIDIRECTORY
- Configuring Kerberos in the MULTIDIRECTORY Web Interface
- Configuring DNS in the MULTIDIRECTORY Web Interface
- DHCP Configuration
- Domain Trust Configuration
- Group Policy
- Connecting MULTIFACTOR Self-Service Portal to MULTIDIRECTORY
- User, Group, and Resource Management
- Connecting to MULTIFACTOR
- Access Policies
- LDAP Schema
- LDAP Logging Configuration
- Password Policies
- Role and Permission Configuration
- LDAP Authentication in Ansible AWX
- LDAP Authentication in ArgoCD
- LDAP Authentication in GitLab
- LDAP Authentication in GitFlic
- LDAP Authentication in Jenkins
- LDAP Authentication in Harbor
- LDAP Authentication in Nexus
- LDAP Authentication in PostgreSQL
- LDAP Authentication in Rancher
- LDAP Authentication in Proxmox VE
- LDAP Authentication in SpaceVM
- LDAP Authentication in Tantor
- LDAP Authentication in Shturval
- LDAP Authentication in zVirt
- LDAP Authentication in GLPI
MULTIDIRECTORY API Guide
This comprehensive guide covers the use of the MULTIDIRECTORY API, combining updated content from legacy documentation with newly added capabilities.
API Overview
The MULTIDIRECTORY API uses standard HTTP methods for resource interaction:
- GET – retrieve information
- POST – create a new entity
- PUT – fully update an existing entity
- DELETE – remove an entity
- PATCH – partially update an existing entity
Note:
To access the API documentation for your MULTIDIRECTORY instance, use one of the following URLs:
- https://<your-multidirectory-address>/api/docs
- https://<your-multidirectory-address>/api/redoc
Authentication
Authentication Token
Endpoint: POST /api/auth/token/get
Note:
The login identifier can be provided in any of the following formats:
- DN (Distinguished Name)
- UPN (User Principal Name)
- sAMAccountName
Example request to obtain an authentication token:
{
"username": "<string>",
"password": "<string>"
}
Example Response.
{
"access_token": "123",
"refresh_token": "456",
"type": "bearer"
}
Token Lifespan:
- access_token: 20 minutes
- refresh_token: 14 days
New Authentication Endpoints (Session-Based)
- POST /auth/ – logs in (accepts username and password); returns session cookie and user session
- DELETE /auth/ – logs out (destroys current session)
- GET /auth/me – retrieves current user’s profile data
- PATCH /auth/user/password – resets or update user password
- GET /auth/setup – checks if initial setup is required
- POST /auth/setup – performs initial system setup (create base directory structure and default policies)
LDAP API
Core directory operations are available via both the legacy and new APIs.
Create an objectExample request to create objects:
POST /entry/add
{
"entry": "ou=your_ou,ou=users,dc=your.domain,dc=ru",
"attributes": [
{
"type": "objectClass",
"vals": [ "top", "container", "organizationUnit" ]
}
],
"password": "you_password"
}
Description
entry – the Distinguished Name (DN) of the LDAP entry to be created. attributes – an array of objects, each defining an LDAP attribute:
- type – the LDAP attribute name (e.g., objectClass, cn, sAMAccountName).
- vals – an array of values for the attribute.
Example: [«top», «container», «organizationalUnit»] defines the entry’s structural hierarchy and capabilities.password – optional. Required only if the entry represents a user account; sets the initial password.
Update an Object
Example request to update an entry:
PATCH /entry/update
{
"object": "cn=your.object,ou=users,dc=your_domain,dc=ru",
"changes": [
{
"operation": 0,
"modification": {
"type": "office",
"vals": [ "TEST" ]
}
},
{
"operation": 1,
"modification": {
"type": "memberOf",
"vals": [ "cn=old.group,ou=groups,dc=your_domain,dc=ru" ]
}
},
{
"operation": 2,
"modification": {
"type": "description",
"vals": [ "Updated description" ]
}
}
]
}
Description
object – the Distinguished Name (DN) of the target LDAP object to be modified (e.g., a user account). The request body consists of one or more modification blocks, each specifying an operation type and attribute changes:
First block (operation: 0) – Adds a new attribute:
Attribute: office
Value: «TEST»Second block (operation: 1) – Deletes a specific value from an existing attribute:
Removes group membership cn=old.group,ou=groups,dc=your_domain,dc=ru from the memberOf attribute.Third block (operation: 2) – Replaces the current value of an attribute:
Attribute: description
New value: «Updated description»
Delete an Object
Example request to delete an object:
DELETE /entry/delete
{
"entry": "cn=your.object,ou=users,dc=your_domain,dc=ru"
}
Description
entry — The Distinguished Name (DN) of the object to be deleted (e.g., a user or group)
Search for objects
Example request to search for an object:
POST /entry/search
{
"base_object": "ou=users,dc=your_domain,dc=ru",
"scope": 1,
"deref_aliases": 0,
"size_limit": 10,
"time_limit": 0,
"types_only": false,
"filter": "(objectClass=user)",
"attributes": [
"cn",
"mail",
"sAMAccountName",
"memberOf"
],
"page_number": 1
}
Description
base_object — the Distinguished Name (DN) at which the search begins (e.g., ou=users,dc=your_domain,dc=ru).
scope – search scope:
- 0 = base (search only the base object)
- 1 = one (search immediate children only)
- 2 = sub (search the entire subtree, including all nested objects)
filter — LDAP search filter (e.g., (objectClass=user) or (cn=john*)).
attributes — list of attributes to return in the response.
page_number — used for paginated results.
Bulk Operations
Bulk operations allow you to perform the same action on multiple directory objects in a single API request.
Example request for Bulk object update:
PATCH /entry/update_many
{
"objects": [
"cn=user1,ou=users,dc=your_domain,dc=ru",
"cn=user2,ou=users,dc=your_domain,dc=ru"
],
"changes": [
{
"operation": 2,
"modification": {
"type": "description",
"vals": [ "Updated in bulk" ]
}
}
]
}
Description
objects — a list of Distinguished Names (DNs) of the objects to be modified.
operation: 2 — indicates a replace operation (i.e., overwrite the current attribute value).
type — the name of the LDAP attribute to update (e.g., description).
vals — the new value (or array of values) to assign to the attribute.
Example request for Bulk deletion of objects:
POST /entry/delete_many– Deletes multiple directory objects in a single request
{
"entries": [
"cn=olduser1,ou=users,dc=your_domain,dc=ru",
"cn=olduser2,ou=users,dc=your_domain,dc=ru",
"cn=oldgroup,ou=groups,dc=your_domain,dc=ru"
]
}
Description
entries — a list of Distinguished Names (DNs) of the objects to be deleted.
Kerberos API
Directory setup for KDC/kadmin
Example request to configure KDC/kadmin Directory structure:
POST /kerberos/setup/tree
{
"trusted_domain": "string",
"trusted_kdc_addr": "string",
"service_princ_password": "string"
}
Description
trusted_domain — the Kerberos realm to trust (e.g., YOUR.DOMAIN.RU).
trusted_kdc_addr — the address of the trusted domain’s KDC server (typically an FQDN or IP).
service_princ_password — the password for the service principal used to establish cross-realm trust between directories.
Keytab Generation
Example request to generate a Keytab:
POST /kerberos/ktadd– Generates a keytab file for a specified Kerberos principal.
[ "string" ]
Description
An array of strings, where each string is the name of a principal for which a keytab needs to be generated.
Examples of principal strings:
HTTP/server1.your_domain.ru@YOUR.DOMAIN.RU— for a web serverldap/server2.your_domain.ru@YOUR.DOMAIN.RU— for an LDAP service
Add Principal
Example request to add a Principal:
POST /kerberos/principal/add– creates a new Kerberos principal
{
"primary": "string",
"instance": "string"
}
Description
primary — the primary component of the principal name (typically a username or service name, e.g., user1).
instance — an optional qualifier or role that further identifies the principal (e.g., admin, host/server1).
The full principal name is constructed as: primary/instance@REALM
- Example: user1/admin@YOUR.DOMAIN.RU
Delete Principal
Example request to delete a principal:
DELETE /kerberos/principal/delete– removes a Kerberos principal
{
"principal_name": "string"
}
Description
principal_name — The full Kerberos principal name, including the realm.
- Example:
principal_name: «user1/admin@YOUR.DOMAIN.RU»
Kerberos API Endpoints
POST /kerberos/setup– Configure the local KDC server.POST /kerberos/setup/trust– Set up cross-realm trust with a remote Kerberos domain.GET /api/kerberos/status– Check the current status of the Kerberos service.PATCH /kerberos/principal/rename– Rename an existing Kerberos principal.PATCH /kerberos/principal/reset– Reset the password for a Kerberos principal.
DNS API
DNS Configuration
Example request to set up DNS (Zones):
POST /dns/setup – configures DNS zones and associated settings.
{
"dns_status": "0",
"domain": "string",
"dns_ip_address": "198.51.100.42",
"tsig_key": "string"
}
Description
dns_status — DNS service status (0 = disabled, 1 = enabled).
domain — the domain name for which the DNS zone is configured (e.g., md.ru).
dns_ip_address — IP address of the DNS server.
tsig_key — TSIG key used for secure, authenticated DNS record updates.
DNS Record Management
Example request for DNS record management:
GET /dns/record, POST /dns/record, DELETE /dns/record, PATCH /dns/record
{
"record_name": "string",
"record_type": "string",
"zone_name": "string",
"record_value": "string",
"ttl": 0
}
Description
record_name — the name of the DNS record (e.g., www, mail).
record_type — the DNS record type (A, AAAA, CNAME, MX, TXT, SRV, etc.).
zone_name — the DNS zone the record belongs to (e.g., md.ru).
record_value — the value of the record (e.g., an IP address or domain name).
ttl — time-to-live in seconds, defining how long the record can be cached.
DNS Zone Management
Example request for DNS Zone Management:
GET /dns/zone, POST /dns/zone, DELETE /dns/zone, PATCH /dns/zone
[
{
"name": "string",
"type": "master",
"records": [
{
"type": "string",
"records": [
{
"name": "string",
"value": "string",
"ttl": 0
}
]
}
]
}
]
Description
name — zone name (e.g., example.com).
type — zone type: master, slave, or forward.
records — array of DNS records contained in the zone. Each record includes:
- type — record type (e.g., A, MX, CNAME).
- name — record name (e.g., www).
- value — record value (IP address or FQDN).
- ttl — time-to-live in seconds.
Add DNS Zone
Example request to add a DNS Zone:
POST /dns/zone
{
"zone_name": "string",
"zone_type": "master",
"nameserver": "string",
"params": [
{
"name": "acl",
"value": "string"
}
]
}
Description
zone_name – name of the DNS zone (e.g., md.ru).
zone_type – zone type: master, slave, or forward.
nameserver – primary nameserver (NS) for the zone.
params – additional zone-specific parameters, each consisting of:
- name – parameter type (e.g., acl, forwarders).
- value – parameter value (e.g., IP addresses of allowed secondary DNS servers).
Reload DNS Zone
Example request to reload a DNS Zone:
GET /dns/zone/reload/
{
"zone_name": "string"
}
Description
zone_name — Name of the DNS zone to reload (e.g., after modifying records).
- GET /dns/server/options, PATCH /dns/server/options – retrieves or updates global DNS server configuration options.
- GET /dns/server/restart – restarts the entire DNS service.
- GET /dns/status – checks the operational status of the DNS service.
- GET /dns/zone/forward – lists all configured forward zones.
- POST /dns/forward_check – validates connectivity and configuration of a forward zone.
Network Policies
Add Network Policy
Example Request to Add a Network Policy:
POST /policy
{
"netmasks": [
"172.0.0.0/8"
],
"name": "local network",
"priority": 2,
"groups": [],
"mfa_status": 0,
"mfa_groups": [],
"is_http": true,
"is_ldap": true,
"is_kerberos": true,
"bypass_no_connection": true,
"bypass_service_failure": true,
"http_session_ttl": 0,
"ldap_session_ttl": 0
}
Description
netmasks — list of subnets (in CIDR notation) to which the policy applies.
- Example:
172.0.0.0/8— matches all addresses in the 172.x.x.x range.name – human-readable policy name (e.g., «local network»).
priority – policy priority (lower number = higher precedence).
groups – list of user groups the policy applies to. If empty, the policy applies to all users.
mfa_status – Multi-Factor Authentication (MFA) enforcement mode:
- 0 = disabled
- 1 = enabled for specified groups
- 2 = enabled for all users
mfa_groups – list of groups requiring MFA (used only when mfa_status = 1).
is_http – applies policy to HTTP-based access.
is_ldap – applies policy to LDAP connections.
is_kerberos – applies policy to Kerberos authentication.
bypass_no_connection – allows access if connection to the policy enforcement service cannot be established.
bypass_service_failure – allows access in case of internal service errors.
http_session_ttl – HTTP session lifetime in seconds (0 = use system default).
ldap_session_ttl – LDAP session lifetime in seconds (0 = use system default).
Policy Management Endpoints
- DELETE /policy/{policy_id} – deletes a network policy by ID.
- PATCH /policy/{policy_id} – enables or disables a policy (toggle active status).
- POST /policy/swap – swaps priority levels between two policies (used for reordering).
Schema API
Create Attribute Type
Example Request to Create an Attribute: POST /schema/attribute_type
POST /schema/attribute_type
{
"oid": "string",
"name": "string",
"syntax": "string",
"single_value": true,
"no_user_modification": true,
"is_system": true
}
Description
oid – unique object identifier (OID) for the attribute.
name – attribute name (e.g., customAttribute).
syntax – data type (e.g., Directory String, Integer, Boolean).
single_value – if true, the attribute accepts only a single value; if false, multiple values are allowed.
no_user_modification – if true, the attribute cannot be modified by users (typically managed by system processes).
is_system – indicates whether the attribute is a system-defined attribute (true) or user-defined (false).
Delete Attribute Types
Example Request to Delete Multiple Attributes:
POST /schema/attribute_types/delete
{
"attribute_types_names": [
"string"
]
}
Description
attribute_types_names — List of attribute names to be deleted.
Delete Object Class
Example Request to Delete an Object Class (Bulk):
POST /schema/object_class/delete
{
"object_classes_names": [
"string"
]
}
Description
object_classes_names – list of objectClass names to be deleted.
Create Object Class
Example Request to Create an Object Class:
POST /schema/object_class
{
"oid": "string",
"name": "string",
"superior_name": "string",
"kind": "STRUCTURAL", # STRUCTURAL, AUXILARY, ABSRTART.
"is_system": true,
"attribute_type_names_must": [
"string"
],
"attribute_type_names_may": [
"string"
]
}
Description
oid — unique object identifier (OID) for the objectClass.
name — name of the object class (e.g., customObjectClass).
superior_name — parent class from which this class inherits (typically top).
kind — class type:
STRUCTURAL— defines core object types in the directory.AUXILARY— adds optional attributes to existing objects.ABSTRACT— serves as a base for inheritance; cannot be instantiated directly.is_system — indicates whether the class is system-defined (true) or user-defined (false).
attribute_type_names_must — list of required attributes for objects of this class.
attribute_type_names_may — list of optional attributes allowed for objects of this class.
Licenses
Upload License
Example Request to Upload a License:
POST /lic/
{
"company_name": "name_Multidirectory",
"license_key": "key",
"domain": "domain_Multidirectory",
"signature_valid": true,
"max_users": 500,
"issued_date": "2025-06-17",
"valid_from": "2025-06-17",
"valid_to": "2026-06-17",
"active_users": 1,
"is_active": true
}
Description
company_name – name of the company the license is issued to.
license_key – license key (unique identifier).
domain – domain associated with the license.
signature_valid – boolean flag indicating whether the license’s digital signature is valid.
max_users – maximum number of users allowed under this license.
issued_date – date the license was issued.
valid_from – start date of license validity.
valid_to – expiration date of the license.
active_users – current number of active users in the system.
is_active – license status (true = active, false = inactive or expired).
Retrieve license Information
Endpoint: GET /lic/ – returns current license details and validation status.
Audit
GET /audit/policies– retrieves a list of audit policies.PUT /audit/policy/{id}– updates an existing audit policy by ID.GET /audit/destinations– lists all configured audit log destinations.POST /audit/destination– creates a new audit log destination.PUT /audit/destination/{id}– modifies an existing audit destination by ID.DELETE /audit/destination/{id}– deletes an audit destination by ID.
Sessions
GET /sessions– retrieves a list of all active user sessions.DELETE /sessions/{upn}– terminates all sessions for a specific user (identified by UPN).GET /sessions/{upn}– views details of all active sessions for a specific user.DELETE /sessions/{upn}/{session_id}– terminates a specific session for a user (if session ID is provided).GET /sessions/ip/{ip}– list all active sessions originating from a specific IP address.
Multi-Factor Authentication (MFA)
POST /multifactor/setup– Configure MFA settings (e.g., enable methods, set policies).DELETE /multifactor/keys– Remove a user’s MFA credentials or secret keys.POST /multifactor/get– Retrieve MFA credentials or provisioning data (e.g., for TOTP setup).POST /multifactor/create– Callback endpoint used during MFA registration or verification flow.POST /multifactor/connect– Initiate a two-factor authentication challenge (e.g., send push notification, generate OTP).