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

Statelog prints passwords in console #31

Open
tkriplean opened this issue Jun 3, 2017 · 3 comments
Open

Statelog prints passwords in console #31

tkriplean opened this issue Jun 3, 2017 · 3 comments

Comments

@tkriplean
Copy link
Member

The diff on current_user save prints out the user's password in the clear.

e.g.

o client0.save('current_user') .login_as = {"name":"Travis","pass”:”mypassword”} [client01f]

@toomim toomim changed the title Statebus server log leaks user password Statelog includes user password Jun 5, 2017
@toomim toomim changed the title Statelog includes user password Statelog displays passwords Jun 5, 2017
@toomim
Copy link
Member

toomim commented Jun 5, 2017

I understand that rails hides user passwords from the default server log, but we haven't figured out what our server should do.

I see two design decisions that lead to the current behavior:

  • The statelog shows all state changes, w/o filtering particular fields
  • The statelog is enabled for client busses by default on the server

What are the problems with including user passwords?

  • An admin watching the console can read user's passwords as they log in
    • which the user might share across other websites, giving the admin access to those sites
    • which might be embarrassing
  • An admin might save the default server log to a file
    • Then if someone hacks the server, they can access unsalted passwords

That's the state of my thought. I'm open to what we should do.

@karth295
Copy link
Collaborator

karth295 commented Jun 5, 2017 via email

@toomim
Copy link
Member

toomim commented Jun 5, 2017

@karth295 The server does not store plaintext passwords. This issue is only about it printing passwords in the console.log debugging output, if the user has bus.honk != false, which is the default. This console output is not stored anywhere.

The server stores only a salted bcrypt hash of each password. The debugging output is printed when the password is received by the server over the network, before it has been hashed.

Another approach is to hash the passwords on the client instead of the server. Then the server would never even see the raw password. I originally implemented it that way, and could look into my notes to remember why I gave up on doing it.

@toomim toomim changed the title Statelog displays passwords Statelog prints passwords in console Jun 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants