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

Passwords should not be stored in plain text #37

Closed
AshesITR opened this issue Jun 2, 2020 · 5 comments
Closed

Passwords should not be stored in plain text #37

AshesITR opened this issue Jun 2, 2020 · 5 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@AshesITR
Copy link

AshesITR commented Jun 2, 2020

Passwords should never ever be stored in plain.
Even encrypting the database does not prevent an admin from seeing the passwords.

Instead, you should use a proper password hashing algorithm such as scrypt to store irreversible password hashes and check if the hash is valid for a provided password in check_credentials.

See here for more information.
In the implementation, you only need to use hashPassword() when storing the password and then subsequently use verifyPassword(hash, password) instead of pwd == password.

@pvictor
Copy link
Collaborator

pvictor commented Jun 2, 2020

Thank you for pointing that out. I'll correct that.

Victor

@crotman
Copy link

crotman commented Jun 27, 2020

Yes... this is not good... People use the same password in different services... As an admin of some shiny apps using shinymanager, I set a random password and never ask the user to change it. So he can't put a password that he already uses in other service

The implementation should be as @AshesITR said. And the databases that already exist must be hashed the first time a new version reaches a plain text database

@bthieurmel bthieurmel self-assigned this Jun 30, 2020
@bthieurmel bthieurmel added bug Something isn't working enhancement New feature or request labels Jun 30, 2020
@bthieurmel
Copy link
Contributor

In progress (only for sqlite storage, not for data.frame auth)

@bthieurmel
Copy link
Contributor

Fix on master.

@bthieurmel
Copy link
Contributor

bthieurmel commented Jul 3, 2020

For information, a previous sqlite database is automatically convert to hashed password on first modification on user table (delete / edit / add user).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants