-
Notifications
You must be signed in to change notification settings - Fork 259
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
Player Password File for "account database" #2917
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 65 of 65 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @cwisniew)
I haven’t looked through the whole thing (on my phone), but I believe there’s a bug in |
As the JVM is started with |
Idk. The documentation says it’ll use the “platform default”. I took that to mean, well, the default for the platform, not the value set by a command line parameter. In any case, if the locale is being forced by the sending function, shouldn’t it be forced on the receiving side, just for the sake of orthogonality if nothing else? Besides, do you really want to rely on a command line parameter to ensure the code works properly when adding 9 characters to the source code would guarantee it? :) |
Is the included web endpoint necessary for this feature, or did it get included on mistake? |
Well, we do rely upon another dozen or so command line parameters to insure the code works properly so not a huge concern but putting that charset parameter in will make it more consistent and potentially avoid problems in the future. |
I will be making use of it in the UI (and potentially bulk updates) for the epic. |
Another one: You talk about "encrypting" passwords. But you hash them, right? |
Hashed with PBKDF2WithHmacSHA1 |
This PR adds a player account file which contains usernames and passwords
Note this only the password file and authentication pieces (including public / private key).
There is still the user interface and macros to be developed as next step, but its still useable even if it does currently require manually editing of the player password file.
The password file is stored in the passwords.json file in the config subdir of the data directory (e.g. ~/.maptool-rptools/config/passwords.json
An example of this file
The "password" field is after encryption (using the salt specified), to add a user you can add the plain text password without the "salt" and when the file is read (during start server) it will encrypt the password and rewrite the file with the encrypted password and salt (a backup of the old password file will be created). It's also possible to add new entries without editing the file by creating a passwords_add.json file in the same directory with the same format and on "start server" this will add/replace passwords in passwords.json (this method also will encrypt any password without a salt)
e.g.
Will be replaced with
public keys are stored in the config/keys subdirectory, a player can have more than one public key which can be stored in multiple files or multiple in a single file. The format of public key is the same as that displayed / copied from MapTool (see below)
When starting the server select the "Use MapTool Password file" to start with the password file (this is also the trigger for reading file and encrypting passwords as described above)
If this checkbox is checked the person starting the server will still connect with the specified name in the dialog which DOES NOT need to be in the password file.
You can display the public key in the preferences dialog, authentication tab...
To connect to a server using public key you can just specify the player name that server expects a public key for and the public key will be used automagically... There needs to be changes to the connect to server dialog so players dont need to enter a dummy password an issued has been created for this (2916)
The value copied for the public key in the password file is exactly the same as copied to the clipboard with the "Copy Public Key" button.
Fixes #2906
Fixes #2915
This change is