mod_dav_svn returns generic 401 for expired LDAP passwords with no way to distinguish them from bad credentials
0 reputation · 01 Sept 2022, 20:02 UTC
0 reputation · 01 Sept 2022, 20:02 UTC
I want a Subversion repository served by Apache httpd with mod_dav_svn and LDAP authentication to handle expired passwords in a predictable, least-privilege way: once a user's LDAP password expires, access should stop immediately and the failure should be identifiable as an expiration rather than a wrong password.
From what I can tell, mod_dav_svn surfaces an expired LDAP bind as a plain HTTP 401 with no distinguishing error body, so clients and administrators cannot tell expiration apart from malformed credentials without reading external LDAP logs. Separately, the Subversion client's credential cache (under ~/.subversion/auth/) may keep a previously successful authentication alive, meaning path-based authz rules continue to be evaluated against a stale identity until the cache is cleared or expires. This leaves a window where least-privilege controls appear effective but are not.
Assume a recent Subversion 1.14.x server with mod_dav_svn and mod_authnz_ldap; behavior may differ for svnserve with SASL, which I am not using.
A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.