automatic user and password authentication for dvc get and dvc.api.open with WebDav #4974
Labels
enhancement
Enhances DVC
feature request
Requesting a new feature
fs: webdav
Related to the Webdav filesystem
I recently started using DVC and are very excited about the simple version control it provides for large Data files.
Now I use WebDav as a remote storage for project A.
I am using user and password authentication for webdav which are stored in my local dvc config file in projectA.
Pushing and Pulling inside project A works well.
Now I have another project B (not a dvc project) which should use files from project A.
Yet I could not retrieve files from project A via dvc get or the Python API dvc.api.open().
If I use the file resource_url retrieved by dvc.api.get_url().
I can use
wget --user user --ask-password resource_url
to copy individual files to my workspace.Yet if I run dvc.api.open() with the same params it raises an "Configuration for WebDav ... is invalid" error.
According to the source code this error is raised if the webdav3.client is not valid.
Thus I tried to initialize my own webdav3.client with
from webdav3.client import Client options = { "webdav_hostname": "http://webdav_url", "webdav_login": "user", "webdav_password": "Passwortsystems" } client = Client(options)
In this case I receive a working client.
client.valid()
returns Trueand
client.check(pathtofile)
returns True as wellI realized the problem is that project B has no access to the username and password required to access WebDav.
It would be nice if the error message could point to this as a possible issue.
After I specified the "user" and set "ask_password" to True in the global config file of project A. I can use dvc.api.open() successfully if I type my password during execution.
Now my question is, is there any possibility to provide a local config file in Project B with the password for webdav that is automatically retrieved by dvc.api.open(), so that the script can run without user interaction?
The text was updated successfully, but these errors were encountered: