Hi Meltano team, I see that the RBAC authenticatio...
# announcements
j
Hi Meltano team, I see that the RBAC authentication right now is on alpha but is there a way that I can create users with credentials, so that I can share the webui to my colleagues. Thanks!
m
Hi, you can use the
meltano user add
command, it's right here: https://meltano.com/docs/command-line-interface.html#user
You should also run
meltano
using
MELTANO_AUTHENTICATION=1 meltano ui
Thus you'll be greeted with a login screen, and everything should fall in line.
j
Great! Thanks @micael_bergeron will try it out.
Why can't I access my user account? No error occurs even I input the right password or not
m
Looking at it.
Are you using a self-hosted instance or the cloud instance on
<http://meltanodata.com|meltanodata.com>
?
j
Self hosted, installed locally on a vm instance.
I've updated to v1.16 problem still persist
m
First, make sure there are users in your system database using:
sqlite3 .meltano/meltano.db 'select id, username from user;'
Also, if you run
meltano ui setup
and there were no secrets (see
ui.cfg
), then generating new secrets will effectively invalidate all passwords. That command should not overwrite your secrets if you already have it. You'll have to update the user's passwords in that case, using
meltano user add --overwrite <username> <password> --role admin
There is definitely room for improvement here šŸ™‚ Let's get you running then we can create an issue to improve this flow.
One thing that comes to mind would be: • abort
meltano user add
if the secrets are not generated • add a warning on
meltano ui setup
that it will invalidate all passwords
j
Ok will try it out, Also what is the purpose of meltano ui setup. I've red that it is for production grade environment so I'm not using it, and I can't seem to find additional documentation regarding that.
I can't seem to follow this instruction
sqlite3 .meltano/meltano.db 'select id, username from user;'
, am I going to input it on bash? This occurs when I input it.
Copy code
root@15b141ed17ff:/project# sqlite3 .meltano/meltano.db 'select id, username from user;'
bash: sqlite3: command not found
Oh, I'm sorry I get it now, so I must create a python script that check the user database using your given query, Yeah I've done it and luckily there are users exist on the db.
It's weird when I run
Copy code
meltano ui setup server_name
It generates ui.cfg file right? But after when I access the webui this prompts. Not found error (see screenshot)
Bu then I deleted the ui.cfg file all works fine, but no authentication yet.
Anyone?
m
Let take another look here, I'll try to reproduce and get back to you.
Okay, are you running on
localhost:5000
or do you use a domain name to access the service? The
meltano ui setup
command expect to have the full server name (as per Flask https://flask.palletsprojects.com/en/1.1.x/config/#SERVER_NAME) which might be overzealous a bit. Setting that will cause the server to ONLY respond to requests that matches that hostname, hence why you had Not Found errors. I'll open an issue to remove the
SERVER_NAME
setup from this command or make it optional. https://gitlab.com/meltano/meltano/issues/1668 Workaround: Removing the
SERVER_NAME
entry in the generated
ui.cfg
will remove this restriction.
meltano ui setup
generates safe secrets, so that the user passwords and sessions are safe One caveat is that changing the secrets will invalidate all the current passwords, hence it should be only run once when you first initialize the project. So in your case, you might have an Invalid Password because the user was created with
meltano user add …
with a different secret. I will open an issue about moving that flow to be automatic in the
meltano init
command. (https://gitlab.com/meltano/meltano/issues/1667) Workaround Use
meltano user add --overwrite <username> <password> --role admin
to reset the password.
@jace hopefully this will help you getting up and running
j
Ok will try it out. Thanks @micael_bergeron
Doesn't work for me @micael_bergeron, I'm hosting it on a VM instance with the latest docker image. I remove the SERVER_NAME entry on ui.cfg overwrite the user account, produce a python script to check if the useraccount exist yeah, it exist, but still I can't use it on the log-in page.
r
Same problem here. Not using user login currently, but using latest meltano, hosted in DO. Using a hostname with dots to access meltano. But getting: Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
m
Are you binding port 80 or 5000?, if you run off
5000
then the
SERVER_NAME
has to be
<http://example.com:5000|example.com:5000>
I opened an issue to remove it altogether
j
Done with it, remove the SERVER_NAME entry the problem still persist as well as including the port number on together with the server_name. Weird right? Does it work on your end @micael_bergeron? šŸ¤”
m
Yes, well this is how all of
<http://meltanodata.com|meltanodata.com>
is structured.