Skip to content

Dw/devtests password credential#5

Open
davidwaroquiers wants to merge 6 commits into
dev-environment-docker-composefrom
dw/devtests_password_credential
Open

Dw/devtests password credential#5
davidwaroquiers wants to merge 6 commits into
dev-environment-docker-composefrom
dw/devtests_password_credential

Conversation

@davidwaroquiers

@davidwaroquiers davidwaroquiers commented Jun 20, 2026

Copy link
Copy Markdown
Member

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.

image

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:

image

When clicking on Username/password login, you get there:

image

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.

@davidwaroquiers davidwaroquiers force-pushed the dw/devtests_password_credential branch from cd73d46 to 4bf37cc Compare June 20, 2026 10:28
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.
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

Successfully merging this pull request may close these issues.

2 participants