Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Package summary

There are two kind of User in Cytomine: human user (User) and software user (UserJob). Each of them extends the SecUser class. Each user has some roles (SecRole) and some permissions on domain instances.

To have more details about permissions, check the permission guide.

Package main classes

Domain

Description

Main properties

SecUser

Generic user

String username
String password
String public/privateKey

User

Human user. Extend SecUser class

String firstname
String lastname
String email

UserJob

Software user. Extend SecUser class

Job job
User user (human user that launch the job)

SecRole

A user role (admin, user,...)

String authority

SecUserSecRole

A link between a user and a role

SecUser secUser
SecRole secRole

Group

A set of user

String name

UserGroup

A user in a group

SecUser user
Group group

Package description

User

User and UserJob extends SecUser. User and UserJob are able to login to Cytomine. When a user run a job, this will create a new UserJob with the same user role.

...

A software user (UserJob) will use a client and will log thanks to public and private keys by generating a signature.
The main code is located in  APIAuthentificationFilters.tryAPIAuthentification(). This method will check if the signature is valid.

Role

There are 4 kinds of user:

...

This user will now be logged as an admin. He may the close its admin session.
This service calls the closeAdminSession.

Connect As

An admin user is able to be connected as another user. 
This functionnality simply calls the /j_spring_security_switch_user service (with POST param: j_username:"xxx").

...