-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make password retrieval per-storage and explicit #233
Comments
Also I think it's somewhat unfortunate that vdirsyncer only resolves passwords by hostname. This becomes a problem if one wants to sync multiple accounts from the same server. This problem vanishes if password config becomes per-storage. I wonder if we should copy offlineimap's "pythonfile" for this or stick to shell commands. |
I thought a lot about this and the only way I can see working is the following. Instead of:
you write one of this:
The fetching would happen without the storage's knowledge, which is why with netrc one would have to explicitly set the hostname:
I wonder if it's not more straightforward to just |
@geier @hobarrera You were rather critical of removing netrc support, would the kind of support as shown above still be worth it? |
I personally run a custom command, and think that it's the most flexible choice (eg: you can even grep netrc if you want to remove support for that). I don't really follow what you're proposing with |
Not sure how to phrase it differently. Basically instead of this:
you write this:
The nice thing is that you can apply this to arbitrary params:
|
Oh, I get it now. This looks like a great idea, really really flexible. Not sure what the issue with storing usernames (or other settings except password) in the config would be though. |
I only saw that offlineimap supported this, and I guess it's a nice to have. My main motivation is, however, that this removes all password-fetching code from |
That makes a bunch of sense, IMHO. If properly done, this can be easily reusable too. |
Sorry to reopen this thread, but with this new method is it always possible to get the password from the command-line (like |
I've removed that feature since you can implement it as custom command. Do people actually use this? |
I sync my calendars manually and not so often. I do not want to write explicitly my passwords in the config file or use a thirdparty to enter a password. |
I thought about something like I've re-added a way to prompt for the password. |
The prompt introduced in 21b1baf is working nicely, thanks for getting back this functionality.
|
This must've been an issue with the old behavior too, can you confirm that? |
At the moment password retrieval is a bit flaky: Vdirsyncer "just tries" a series of methods and sends the next-best thing to the server. This is very problematic because in the case of a failing custom command, vdirsyncer might send a wrong password (from a password store not intended by the user) to the server. One could call this leaking secrets.
I've worked around this for now by aborting this process if the custom command fails, but we have to seriously rethink how password retrieval is supposed to work.
The text was updated successfully, but these errors were encountered: