DOCUMENTATION

Directory sign-in (AD/LDAP)

Employees sign in to the guest Wi-Fi portal with the Active Directory or LDAP user name and password they already have. Captivo checks the password against your directory server and, if it is right, gives that person a short-lived network credential of their own.

Directory sign-in is available on on-premise installations only, because the Captivo server has to reach your domain controller directly. The page is Settings → Directory (AD/LDAP), visible to admins. It is one form with a switch at the top, the server fields below, Save, Test connection and a Verify test user box; it cannot be shown in the Cloud demo, so it is described in words.

What happens at sign-in

  • The employee types their domain user name and password into the portal's user name and password form.
  • The check is made from the Captivo server, not from the guest's device. The typed password is used for that one bind and is not stored anywhere: not in the database, not in a log.
  • On success Captivo creates a one-time RADIUS credential for that person, and that is what the network device sees. The domain password itself never travels on to the firewall.
  • The session length is Session length (minutes), 480 by default (5 to 1440), unless a guest profile is assigned to Directory under Default Assignment on the Guest Profiles page; then the profile sets the length, speed and device count.
  • Speed, quota and device limits come from that profile; with no profile assigned to Directory, the base defaults under Settings → RADIUS apply. An idle timeout is sent only when a profile governs Directory or you filled in a base default.
  • Directory is the fallback. Captivo first checks the typed name and password against its own users (local users); only when those do not match does it ask the directory. A local user named like a domain account therefore wins, and a wrong password for that local name goes on to the directory.
  • Turning directory sign-in on locks the portal's password box to the wide shape (a normal password box, up to 64 characters) instead of the six-digit code box, because a domain password does not fit in six digits. The setting is visible under Settings → Portal. A domain password longer than 64 characters cannot be typed.
  • The portal limits attempts: five tries from the same device for the same user name, and ten for the same user name overall, within 15 minutes, after which it answers with a "too many wrong attempts" message. A correct sign-in resets the counters.

Before you start

  • The Captivo server must reach the directory server on 636/TCP (LDAPS, recommended) or 389/TCP (LDAP), and must be able to resolve its name through your internal DNS.
  • Create a least-privilege service account whose only job is to search for users: in Active Directory an ordinary domain user with read access to the relevant OU is enough.

Settings

FieldWhat to enter
Server typeActive Directory or Generic LDAP. It decides the default user filter.
Server addressldaps://dc1.company.local:636. With ldap:// the page warns that passwords cross the network unencrypted; a domain controller that enforces signing refuses it anyway.
Service account DN / passwordFor example CN=svc-captivo,OU=ServiceAccounts,DC=company,DC=local. The password is stored encrypted and never shown again; leave it blank to keep it.
Search base (Base DN)Where the user search starts. Keeping it to the staff OU is safer than the whole domain.
User filterBlank uses the default: (|(sAMAccountName=%u)(userPrincipalName=%u)) for AD, (uid=%u) for LDAP. %u is the typed user name, escaped.
Required group (DN, optional)Only members of this group may sign in. It is checked against the user's memberOf values.
Timeout (ms)10000 by default, 1000 to 30000. Raise it for a slow or distant domain controller.
CA Certificate (PEM)If the server presents a certificate from your internal CA, paste the root certificate here. Skip certificate verification exists for testing only and leaves the connection open to interception.

Testing and switching it on

  1. Fill in the form and press Save, with Directory login enabled still off. Then press Test connection. It binds with the service account and searches for a made-up user, so it needs no real person; a bind that works and a user that is not found counts as success (Connection and service account verified.). When it fails, the message names the cause (see below).
  2. Tick Directory login enabled and save. Employees can now sign in, so do this when you are ready; to limit who gets in while you test, fill in Required group first.
  3. Use Verify test user (Test username and Test password) with a real account. It runs the whole check (search, group, password) and shows User verified: <DN> or the exact reason it refused. It only works while directory login is enabled; before that it answers "Save the settings first". The two boxes are emptied after each try.
  4. If your firewall serves a portal file you downloaded from Captivo, download it again and upload it to the device. The file records whether directory sign-in is on at the moment it is downloaded; an older file keeps working but never offers directory sign-in. That file asks Captivo to do the check from the guest's browser, so the Captivo address must be reachable before sign-in (walled garden).

What the test messages mean

Message saysWhat to do
The server name could not be resolvedThe Captivo server does not use your internal DNS. Make the name resolvable, for example with an extra_hosts entry in docker-compose.onprem.yml. Switching to an IP address does not fix LDAPS: the certificate is issued to the name.
The server refused the connectionThe address answers but nothing listens on that port. Check the port (636 or 389) and that the directory service runs.
The packets went unansweredA firewall in between drops the traffic silently. Open the port from the Captivo server.
The port is open but the server does not answer LDAPA firewall or load balancer accepts the connection and blocks LDAP. Try 636 or the domain controller itself.
The reply took N seconds while the timeout is MEverything works, only slowly. Raise Timeout to the suggested value; a common cause is the domain controller failing to resolve the Captivo server's address through reverse DNS.
The domain controller enforces signingUse ldaps:// (port 636).
The server certificate is not trusted / invalid certificate formatPaste the root CA certificate as PEM (it must contain -----BEGIN CERTIFICATE-----) into CA Certificate.
The service account's credentials were rejectedCheck the service account DN and password. The server is reachable, so this is not a network problem.
Connected but the search failedCheck that the search base exists and that the user filter is valid.
User not found / not a member of the required groupOnly Verify test user shows these. Check the user filter against the name typed, the search base, and the group DN.

Saving writes a Directory (AD/LDAP) Settings Updated entry to the activity log; the service account password is never logged.

What employees see when it fails

  • A wrong password, an unknown user and a user outside the required group all produce the same incorrect user name or password message. That is deliberate: a different message for each would let anyone find out which user names exist. Use Verify test user to see the real reason.
  • When Captivo cannot reach the directory at all, the portal says so plainly, so nobody starts doubting their own password.
  • Every failed attempt is a real bind against your directory, so Active Directory's own account lockout policy counts it. Several wrong passwords on the portal can lock the domain account, Windows sign-in included. Captivo does not manage that lock.
  • OpenLDAP has no memberOf attribute unless the memberof overlay is enabled. Without it a required group never matches and everyone is refused. Active Directory has it built in.

The same directory can also sign employees in to the wired and wireless corporate network; see 802.1X.

Was this article helpful?