Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 2.08 KB

security.md

File metadata and controls

34 lines (21 loc) · 2.08 KB

Security

Layman`s security uses two well-known concepts:

Authentication

Authentication (authn) is the process of obtaining and ensuring identity of user from incoming request to REST API.

Authentication is performed by chain of zero or more authentication modules controlled by LAYMAN_AUTHN_MODULES setting. When request comes to REST API, security system calls authentication modules one by one (one module at a time), until one module ensures user identity or until there is no module left. If no module ensured user`s identity, user is considered as anonymous user.

Currently there are two authentication options:

Authorization

Authorization (authz) decides if authenticated user has permissions to perform the request to REST API.

Authorization is performed by single authorization module controlled by AUTHZ_MODULE setting. When authentication is finished, security system calls authorization module that either passes or raises an exception "Unauthorised access" returned as HTTP Error 403.

There are two types of operations used in permissions:

  • read: includes all GET requests
  • write: includes all POST, PUT, PATCH, DELETE requests

Currently there are two authorization modules implemented:

name description
read everyone, write everyone everyone including anonymous user is able to read and write to anybody`s workspace
read everyone, write owner everyone including anonymous user is able to read anybody`s workspace, but only user that owns the workspace is able to write