User (user)

Description

User account of the system in a domain.
Defines authorization parameters and access boundaries to system functionality through HTTP and WebSocket API. The user’s role set determines the level of API access.

Limitations

  • The collection is available in any domain. Each domain can have a special set of roles (opts.roles) for users.

  • The system’s operating logic uses domains and the objects belonging to them when implementing functionality and determining access for individual users. All data within a domain is closed by default. However, user accounts are available to administrators of the parent domain. Belongs to the data layer.

Fields

Entity structure
{
  "id": uuid,
  "name": str,
  "login": str,
  "pwd": str,
  "timezone": float | 'default',
  "opts": {
    "title": str,
    "roles": array<str>,
    "tags": array<str>,
    "copy_to_domains": array<str>,
    "comment": str,
    "sites": array<str>,
    "allow_script_crud": bool
  },
  "security": object,
  "ext": {
    "ct": date,
    "lwt": date,
    ...
  }
}
Table 1. Fields
Specification Description

Field: id
Mode: inout
Type: uuid
Default: generated

Identifier. Can be specified at creation, otherwise generated by the system.

Field: name
Mode: in
Type: str
Default: required

User name.
May contain the characters A-Za-z0-9_-.~!. Length must not exceed 1000 characters.

Field: login
Mode: in
Type: str
Default: required

User login.
May contain the characters A-Za-z0-9_-.~!. Length must not exceed 100 characters.

Field: pwd
Mode: in
Type: str
Default: required

User password.
May contain the characters A-Za-z0-9_-.~!. Length must not exceed 100 characters.
Secret: masked as ***** when read (in export, the hash ciphertext); the password hash is stored and the plaintext value cannot be recovered (Encryption and keys).

Field: timezone
Mode: in
Type: float | "default"
Default: "default"

User time zone. From -12 to 12, for example 3.5, or "default" to use the server time zone.

Field: opts
Mode: in
Type: object
Compound field

Field: opts.roles
Mode: in
Type: array<str>
Default: empty

List of roles assigned to the user personally.
Possible values are available via API roles.

The full set of user roles is also determined by the user’s membership in groups.
The entire set of roles assigned to users is available via API users_caches.

For master domain accounts that are copied to other domains ('copy_to_domains'), it may be necessary to specify product layer roles installed in the child domain. Such roles are not present in the master domain role list and must be specified manually.

For a user to be able to modify entities of static collections of the domain center, at least one of the roles must be assigned: 'admin', 'crud', 'crud.*' (where * is an arbitrary string). It must be assigned directly in the user account (in this field). Otherwise the domain center will not allow the modification request, even if the role routes allow it.
See Role name.

Field: opts.tags
Mode: in
Type: array<str>
Default: empty

List of user tags.
Used for matching with entities of other classes.
Specified as a comma-separated list of arbitrary string values.

Field: opts.copy_to_domains
Mode: in
Type: array<str>
Default: empty

Domain masks.
The field exists only in the master domain.
Wildcards can include:

  • * – any number of any characters.

  • $ – any number of any characters except a dot.

  • ? – any character except a dot.

Examples:
  • $.domain.ru – any first-level subdomain relative to domain.ru;

  • $.$.domain.ru – any second-level subdomain relative to domain.ru;

  • domain.$ – a domain in any zone;

  • *.domain.ru – any subdomain of any level in the domain.ru child domain tree;

  • a?.domain.ru – any first-level subdomain relative to domain.ru whose name consists of two characters, the first being a.

Field: opts.self_registered
Mode: inout
Type: bool
Default: false

Set to 'true' by the system when created during self-registration of a user.

Field: opts.info
Mode: inout
Type: object
Default: empty

Filled by the system during automatic registration or when updating data in an external system during OAuth authorization.

Field: opts.title
Mode: in
Type: str
Default: empty

Arbitrary title

Field: opts.comment
Mode: in
Type: str
Default: empty

Arbitrary comment

Field: opts.sites
Mode: in
Type: array<str>
Default: empty

List of sites to restrict data access. The field exists only in the master domain for users with the sitemonitor role.

Field: opts.allow_script_crud
Mode: in
Type: bool
Default: false

Switch allowing CRUD operations from scripts on behalf of this user.
By default, a 'system' user with allowed access is created in the domain. If policies need to be tightened, this user’s rights should be revoked.
For a script to be able to execute a request to the domain center or data model, the user must also have the corresponding rights (roles).

Field: opts.web_sess_limit
Mode: in
Type: int
Default: 10

Maximum number of web sessions for the user. The number is defined as 1 cookie session + n token sessions. If authentication exceeds the session limit, a web session limit exceeded error is returned.

Field: opts.phonenumber
Mode: in
Type: string
Default: empty

User phone number applied to the sipuser account during hot-desking via the Hot-Desk subscriber feature or from a client application.
May contain the characters 0-9, no more than 100.

Field: opts.pincode
Mode: in
Type: string
Default: empty

User PIN code used for hot-desking the user and the sipuser account via the Hot-Desk subscriber feature.
May contain the characters 0-9, no more than 100.

Field: security
Mode: inout
Type: object
Compound field

Allows extending the compound with arbitrary keys and values. Not available for viewing or modification by the user.

Field: ext
Mode: inout
Type: object
Compound field

Allows extending the compound with arbitrary keys and values. Available for viewing and modification by the user.

Field: ext.ct
Mode: out
Type: date
Default: generated

Object creation time

Field: ext.lwt
Mode: out
Type: date
Default: generated

Time of last modification of the object

Field: ext.adminPermissions
Mode: in
Type: array<str>
Default: empty

List of sections of the 'Settings' application available to the administrator account.
Relevant only for users with roles that open access to the Settings application and to the corresponding REST API endpoints.
For the standard administrator account (login 'admin'), the parameter does not apply; the authorized user has access to all sections.
The special value '' opens access to all sections: "adminPermissions": [""]
Specific sections can be selected in the Settings application.

See also

Logical roles

  • mdc and sdc manage accounts.

  • ws performs authorization when processing API requests.