DescriptionNeed to start thinking more seriously about how best to handle authentication (any by extension, encryption).
My original plan had been that the "room password" would never be shared with the server and instead would be used as a shared encryption key by the clients to encrypt message payloads. Despite that, for some reason, I added a passhash field to the rooms table.
We also need some level of user auth when they join a room. Knowing the room password shouldn't be sufficient to let them retrieve messages (as they'd then be able to decrypt them).
One option might be to merge the two into one, of the format roompass:userpass and just have the client split them and use each appropriately.
In any case, needs some thoughts laid down on the best approach so that decisions are recorded.
Activity
2018-05-13 09:18:22
So
We do still need to design and build the user authentication though. Currently, if you know the room owner's username and the room password you can sign in as them.
There's a related tangent here though too. LOC-5 addressed a scenario where users can pretend to be the
So it's still possible for a malicious user to send messages that'll appear to be from
The reason I haven't fixed that yet is because we first need to work out the best means of authenticating the sending user's requests. Ideally the message table shouldn't contain a plaintext list of usernames as it becomes too easy to identify patterns - which user sends messages most frequently, etc. Fixing that has a massive overlap with the auth mechanism.
So, there are a few challenges to be overcome here:
- Need to generate (preferably client side) a password for new users and store a hash for them on the server
- A
- Assuming authentication succeeds, need to set something so that other requests can also be validated
- Ideally, that something can then be used to help close the remaining sending as
2018-05-13 09:32:14
View Commit | View Changes
2018-05-13 09:32:14
View Commit | View Changes
2018-05-13 10:46:13
View Commit | View Changes
2018-05-13 10:54:13
View Commit | View Changes
2018-05-13 11:06:13
View Commit | View Changes
2018-05-13 11:12:58
The simplest would seem to be some sort of a session key, just need to make sure it's sufficiently random as not to be easily guessable.
2018-05-13 11:30:13
View Commit | View Changes
2018-05-13 11:38:13
View Commit | View Changes
2018-05-13 11:38:14
View Commit | View Changes
2018-05-13 11:52:13
View Commit | View Changes
2018-05-13 11:52:13
View Commit | View Changes
2018-05-13 11:52:14
View Commit | View Changes
2018-05-13 11:54:19
2018-05-13 12:56:43
2018-05-13 12:56:43
2018-05-13 12:56:47