Dw/devtests password credential#5
Open
davidwaroquiers wants to merge 6 commits into
Open
Conversation
cd73d46 to
4bf37cc
Compare
scoped styles to the components in the template itself as this is a one-off feature only for testing purposes and styles are not expected to be reused elsewhere.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added simplistic username/password credential login for testing purposes. It is often difficult to test "interactions" between different users, e.g. different access rights etc ...
This PR adds an option to easily add a simple user with a username+password credentials logging. This can only be used if TESTING is true (this is to be discussed, maybe we could have a separate environment variable, e.g. TESTING_LOCAL_USER_PWD)
When TESTING is true, a username/password login option is shown in the logging drop down. If a test user (e.g. "alice") is registered as such, you can login with that user using the predefined username and password.
To register a test user, a new invoke command has been added:
invoke dev.create-test-user --username USERNAME --password PASSWORD --display-name "DISPLAY_NAME".
Note that the username and password are just stored locally in a json file. There is absolutely no attempt to make this a secured way of accessing datalab and this is only meant to be used for testing purposes. This is very clearly indicated in the web application when this option is active:
When clicking on Username/password login, you get there:
This option is only active when TESTING is true. When TESTING is false, the identification route for username/password is not registered and the webapp does not show the username/password login option.