tags: webdav, auth, authentication, digest, htdigest, realms, rfc-7616, rfc-2617, rfc-1945, sha2, sha256, hashing, salting, encryption, encrypting, user accounts, message-digest-algorithm, lighttpd, mod_webdav, mod_auth, mod_authn_file, auth.backend
I’m unable to connect KopiaUI to a WebDAV target. The endpoint runs Lighttpd (1.4.69) using mod_authn_file
htdigests. It is configured to use SHA256 hashing. It also uses RFC 7616’s HTTP Digest auth userhash extension.[1]
Note RFC 7616 (2015) obsoletes RFC 2617 HTTP Authentication: Basic and Digest Access Authentication (1999).[2]
Attempting to connect to it as a repository returns
Connect Error: INTERNAL: internal server error: unable to complete GetBlob(kopia.repository,0,-1) despite 10 retries: error determining sharded path: error getting sharding parameters for storage: ReadStream .shards: Authorize .shards: 401
Cadaver (0.26-1) and WebDAV Browser (1.2.2) (a Firefox, Edge, Chromium extension) operate as expected.[3] IE:
cadaver https://$sub.$domain.internal:$port/dav
This capability is important to allow using HTTP/WebDAV realms to ensure partitioning appropriate permissions as described in RFC 7616,[4] first described in RFC 1945 (HTTP/1.0).[5]
I’ve also looked over the CLI options but find no indication that Kopia supports this.[6]
I am attemping to ensure this functions before beginning to integrate a database backend for properly encrypted (ie: salted & hashed) accounts via mod_authn_dbi
. It too uses the SHA-256 for the message digest algorithm.[7]
The Lighttpd conf follows (where $domain
is the domain; mimetype.assign
block heavily truncated). Syntax can be validated by lighttpd -f $confLocation -t
.
Please confirm repoducability and advise.
KopiaUI Version v0.19.0 1f8f728c4133d4f419df93e58a5b54c3bf9c75e3 kopia/htmlui 16dfe3793a020835bc6a98d75e7c2550210954e1 built on Sat Dec 28 09:10:28 UTC 2024 fv-az798-492 (appimage)
- See Lighttpd’s Docs, htdigest (mod_authn_file) for description, examples, templates
- RFC 2617, HTTP Authentication: Basic and Digest Access Authentication, June 1999, IETF
- Cadaver, Joe Orton, GitHub; WebDAV Browser 1.2.2, WebDAVDevs, GitHub
- RFC 7616, HTTP Digest Access Authentication, September 2015, IETF
- http - What is the “realm” in basic authentication, Stack Overflow
- repository create webdav, Kopia documentation
- dbi (mod_authn_dbi) (since lighttpd 1.4.56)