asynqmon icon indicating copy to clipboard operation
asynqmon copied to clipboard

Add some user auth to dashboard

Open koddr opened this issue 3 years ago • 7 comments

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!

koddr avatar Apr 14 '21 17:04 koddr

Yep, sounds good! We should allow options to enable auth (a simple auth to begin like you suggested).

Let me look into this 👍

hibiken avatar Apr 14 '21 17:04 hibiken

I also hope that hibiken can implement this function @hibiken

tinnkai avatar Apr 13 '22 14:04 tinnkai

any updates?

tonytony2020 avatar Apr 17 '22 23:04 tonytony2020

@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!

hibiken avatar Apr 18 '22 18:04 hibiken

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

syahidfrd avatar Jul 18 '22 05:07 syahidfrd

Is it supported now?

muqiuren avatar Jul 31 '23 06:07 muqiuren

I have a PR for this! https://github.com/hibiken/asynqmon/pull/313 @hibiken

zekiahmetbayar avatar Oct 26 '23 11:10 zekiahmetbayar