Skip to content

LDAP security

What BastionXP CA does to keep directory logins safe:

  • Encrypted both ways. Only ldaps:// or ldap:// with StartTLS. The directory's certificate is always checked (ca_file or the system roots).
  • Passwords are never stored or logged.
  • An empty password is refused before the directory is asked. (AD takes a name with an empty password as an anonymous login and answers "success".)
  • Input is escaped. What people type is escaped before it goes into a search filter, so * or )( cannot change the search. Exactly one entry must match, and disabled accounts are refused.
  • Lockout protection. After 3 wrong passwords for one name, or 20 from one address, within 15 minutes, the CA stops passing that name's or address's logins to the directory until the 15 minutes are over. AD locks accounts after a few wrong passwords, and without this limit anybody who reaches the CA could lock people out of their company account. Set AD's lockout threshold above 3.
  • Groups can be pinned to an OU with group_base_dn, and named by full DN in the rules.

The failed logins appear in the log (login failed, login refused: too many failures) and in the metric bastionxp_ca_logins_total{method="ldap"}.