Skip to content
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

Implement password-cmd to mopidy.conf to harden security #305

Open
gorrila20 opened this issue Feb 28, 2021 · 3 comments
Open

Implement password-cmd to mopidy.conf to harden security #305

gorrila20 opened this issue Feb 28, 2021 · 3 comments
Labels
C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal

Comments

@gorrila20
Copy link

I feel like storing my password in plaintext is a bit insecure, therefore I would like to implement the following feauture:

This feauture will add a password-cmd field to the config file. The command given after the = sign will be executed by the operating system and stdout will be the password used by mopidy-spotify. This allows users to use pass, or gopass to store their passwords and not force them to use a keyring.

Before I implement this feauture (I have some time next week I think), I would like to know if this feauture will get merged with the main project.

@jodal
Copy link
Member

jodal commented Mar 1, 2021

Personally, I believe that the important part is to use different passwords for different services (and then probably use a password manager to make that manageable). If you do that, storing a password that is only used for Spotify in plain text on your local disk isn't a threat I'd spend any time worrying about.

A password command solution would have to be something that could be used by all Mopidy extensions. I'm not going to merge a solution that is specific to Mopidy-Spotify.

@jodal jodal added the C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal label Mar 1, 2021
@PoisonFrog
Copy link

Personally, I believe that the important part is to use different passwords for different services (and then probably use a password manager to make that manageable). If you do that, storing a password that is only used for Spotify in plain text on your local disk isn't a threat I'd spend any time worrying about.

A password command solution would have to be something that could be used by all Mopidy extensions. I'm not going to merge a solution that is specific to Mopidy-Spotify.

I really like this feature. I use pass just for configuration files and scripts. It is very helpful if other people have access to the computer. The lack of password-cmd support bothers me.

@kingosticks
Copy link
Member

Now we've moved to using spotifyaudiosrc instead of libspotify, we technically only require username and password once in order to obtain a "reusable credentials" blob, which is then used thereafter for playback. Currently this blob file lives in Mopidy-Spotify's cache directory. This is arguably the wrong place for a sensitive file as by default it has insecure read-all permissions. We could add implement this feature to remove the username/password config settings and ensure more restrictive file permissions for the blob.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal
Projects
None yet
Development

No branches or pull requests

4 participants