Access denied failure during mid-session authz revocation
0 reputation · 24 Jan 2021, 13:56 UTC
0 reputation · 24 Jan 2021, 13:56 UTC
Apache Subversion implements least-privilege access via path-based authorization (authz) files, which decouple identity verification from directory-level permissions. While the authentication provider handles the initial identity check, the authz file determines the specific read/write capabilities for each repository path.
A technical uncertainty exists regarding the behavior of the SVN client when server-side permissions are revoked mid-session. Because the client often caches credentials to avoid repeated authentication prompts, it is unclear how the system handles the transition when a user's access is stripped from the authz configuration while a working copy is still active.
The interaction between the client-side credential store and the server's permission re-evaluation varies between the svnserve daemon and mod_dav_svn. It is not explicitly documented whether a change in the authorization file immediately triggers an access-denied response for the next operation or if the session persists until the cache expires.
authz revocation?mod_dav_svn backend signal the client to invalidate cached credentials when path-based permissions change?No. The SVN client does not trigger a new authentication challenge immediately after a server-side authz revocation. It keeps using cached credentials until the next repository operation. At that point the server re-evaluates path-based authorization and returns 403 Forbidden for the revoked path. mod_dav_svn sends no signal to the client to invalidate cached credentials when path-based permissions change.
Authentication and authorization are separate in Subversion. The credential cache stores proof of identity, not a permission decision. Because authz is checked per operation on the server, a mid-session authz change takes effect on the next request, but the client cannot know the permission changed until it receives the denial.
svnserve generally re-evaluates authorization per connection or operation, so revocation often appears on the next command.mod_dav_svn with Neon or serf may reuse cached HTTP credentials across requests, so the client can resubmit the same identity while the server denies the path. Observed timing depends on client configuration, HTTP keep-alive, and cache lifetime.Treat exact timing as version-sensitive; verify against your specific Subversion release.
svn --verbose info REPOSITORY_URL or svn --verbose update after editing authz.403 Forbidden means the revocation is enforced; 401 Unauthorized means the credential itself was rejected.mod_dav_svn, reload Apache so the server reads the updated AuthzSVNFile.~/.subversion/auth/ on Linux or macOS, %APPDATA%\Subversion\auth\ on Windows.Which server backend and Subversion versions are you using? That determines whether to expect per-operation re-evaluation or HTTP credential reuse, and it changes the reload step.
Use comments to ask for clarification. Post a solution as an answer.
35,775 reputation · 24 Jan 2021, 15:02 UTC
For mod_dav_svn on Apache HTTP Server 2.4, mod_authz_svn can cache the parsed authz policy. A command issued immediately after an edit may therefore still be evaluated against the previous decision until that server-side cache refreshes. This lag is not caused by the SVN client’s credential cache.
A practical check is to inspect AuthzSVNCacheTTL where supported, timestamp the edit and request, and compare them with Apache’s access and error logs. Repeat after the configured interval, and record Apache and Subversion versions because defaults and log wording are release-dependent. Testing a still-permitted path can separately confirm that authentication remains valid while authorization for the revoked path has failed.