simplenote-vim / simplenote.vim

vim plugin to interact with the simplenote service
http://www.vim.org/scripts/script.php?script_id=3582
MIT License
368 stars 31 forks source link

[feature request] login:password #27

Closed ghost closed 10 years ago

ghost commented 12 years ago

It would be great to have a possibility to enter login:passowrd pair every time Simplenote plugin is launched (in order not to store that data in plain text file and also if using more than one Simplenote account).

Another solution may be to store an encrypted file / database of passwords for all the logins used with that plugin.

Thank you.

mrtazz commented 12 years ago

I'm not sure if I like the option of having to enter username and password every time when using the plugin. However as it is going to use autoload maybe the user can be asked when the autoload script is sourced and the result stored?

ghost commented 12 years ago

mrtazz, yes, that sounds nice.

on the other hand, may be after the user enters l:p for the first time, the plugin could store 'em in an encrypted form in its config?

mrtazz commented 12 years ago

But then you'd have to enter the encryption password every time you want to use the plugin. This just moves the problem, but doesn't solve it imho.

On Wed, Feb 08, 2012 at 09:56:51PM -0800, dsjkvf wrote:

mrtazz, yes, that sounds nice.

on the other hand, may be after the user enters l:p for the first time, the plugin could store 'em in an encrypted form in its config?


Reply to this email directly or view it on GitHub: https://github.com/mrtazz/simplenote.vim/issues/27#issuecomment-3882547

corvec commented 11 years ago

I'm unsure why it would be considered bad form to give users the option to not store their password. A straightforward solution would be to prompt once per session (if the password is not provided by the user already) and to store the password as a variable (like is already being done). The password could be saved to disk if the user was using sessions, admittedly.

If the Python variables are persistent during a given session, you could clear g:Simplenotepassword and s:password after setting SN_PASSWORD and presumably negate that risk. I'm not sure if that's the case.

If there were a ubiquitous and simple, multi-platform, python friendly password manager that I could recommend, I'd do so. *shrug*

atomicules commented 10 years ago

I don't think this issue is up to simplenote.vim to solve.

To store your password in an externally encrypted file one solution is as follows:

Create a Vim [encrypted file](Vim encrypted file) (using :X) containing the following:

let g:SimplenoteUsername = "username"
let g:SimplenotePassword = "password"

And save it as ~/.simplenotecreds

Create a function in your .vimrc as follows:

function! ReadSimplenoteCreds()
    exec 'edit ~/.simplenotecreds'
    :%y"
    :@"
    exec 'bdelete'
endfunction
call ReadSimplenoteCreds()

When you start vim you'll be prompted for your passphrase for the simplenotecreds file and it'll then open it, execute the contents of it and close it, the next result that your Simplenote username and password are set for the session.

atomicules commented 9 years ago

As a belated follow-up, see related #69.