Overview

Documents the security and user management features.

Details

The security service provides authentication, authorization, and logout services. A user timeout also supported so users do not remained logged in indefinitely. The default timeout is set to 2 hours and can be easily changed. All REST services are secured by the use of an authorization token that is obtained from the security service and passed to other calls.  For a truly secured environment, it is recommended that the system be run under HTTPS instead of HTTP. Otherwise usernames, passwords, and authorization tokens will be passed in plain text with HTTP requests.

When a user authenticates, an authToken (a random UUID) is passed back to the client which can be used on subsequent calls to the server.  This authToken is checked against a map of valid tokens and can be used to identify the user who was assigned this token.   The time of an authentication request is recorded by the authToken so that it can be determined when the last request with this token was made.  If upon checking an authToken the last request was longer ago than the "ihtsdo.security.timeout" setting, then the authorization is rejected and the user is redirected to log in again.

Restarting the server clears all authTokens and users must re-authenticate. The application will redirect users to the login page if their authToken is no longer valid (either because of inactivity timeout or server restart).

For the production IHTSDO deployment, which uses IMS, the sequence of events looks like this:

User Management

While authentication of users is offloaded to the IHTSDO identity management service, there is some user management within the application itself.    Users can be "created" within the system either manually or by having them log in.  Whenever a user logs in, the local tracking of user data is updated to reflect the current state of IMS.

The user's application role is also determined by IMS via the "refset-users" and "refset-administrators" groups in the IHTSDO crowd deployment.

A user who is not logged into IMS can still access the tool, however they will see only the contents of the directory page.

Authorization

Each REST call not only verifies the authToken is valid but also authorizes the user's role against the task being attempted.  Read-only services generally only require VIEWER role where as things like project creation and refset editing require a USER role.   Any REST service that takes a project or map project id requires a "project role" by that user on that project.  See REST documentation for more details.

User Roles

The system make use of "application roles" and "project roles".  There are 3 application roles:

There are four project roles:

Configuration

The following configuration settings affect security.

Property
Default Value
Notes

security.handler

 

IMSUsed by production server to leverage the IMS authentication scheme. Other deployments can use DEFAULT or custom security implementations.

security.timeout

7200000Inactivity timeout, in milliseconds.

References/Links