@import org.incal.play.controllers.WebContext @import org.incal.play.controllers.WebContext._ @import views.html.documentation.core @import views.html.documentation.{sectionNavigation, imageSection, section} @import org.incal.play.routes.CustomDirAssets @import org.ada.web.controllers.UserDataSetPermissions @()(implicit context: WebContext) @core("Authentication and User Management") { @sectionNavigation()( ("section_ldap", "LDAP Settings"), ("section_user_management", "Basic User Management"), ("section_permissions", "Permissions") ) @imageSection(id = Some("section_ldap"), caption = Some("LDAP Settings"), picPath = Some("images/documentation/ldap_settings.png"), withLine = true, picOffset = 0) {
Ada does not store any passwords but rather relies on LDAP for authentication.
Several LDAP settings are available, which all start with the ldap prefix (e.g. ldap.dit):
localhost.
Normally set by the environmental variable ADA_LDAP_HOST (in set_env.sh for production).
389.
ADA_LDAP_PASSWORD.
dit is combined with an user id as a suffix: uid=$id,$dit that is passed to LDAP together with a password during authentication.
[].
remote to use a (normal) standalone remote server, local to start an in-memory local server, and none to disables LDAP completely. Defaults to local.
admin and basic) should be enabled. Defaults to false. Warning: once enabled the admin and basic users can log in without any authentication using /loginAdmin and /loginBasic endpoints, which is fine for local (restricted) deployments but should be absolutely avoided for public use!
ssl, starttls, or none. Defaults to none, which means client certificates are disabled and server certificates are always trusted.
true an LDAP sub-search authentication is enabled.
This experimental feature first traverses all sub entries of the dit path. If it finds a requested user it feeds its path (as a suffix) for the authentication together with the user id. Defaults to false.
In nutshell, there are two basic scenarios:
1. if you don't have an LDAP server, don't need authentication, and want to use dummy admin and basic users you can simply set the following lines in custom.conf:
ldap {
mode = "none"
debugusers = true
}
or
ldap {
mode = "local"
port = "65505"
debugusers = true
}
2. If you have an existing LDAP server you want to authenticate against you need to configure the host and bind password environmental variables in set_env.sh
export ADA_LDAP_HOST="ldap.north.edu"
export ADA_LDAP_BIND_PASSWORD="XXX"
and set the following lines in custom.conf
ldap {
dit = "cn=accounts,dc=north,dc=edu"
groups = ["cn=ada-group,cn=groups,cn=accounts,dc=north,dc=edu"]
bindDN = "uid=ldap-reader,cn=users,cn=accounts,dc=north,dc=edu"
}
or without environmental variables (purely in custom.conf) as
ldap {
host = "ldap.north.edu"
dit = "cn=accounts,dc=north,dc=edu"
groups = ["cn=ada-group,cn=groups,cn=accounts,dc=north,dc=edu"]
bindDN = "uid=ldap-reader,cn=users,cn=accounts,dc=north,dc=edu"
bindPassword = "XXX
}
The currently used LDAP settings can be reviewed by clicking on LDAP Settings located in the Admin menu (see the screenshot on on the right).
}
@imageSection(id = Some("section_user_management"), caption = Some("Basic User Management"), picPath = Some("images/documentation/admin_menu.png"), withLine = true) {
There are several basic user management actions admins can conveniently perform:
groups to Ada using the Admin → User Actions → Import from LDAP function.
Admin → User Actions → Purge Missing.
Admin → Users (double click on a table row), adding a new role by clicking admin, and finally confirming with Update.
Admin → Users → Actions → Add a new user).
Note that normally users should be imported automatically from LDAP by invoking the Import from LDAP function.
Admin → Users → Actions → Copy User's Permissions.
Admin → Users → Actions → Filter by permission and entering a permission prefix.
This function is especially handy if you want to obtain a list of all the users who have access to a certain data set, in which case DS:[data set id] must be entered (see the section Permissions bellow).
Admins have access to all the data sets and can perform all the actions throughout the application. On the other side, all non-admin users need to have explicitly assigned permissions to able to access specific data sets and perform specific actions. Basic users can not execute or manipulate any data set import or transformation, or manage other users's permissions (obviously).
All data set permissions start with DS: prefix and can be fine grained to the level of individual actions following the hierarchy: DS:[data set id].[controller].[action].
[controller] corresponds to an actual web controller, which serves actions for the tabs or menu options in the top bar:
dataSet: Views and Analytics
field: Dictionary
category: Categorical Tree
filter: Setting → Filters
dataview: Setting → Views
classificationRun: Analytics → ML Classification → Standard
regressionRun: Analytics → ML Regression → Standard
temporalClassificationRun: Analytics → ML Classification → Temporal
temporalRegressionRun: Analytics → ML Regression → Temporal
→ Custom and selecting a desired data set id, controller name, and action. Note that a wildcard ALL can be selected as a controller or action.DS:ml.eeg_eye_state.dataset.exportViewRecordsAsCsv gives a user right to exportViewRecordsAsCsv for the data set ml.eeg_eye_state.
DS:ml.eeg_eye_state.classificationRun gives a user right to invoke any actions of the controller classificationRun of the data set ml.eeg_eye_state.
DS:ml.eeg_eye_state gives a user full rights to perform any action (of any controller) on the data set ml.eeg_eye_state.
Note that Setting → General is accessible only for admins and also each user can edit (or delete) only the filters and views that he/she created.
In a nutshell, there are three common permission scenarios facilitated by the following functions:
Standard (recommended) - invoked by
→ Standard.@UserDataSetPermissions.standard.mkString("\n")
View-Only - invoked by
→ View-Only.@UserDataSetPermissions.viewOnly.mkString("\n")
All - invoked by
→ Custom and choosing ALL as a controller.