Database Authentication
Database Authentication allows an experimenter to limit the names with which subjects are allowed to connect to the multistage server, by checking the names against entries in a database, as specified by the experimenter.
Enabling Database Authentication
To enable Database Authentication, the experimenter must modify (or add) a line to the mult-server.properties file in the conf subdirectory of the multistage installation. The verifier parameter must be set to the value DatabaseId?:
verifier=DatabaseId
Configuring Database Authentication
The parameters for configuring Database Authentication are to be specified in the auth-db.properties file in the conf subdirectory of the multistage installation.
| Field | Value Type | Required | Default Value | Purpose | Example |
| dbDriver | String | Yes | None | The java classpath of the database driver which will be used to talk to the database specified | dbDriver=org.gjt.mm.mysql.Driver |
| dbServer | String | Yes | None | The address of the server where the database is located | dbServer=jdbc:mysql://servername.serverdomain.com:3306/name |
| dbName | String | Yes | None | The name of the database where the names will be stored | dbName=name_database |
| dbLoginColumn | String | Yes | None | The name of the column in the database that the acceptable login names will be stored | dbLoginColumn=login |
| dbLogin | String | Yes | None | The username needed to log into the database | dbLogin=username |
| dbPassword | String | Yes | None | The password needed to log into the database | dbPassword=qwerty |
For the examples above, the Database Authentication service would try to use a mysql driver called org.gjt.mm.mysql.Driver (which would need to be located in one of the .jar files in the 'lib' subdirectory of the multistage installation) to connect to a database at jdbc:mysql://servername.serverdomain.com:3306/name which is called name_database and whose entries have a column called login which contains the login names the experimenter wants subjects to be able to log in with. The software would try to log into the database using the user name "username" and the password "qwerty".
If any of these parameters are incorrect in the configuration files, and the software has trouble connecting or finding names in the database, Database Authentication will be abandoned and subjects will be able to log in with any name they choose.
