fix(panettone): Automatically reconnect to ldap

Wrap all ldap access in a macro that automatically reconnects and
retries operations that fail due to a connection error, to handle the
case where the ldap server restarts while we still have an open
connection.

Fixes: #44
Change-Id: I4859cf509106e480f97fed17e7f08e0eea909352
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1871
Tested-by: BuildkiteCI
Reviewed-by: eta <eta@theta.eu.org>
This commit is contained in:
Griffin Smith 2020-08-28 18:49:29 -04:00 committed by glittershark
parent 2bc564bd0d
commit 21690c644b
3 changed files with 55 additions and 17 deletions

View file

@ -11,7 +11,7 @@
(:nicknames :authn)
(:use :cl :panettone.util :klatre)
(:import-from :defclass-std :defclass/std)
(:import-from :alexandria :when-let)
(:import-from :alexandria :when-let :with-gensyms)
(:export
:*user* :*ldap*
:user :cn :dn :mail :displayname