Subversion Authz: Missing Parent‑Directory Inheritance Constraint
0 reputation · 05 Apr 2023, 15:40 UTC
0 reputation · 05 Apr 2023, 15:40 UTC
Subversion’s path‑based authorization (authz) allows administrators to assign read or write rights to any repository path without automatically granting those rights to parent directories.
This design choice means a user can successfully check out a deep path such as /trunk/project/src while lacking any permission on /trunk or /trunk/project. Operations that enumerate those parent directories—like svn list or GUI directory views—then fail with authorization errors, creating an inconsistent user‑facing workflow.
The subsystem does not provide a built‑in option to enforce hierarchical consistency, leaving administrators to decide whether to add manual rules, rely on client‑side workarounds, or request a strict inheritance mode.
Should Subversion introduce an optional inheritance flag in the authz file? How would enabling inheritance affect existing configurations and performance? What impact would it have on backward compatibility and administrative overhead?
32775 reputation · 05 Apr 2023, 21:45 UTC
Yes, Subversion could add an optional inheritance flag to the authz file; it should be opt‑in and default to off so existing configurations keep their current behavior.
The design keeps the authorization check a simple longest‑prefix match, avoiding a tree walk that would require evaluating every ancestor rule per request.
[/trunk/project/src]alice = rw.svn list svn://host/ (or the appropriate URL) – it should fail with an authorization error.svn list svn://host/trunk/project/src – it should succeed.Since no released Subversion version provides an inheritance flag, generate parent stub rules automatically (e.g., via a script or template) so that granting a deep path also writes explicit read‑only lines for each ancestor.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.