asynqmon
asynqmon copied to clipboard
Add some user auth to dashboard
Hi,
I think is a good practice to cover Asynqmon dashboard with some auth procedure to login. A common case is when such tools are put side by side in a Docker container and need to be accessed remotely over the network.
For example, we can set this username
and password
by environment variables at starting Docker container:
docker run --rm \
--name asynqmon \
-e ASYNQMON_USER=user \
-e ASYNQMON_PASSWORD=password \
-p 8080:8080 \
hibiken/asynqmon
And catch them by simple os.Getenv
function in backend.
Yes, it's very-very simple solution, but works and solves all needs on the topic.
Login form can looks like this (without links, only login+pass+button, of course): https://material-ui.com/getting-started/templates/sign-in/
What do you think about this, @hibiken? 😉
P.S. also, we can make a little hard thing: separation of users into roles (e.g. a super-admin and a guest, like RabbitMQ does). But that's a start for the future!
Yep, sounds good! We should allow options to enable auth (a simple auth to begin like you suggested).
Let me look into this 👍
I also hope that hibiken can implement this function @hibiken
any updates?
@tinnkai @tonytony2020 thanks for the comments! I'm planning to invest some time in tooling (CLI, Web UI) in the coming weeks. So I'll take a look at this issue then!
Hi, i have made asynqmon with simple basic auth, you can check this https://github.com/syahidfrd/asynqmon-handler
docker run --rm \
--name asynqmon-handler \
-e ASYNQMON_USER=admin \
-e ASYNQMON_PASSWORD=secure123 \
-p 3000:3000 \
syahidfrd/asynqmon-handler
Is it supported now?
I have a PR for this! https://github.com/hibiken/asynqmon/pull/313 @hibiken