Commit Graph
18 Commits
Author SHA1 Message Date
timmy 0446af3e70 Add a connection level context 2026-08-25 14:48:54 -07:00
timmy f8adba666d Ensure potential panic is handled in close functions 2026-08-25 14:48:54 -07:00
timmy 75ae796156 Allow sending an error message with the ldap response
Cleanup interfaces and allow the errorMessage ldap field to be used

Use the correct ldap server-side error code
LDAPResultNotSupported(92) is for a client side error
LDAPResultUnavailable(52) is for when a subsystem is not available
LDAPResultOther(80) is for generic server errors

Provide better errors

Fix binding dn to connection

Fix tests

Make handleSearchRequest conform to rfc4511
2026-08-25 14:48:53 -07:00
timmy e0d54e0800 Add a server context instead of a public quit channel 2026-08-25 14:21:16 -07:00
timmy cd44bd6eea Use EqualFold instead of ToLower in all possible places 2026-08-25 14:21:16 -07:00
timmy a0adcc062b Fix test cases provided by @navibodybuilder in #7 2026-08-25 14:21:16 -07:00
timmy a8aa3dece1 Fix substring match 2026-08-25 14:21:16 -07:00
timmy 94e9c7a5aa Make handleSearchRequest conform to rfc4511 2026-08-24 19:38:25 -07:00
timmy 2515c1964f Add more logging 2026-08-24 18:04:45 -07:00
timmy ee905451dc Simplify encodeProtocolErrorResponse usage 2026-08-24 18:04:45 -07:00
timmy d56912c7af Simplify early returns 2026-08-24 18:04:45 -07:00
timmy b4c86f583d Switch on tags instead of strings 2026-08-24 18:04:45 -07:00
timmy bb17f0bc21 Publish GetFilterAttribute and return unmodified string from filter 2026-08-24 18:04:45 -07:00
timmy 93ce6da943 Stricter error handling 2026-08-24 18:04:45 -07:00
timmy 928eb6c5e6 Fix stats mutex being copied 2026-08-24 18:04:45 -07:00
timmy 1d55fcd1f6 Modernize testing
Arranges to start the server before running ldap queries removing flakiness
Uses contexts to limit individual command execution time to 100ms
Ensure temporary files use the managed t.TempDir() directory
Set log output to the test output so that go test has a clean output
2026-08-24 18:04:45 -07:00
timmy a03b89f9be Rename package to ldaps 2026-08-24 16:30:01 -07:00
timmy a4b5f16b98 Minimal set of changes to remove client and use upstream ldap package
Switches to github.com/go-ldap/ldap/v3 for ldap management as it generally
 has better practices and security
2026-08-24 16:29:16 -07:00