OpenViking
OpenViking copied to clipboard
[Feature]: WebDAV: user-scoped root, read-only switch and HTTP Basic credentials
Version
OpenViking v0.5.4 (9dfa9017a). The same code is on current main (checked 2026-11-13).
Summary
Three gaps stop a desktop WebDAV client (for example macOS Finder) from opening a user's resources safely through openviking/server/routers/webdav.py:
- The router roots every path at the account-shared
viking://resources, so a corpus stored underviking://user/<user>/resourcesis not visible. - There is no read-only option:
PUT,DELETE,MKCOLandMOVEare always allowed. - Authentication reads only
X-API-Keyor a Bearer token, while desktop clients send HTTP Basic.
Reproduction
Store a resource under a user scope, then mount the WebDAV endpoint with a Basic credential whose password is a valid API key. The mount is refused (401 with no Basic challenge). With a header-capable client, the user's resources are absent from the listing.
Proposed fix
- A root setting (user scope or the shared root).
- A read-only setting that answers write methods with 403 before any storage call and lists only the read methods in
Allow. - Accept a Basic password as the API key through the existing identity resolution, send
WWW-Authenticate: Basicon 401, and refuse Basic requests that carry anOriginheader (CORS allows credentials from any origin).
We run a local patch with these three changes and are happy to open a PR.