Scope admin quickstart
Goal
In this guide, the role and ability of the scope admin is introduced.
Scope, users and members
The scope admin manages research scopes (in short scopes). A research scope is a long-running research initiative and the namespace under which datasets (and files, sequences and collections) can be stored. Per scope, the scope admin manages which users are member of a scope. Members of a scope have permission to read and add data to a scope. A scope admin user, when added as member to another scope, does not immediately become scope admin of that scope.
The QDL CLI is used by scope admins to manage scopes which will be explored in this guide. For some commands we show the alternative with the SDK, but the SDK is not required.
Prerequisites
- have the scope admin role
- install the QDL CLI, see installation
Get help from CLI
It is good to know that the CLI has the help option to show the documentation of each command:
Login
You need to log in to perform admin operations:
After executing the login command, the QDL CLI will try to open the default web browser. You will be redirected to the login page of your institute, and asked to log in. If the default browser does not open automatically (after one minute), please copy the returned URL into the web browser, and login with your institution. This can be done using any device with access to a browser and internet.
The QDL CLI will be prompted when the login was successful or will time out when no successful login has been made within a few minutes.
A login session will remain valid for some time, but it might be required to login again after a certain period.
List existing scopes
As scope admin, it is your responsibility to manage scopes for researchers. It is good to know which scopes already exist within QDL. Scopes within QDL can be listed using:
Alternative with SDK
The list of scopes can be filtered by scope fields such as the (partial) name of a scope:
Please check the help for a complete list of parameters.
You can also only list the scopes you are member of:
Create a new scope
As scope admin, you are allowed to create new scopes. Note that a new scope is not made on a daily basis, but infrequently, e.g. tied to a new grant. A scope is uniquely identified by the scope unique identifier, the scope UID. To create a scope, provide a UID and name:
Note that the order of the scope UID and the scope name is important. Here we attempt to create a random scope UID by
using a prefix and the system variable $RANDOM, and subsequently store the random UID in $SCOPE_UID which will be
used throughout this guide. The UID of the scope is used to uniquely identify the scope and is required to create all
other data linked to this scope, such as datasets, collections, sequences, files and schemas. For non-testing purposes,
please pick a more descriptive scope UID which helps your researchers. The UID (or any other UID) should not contain
any spaces or special characters (- and _ are allowed). The UID of a scope can no longer be altered when the scope is
created (just like any other UID). However, when the scope is still completely empty (i.e. no datasets, collections,
schemas or sequences), it is still possible to delete the scope. Upon creation, the scope admin is made owner of the
scope.
Please see the help function for a full list of options available.
Restricted and not restricted scopes
When you choose the `--not-restricted` option when creating the scope, the scope becomes readable for all users of QDL, i.e. all data can be downloaded by anyone who can log into QDL. This makes it easier for researchers to investigate whether this scope is interesting for them. It is still required to be a member of a scope to be able to add data to it. When the `--restricted` option is used (which is the default option), only members of the scope can read (and write) the data from the scope.Update scope details
As scope admin, if you are owner of the scope, you can alter certain details of the scope. Here we change the description of the scope:
Please refer the help of this command for the full set of options.
Subsequently, the scope admin can make existing users and groups member of a scope that require (write) access to the scope.
List existing users and groups
You can list or find all users known to QDL:
The list can optionally be filtered on name:
Please see the help for all options to filter the list of users.
It can be convenient to only list the unique identifier of the user, the user sub:
Groups can also be listed:
Similar to listing users, by using -q, only the unique identifier of the group can be printed. Please see the help
for all options to filter the list of groups.
You can also list all members of a group:
Scope admins do not manage users
As scope admin, you are not able to create new users. Users are added to the identity provider of QuTech. When users are added, they receive a confirmation email. This allows the user to log in, using the QDL CLI, to QDL using their institutional identity, e.g. their TU Delft credentials.
Users are also added to the appropriate user groups. In doing so, the new user directly has access to all the scopes the group already has access to.
List current members of a scope
All members of a scope can be listed by:
This prints all users and groups that are member of the scope. If you want a flat list of all users that are member, including the users part of a group:
If you only want to list the individual users, excluding the users from a group:
If you only want to list the groups that are member of the scope:
In certain cases, you only want to print out the unique identifiers. To print the unique identifiers of all users that
are member, the option -q can be used:
Add member to scope
A user can be added to a scope by the scope admin or any other member of the scope:
The user must have logged in once to QDL to be able to add the user to QDL. The unique identifier of the user above is the QuTech data steward. Only members of scopes are allowed to add data to scopes.
Add a group as member to a scope
A group can also be added to a scope by a scope admin, making all users within that group, member of the scope. Note that, unlike a single user, groups can only be added by a scope admin, not regular members of a scope.Remove member from scope
It can become necessary to remove a member from a scope, and thus their privileges from the scope:
Remove a group as member from a scope
A group can also be removed from a scope: Note that when a user is removed from a scope, but is also part of the group which has access to the scope, the user still has access through their group membership.Note that the user (or group) is not removed from QDL. Only their membership from the scope is removed.
Delete scope
Mistakes can happen, also when creating a scope. Luckily, a scope can still be deleted as long as there is no data (datasets, sequences, schemas or collections) stored within the scope:
Executing this command removes the scope entirely. When creating a scope for researchers, it is advised to pick a recognizable UID and name.
Other scope admin tasks
The scope admin also manages the schemas a scope. A schema is used to validate datasets using JSON Schema which ensures consistency and reliability of datasets within the scope.
Additionally, a scope admin can also setup the access from shared environments to QDL using API tokens.
However, these topics are outside the scope of this guide. Please see the how-to sections for more advanced use cases of QDL.
Further reading
This completes the tutorial for the scope admin. Please read the quickstart for users for how to use the SDK to manage datasets or the how-to section for more advanced use cases.