15 Commits
Author SHA1 Message Date
Timmy Welch fbeaf1a21f Modernize testing to use server context 2026-08-06 16:02:23 -07:00
Timmy Welch 473d3474fb Remove ServeTLS code 2026-08-06 16:02:23 -07:00
Timmy Welch f781c55f68 Add a connection id to the context
Add connection id to log messages
2026-08-06 16:02:23 -07:00
Timmy Welch f0e71da160 Set a default deadline of 1 minute per connection 2026-08-06 16:02:23 -07:00
Timmy Welch 68d1478603 Fix a crash when requesting starttls without tls configured glauth/ldap#4 2026-08-06 16:02:23 -07:00
Timmy Welch 127a18f846 go get -u 2026-08-06 16:02:23 -07:00
Timmy Welch e61e6e32b5 Fix substring filter 2026-08-06 16:02:23 -07:00
Timmy Welch ab779df95a 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

Plumb contexts through all connections

Add a server context instead of a public quit channel
2026-08-06 16:02:23 -07:00
Timmy Welch c0c550ebf8 Fix warnings
Fix warning about copying sync.Mutex
Fix error comparison warning
2026-08-04 21:46:15 -07:00
Timmy Welch 7f4fb1e5cd Add more logging 2026-08-04 21:46:15 -07:00
44c76e7854 Start tls by @shipperizer (#1)
* switch nmcclain/asn1-ber to go-asn1-ber/and1-ber.
This newer package has ben updated with tests, and looks to actually be supported.
=
It is also is a forked version of nmcclain/asn1-ber, so supports the same API.

* no need to print errors if client disconnects early and unexpectedly

* added in Close method on server to avoid a race condition

* test ssl certs are untrusted, ldapsearch needs to be told to allow untrusted certs

* Extra time.Wait causes the test to fail

* removed singaling with a custom quit chanel

* feat: support StartTLS in server

* lint: fmt and imports

* feat: rename library to be used by glauth

* chore: renamed packages

---------

Co-authored-by: Daniel Barney <daniel@thoughtplot.io>
Co-authored-by: Mark Rushakoff <mark@influxdata.com>
Co-authored-by: shipperizer <alexcabb@gmail.com>
2026-08-04 21:46:15 -07:00
Timmy Welch 6e3ab942ca Update deps 2026-08-04 21:46:15 -07:00
Timmy Welch 6927700cd5 Add golangci-lint 2026-08-04 21:45:56 -07:00
Timmy Welch 59c22cff82 Return license 2026-08-04 21:45:26 -07:00
Geoffrey Welch 5ee5c3e626 Initial commit 2023-03-22 09:44:39 -07:00