4 ms·
We made this mistake - the trick is determining what fields are sensitive, what are sensitive enough that they should be censored but included in the log, and t
by overlordalex 8y ago
We made this mistake - the trick is determining what fields are sensitive, what are sensitive enough that they should be censored but included in the log, and the rest of the crud.
It turns out that this is non-trivial - when censoring how do you indicate that something was changed, while keeping the output to a minimum? blank/"null" was rejected because it would mask other problems, and "* THIS FIELD HAS BEEN REDACTED DUE TO SENSITIVE INFORMATION *" was rejected for being "too long". Currently we use "XXXXX", which has caused some intern head scratching but is otherwise fine.
- avar 8y agoEasy, you have a framework that validates & sanitizes all your parameters, don't allow any non-declared parameter, and make something like "can_be_logged" a mandatory attribute, then only log those & audit them.
- amelius 8y agoYou prevent a lot of these problems by hashing passwords as soon as possible (i.e., on the client).
- amhokies 8y agoWouldn't that make it easier for someone that has access to hashed passwords in the case of a database leak? They would just have to submit the username and the hashed password (which they now have).
- etruong42 8y agoYou're right, but the attacker won't get the user's original password that they probably reuse elsewhere. If it's just your authentication system hashes that are compromised, the damage can be contained.
- larkeith 8y agoWhile there is merit to clientside hashing, you should always hash serverside as well, lest a leak prove catastrophic.
- jageen 8y agoIn this case client side will have our algorithm (i.e in JavaScript) + private key which we will use to hash the password. If this is the case I could not see any different between giving hacker password or hash-password with algorithm and key.
- tbodt 8y agoI'd replace redacted fields with [redacted], or maybe U+2588