Multi-user authentication

Hi there,

First of all, thanks for adding the basic authentication for Prodigy in version 1.8.
In our annotation project, we have a few users that are going to annotate text content. 1- Can each of them have their own user/pass? i.e. Can we add more than one user/pass for the basic authentication?
2- What is the best way of adding user information as metadata to each session? We want to have different weight for annotations coming from different users.

More information: We have deployed Prodigy in a docker.

Thanks a lot!

1 Like

Glad you find it useful! If you want different credentials per user, it's probably easiest to start each task as a separate process, and then use the environment variables to pass different username/password information to each process. The basic auth settings let you require authentication before accessing the API, but they do not have a concept of what a user "means".

In Prodigy v1.8, a key "_session_id" is automatically added to each example that's saved in the database. This consists of the dataset name (so that this info is preserved even when merging sets) and the session ID specified as ?session= (or "default"). For instance, a session ID could be cool_dataset-ines or cool_dataset-default. This should let you implement you logic for both user datasets (if different annotators get different datasets) or multi-user sessions (if multiple named annotators are adding to the same dataset).

How do you actually use the super basic 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.