japonicus icon indicating copy to clipboard operation
japonicus copied to clipboard

Protect Japonicus web UI with username+password?

Open rcoenen opened this issue 6 years ago • 3 comments

Now that I have everything up & running on an EC2 instance:

I have the nice web interface running for Japonicus. Can this protected with a simple username / password (basic auth)

rcoenen avatar Jul 04 '19 00:07 rcoenen

Flask should have some option for it, but I don't know... Try to do a research and update the repo :3 If it's built in on Flask it should be simple.

Gab0 avatar Jul 04 '19 03:07 Gab0

Yeah I have been messing around with that for a few hours. I'm learning Flask, Dash, Python, etc here in real-time. I guess I should try to hook in the basic auth in /japonicus/promoterz/webServer/core.py somewhere. Any pointers, code snippets?

rcoenen avatar Jul 04 '19 03:07 rcoenen

Ok update: I have it working now. Turns out basic auth had to be added to the Dash app, not the Flaskh server (or in either case, this is how I got it to work)

  1. yes the file to modify is /japonicus/promoterz/webServer/core.py
  2. helpful example found here https://dash.plot.ly/authentication -- see Basic Auth Example

rcoenen avatar Jul 04 '19 04:07 rcoenen