- 8 minutes to read

Configuring the Nodinite LDAP Web API

Set up your Nodinite LDAP Web API for secure, flexible integration. This guide walks you through configuring product keys, connection information, authentication, and logging to ensure robust and compliant operations.

✅ Protect sensitive data with encrypted settings
✅ Support multiple connections and authentication types
✅ Enable detailed logging for traceability and compliance
✅ Easily update product keys and manage licenses

Before you use the Nodinite LDAP Web API, configure connectivity and optional logging options.

You manage two configuration files:

  • appsettings.json – product key and debug settings
  • settings.json – connection information (this file automatically encrypts sensitive data like passwords)

The appsettings.json and settings.json files in the LDAP Web API installation folder
Screenshot: Example of appsettings.json and settings.json files for Nodinite LDAP Web API.

Understanding the Configuration

The client sends the Id (a GUID) of a connection with every call. The LDAP Web API looks up that Id in settings.json, binds to the directory with the connection's account, authentication type, server, and port, and runs the operations. appsettings.json holds the product key and the Logging settings that apply to every call.

graph LR roClient["fa:fa-code Client
sends connection Id"] -->|"HTTPS"| roAPI["fa:fa-cloud-arrow-up LDAP Web API"] roAPI -->|"reads"| roApp["fa:fa-file-code appsettings.json
Product Key, Logging"] roAPI -->|"looks up Id"| roSettings["fa:fa-file-lock settings.json
Connections"] roAPI -->|"DSAServer:DSAServerPort"| roLDAP["fa:fa-address-book LDAP Catalog Service"]

Diagram: how the connection Id in a call selects a connection from settings.json, which the LDAP Web API uses to bind to the directory.

File Holds Encrypted When you edit it
appsettings.json Product Key (CustomerName, Key), Logging, debug settings ❌ No At install, and when you renew the license every year
settings.json Connections: Id, server, port, account, password, authentication type ✅ Yes, the password, on first use When you add or change a connection

appsettings.json

Edit the appsettings.json file manually. Use Notepad++ or another text editor. Open the file with administrative privileges so you can save your changes.

Product Key

You must provide the CustomerName and a Key. These are time-limited and you must exchange them every year.

You can buy a license from most of our Partners. You can also contact us at info@nodinite.com for guidance and recommendations to get started quickly.

settings.json

Edit the settings.json file manually. Use Notepad++ or another text editor. Open the file with administrative privileges so you can save your changes.

Connection information

Connections is a top-level array in settings.json. You can define any number of connections. The client/consumer provides this identity part of the call to the LDAP Web API.

You can use multiple accounts with different rights for different operations. As part of your API call, you send the Id of the configuration to use (a GUID).

{
  "Connections": [
    {
      "Id": "5a95449b-95a6-4a9b-bfb4-f5292cbd3122",
      "AuthenticationType": 65,
      "DSAServer": "WILDWESTAD01",
      "DSAServerPort": 389,
      "UserName": "WildWest\\LDAPServiceAccount",
      "Password": "myverys3cretP4$$w0rd!"
    },
    {
      "Id": "6a95449b-95a6-4a9b-bfb4-f5292cbd3123",
      "AuthenticationType": 1,
      "DSAServer": "WILDWESTAD01",
      "DSAServerPort": 636,
      "UserName": "WildWest\\LDAPServiceAccount",
      "Password": "myverys3cretP4$$w0rd!"
    }
  ],
  "LogRequest": false,
  "LogResponse": false,
  "LogHttpHeaders": false
}

Note

Azure App Service: put the same values in Azure App Configuration under the LdapSettings section, for example LdapSettings:Connections:0:Id, LdapSettings:Connections:0:DSAServer, and so on. See Install - AppSettings.

Property Required Example Description
Id ✅ Yes 5a95449b-95a6-4a9b-bfb4-f5292cbd3122 Any unique GUID
AuthenticationType ✅ Yes 65 Flags enum; must fit the port, see AuthenticationType per port
DSAServer ✅ Yes WILDWESTAD01 String, DNS name
DSAServerPort ✅ Yes 389 Positive integer
UserName ✅ Yes WildWest\LDAPServiceAccount String, user name for the connection to the LDAP Catalog Service
Password ✅ Yes myverys3cretP4$$w0rd! String, the password for the user

Warning

UserName and Password are required. Empty values are sent to the domain controller as a real login and fail with "The user name or password is incorrect" (0x8007052E). Leaving them empty does not mean "use the application pool account".

Important

The password must be in clear text for first-time usage. The password will then be detected as plain text and will be encrypted on the first invocation of any operation (for example, run the search in Test, Step 5). The encryption locks the current configuration to the named account. If you change the user name or password, you must specify the password in clear text again, and it will be re-encrypted.

AuthenticationTypes

The AuthenticationTypes is a flags enum, so you can combine several options by adding their values.

For example, the value 65 means Secure + Signing

Value Name Description
0 None Use basic authentication (simple bind) in the LDAP provider
1 Secure Request secure authentication. When set, the WinNT provider uses NTLM to authenticate the client. Active Directory Domain Services uses Kerberos, and possibly NTLM, to authenticate the client. When the user name and password are null, ADSI binds to the object using the security context of the calling thread, which is either the security context of the user account under which the application is running or of the client user account that the calling thread is impersonating
2 Encryption/SecureSocketsLayer LDAPS (SSL/TLS). Only works together with 1 (Secure) on port 636. Requires a certificate on the domain controller
4 ReadonlyServer For a WinNT provider, ADSI tries to connect to a domain controller. For Active Directory Domain Services, this flag indicates that a writable server is not required for a serverless binding
16 Anonymous No authentication is performed
32 FastBind Specifies that ADSI will not attempt to query the Active Directory Domain Services objectClass property. Therefore, only the base interfaces that are supported by all ADSI objects will be exposed. Other interfaces that the object supports will not be available. You can use this option to boost performance in a series of object manipulations that involve only methods of the base interfaces. However, ADSI does not verify if any of the request objects actually exist on the server. See "Fast Binding Option for Batch Write/Modify Operations" and the "Object-Class" topic in the Active Directory documentation
64 Signing Verify data integrity to ensure that the data received is the same as the data sent. The System.DirectoryServices.AuthenticationTypes.Secure flag must also be set to use signing
128 Sealing Encrypt data using Kerberos. The System.DirectoryServices.AuthenticationTypes.Secure flag must also be set to use sealing
256 Delegation Enable Active Directory Services Interface (ADSI) to delegate the user's security context, which is necessary for moving objects across domains
512 ServerBind If your ADsPath includes a server name, specify this flag when using the LDAP provider. Do not use this flag for paths that include a domain name or for serverless paths. Specifying a server name without also specifying this flag results in unnecessary network traffic

AuthenticationType per port

The AuthenticationType must fit the DSAServerPort. The wrong combination fails with unclear errors:

Port ✅ Works ❌ Fails
389 (LDAP) 1 Secure, 65 Secure + Signing (recommended) 2 or 3: "The server is not operational"
636 (LDAPS) 1 Secure, 3 Secure + SSL 2 alone: "An operations error occurred"; 65: "The server is not operational"

2 (SecureSocketsLayer, also named Encryption) means LDAPS and only works together with 1 on port 636. Don't use it on port 389.

How to enable LDAP signing in Windows Server

Important

Run as securely as possible!

Review the How to enable LDAP signing in Windows Server user guide

Tip

You can significantly improve the security of a directory server by configuring the server to reject Simple Authentication and Security Layer (SASL) LDAP binds that do not request signing (integrity verification), or to reject LDAP simple binds that are performed on a clear text (non-SSL/TLS-encrypted) connection.

Connection Id

The Id (a GUID) identifies this connection in the Connections array.

Once you set this Id, only change it if you explicitly want client operations to fail. If you change this value, clients must also be updated to reflect the change.

Example: 5a95449b-95a6-4a9b-bfb4-f5292cbd3122

DSAServer

The DSAServer is usually the DNS name for the target domain controller for Active Directory. You may use an IP address for some operations, and also for some other LDAP Catalog services. Consult the documentation from that vendor for additional information.

Example: WILDWESTAD01

DSAServerPort

The DSAServerPort is the TCP or UDP port to use for connecting with the LDAP Catalog Service. For Active Directory, the default is 389 or 636 for encrypted communication. The latter requires a valid certificate. Review the SSL-LDAPS for Active Directory user guide for additional information.

Example: 636

Note

The Nodinite LDAP products use additional TCP and UDP ports. The firewall settings list every port per hop, and the TCP and UDP ports user guide shows how to test them.

Tip

Encrypt some operations, usually using port 636. Some operations are not supported using encrypted communication: GetDomainControllers and the Schema operations fail on a port 636 connection. The solution is to use different connections, using different ports.

Logging

Review the 'Enable Logging' user guide for more information.

Next Steps

Test
Develop

Prerequisites
Install
SSL-LDAPS for Active Directory
Troubleshooting