Wondering how to enable multi user prodigy with individual logins
Hi @provRaminHamediZavie !
By users, I assume you mean annotators, not developers.
Out of the box, Prodigy does not support proper user authentication out of the box as it's so hard to design for all possible users (many companies would use their own):
@mlwelles We’ve left this open-ended so far because we’ve found most users have fairly specific requirements from their organisation about how things need to be secured. Since a lot of users have to plug in their own authentication anyway, we wanted to make sure we didn’t have anything in place that might take effort to undo.
Your models definitely shouldn’t be “open for the entire world to train”, though! Prodigy is a developer tool, so the normal usage is either the developer working themselv…
But there is some basic mult-user authentication:
@nix411 You should be able to just set the environment variables PRODIGY_BASIC_AUTH_USER and PRODIGY_BASIC_AUTH_PASS on the command line when you run Prodigy. For example:
export PRODIGY_BASIC_AUTH_USER=username
export PRODIGY_BASIC_AUTH_PASS=supersecret
prodigy ner.teach ... # etc.
Another option is to set up a proxy server
I would recommend avoiding trying to implement SSO directly in Prodigy or via an additional application, as that can get rather complicated.
Instead I would suggest using a proxy in front of Prodigy, such as the oauth2 proxy . This has the nice benefit of already being containerized which should make getting it setup a little easier.
This post can also help:
Ok, this almost seems to be the answer:
server {
listen 80;
if ($request_uri = "/") {
return 302 /?session=$remote_user;
}
location / {
auth_basic "Password Required";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://0.0.0.0:8080;
}
}
$request_uri contains both the URI and the arguments. This checks if no session argument is present and does a redirect. Digging into the bundle.js code, it seems the page looks to the window.location variable for the sess…
Hope this helps!