ONVIF credentials

A VMS or a video player signs in at the sensor with two values: a username and an application key as the password. The username is the name of a user account of the sensor, or the name of an ONVIF user that a VMS created on that account. The key needs the option ONVIF / RTSP access; a key without it does not work for ONVIF.

The quickest way is Setup on the ONVIF card of the Configuration Dashboard, which creates the key and shows both values, see Set up ONVIF. On a device without an administrator, the setup also creates them by default and shows them once: an application key of the administrator account with the access level AUTHORIZED, used with the name of that account as the username, for example admin.

How the sensor checks the credentials

  • ONVIF and RTSP use the user accounts of the sensor. Manage the accounts in the WebGUI, see Manage user accounts.

  • Each account has at most one ONVIF key of its own, which the VMS uses with the account name as the username.

  • Beyond that key, a VMS with administrator rights can create ONVIF users, each with its own username and password, see ONVIF users.

  • The sensor rejects every ONVIF request that needs credentials until at least one active account has a key with ONVIF / RTSP access. A key of a deactivated account is not accepted.

  • The VMS sends the credentials with HTTP Digest authentication or as a WS-Security UsernameToken with a password digest, whichever it supports. HTTP Basic authentication and a plain text password in the UsernameToken are not accepted.

  • A wrong password does not block the account in the WebGUI. The sensor answers each further wrong attempt for the same username a little later, up to two seconds.

What a VMS may do

The sensor follows the default access policy of ONVIF. The access level and the read-only access of the key decide the ONVIF user level the VMS works with, never more than its account allows:

Key ONVIF user level Allowed

ADMIN

Administrator

Everything, including setting the time, the network and the ONVIF discovery, rebooting, restoring the factory settings and managing ONVIF users.

AUTHORIZED

Operator

The video stream, the events and the media settings, such as resolution and encoding. Not the time, the network, a reboot, the factory settings or the ONVIF users.

AUTHORIZED or ADMIN, read-only

User

The video stream and the events, and reading the device information and the settings, without changing any of them.

The VMS receives Not authorized for an operation its level does not allow. Give a VMS an ADMIN key only if it manages the sensor, for example its time or its network, or if it needs one to add the device.

The hard factory reset of ONVIF works like Erase everything in the WebGUI: it deletes the network settings and the user accounts with their application keys, see Reboot, reset and back up. The soft factory reset of ONVIF works like Reset the settings: it restores the rest of the configuration to its factory settings and keeps the network settings and the user accounts. A VMS with an ADMIN key can do both. The sensor reboots afterwards.

Create the key on your account page

  1. In the sidebar, click your account name at the bottom to open your account page.

  2. In the Application keys panel, under Create application key, fill in:

    Field Value

    Purpose

    A description, for example the name of the VMS.

    Access Level

    AUTHORIZED, or ADMIN for a VMS that has to manage the sensor, see What a VMS may do. ADMIN is only offered to an account with the access level ADMIN.

    Read only

    On for a VMS that must not change any setting.

    ONVIF / RTSP access

    On.

    Create application key form with Purpose VMS, Access Level AUTHORIZED, Read only off, ONVIF / RTSP access on and the Generate button
    Figure 1. An application key with ONVIF / RTSP access for a VMS
  3. Click Generate.

  4. Copy the secret with the copy button. The secret is only displayed once.

In the VMS or the video player, enter your account name as the username and the secret as the password. The key appears in the list of the panel with the label ONVIF.

Application key VMS with the label ONVIF and Access level AUTHORIZED, with a delete button
Figure 2. The new key in the list of application keys

Deleting the key removes the access of every VMS and video player that signs in with it.

More about application keys and access levels: Application key.

ONVIF users

Some VMSs create users of their own on the sensor over ONVIF, for example one per operator. The sensor stores each ONVIF user as an application key with ONVIF / RTSP access on the account whose ONVIF key the VMS signed in with. The ONVIF user level the VMS chooses decides the access level of that key:

ONVIF user level Application key

Administrator

ADMIN

Operator

AUTHORIZED

User

AUTHORIZED, read-only

  • Only a VMS whose key has the level Administrator, that is an ADMIN key without read-only access, can list, create, change and delete ONVIF users. It sees and manages the ONVIF users of every account, not only those of its own.

  • An ONVIF user gets at most the access of the account it is created on: no higher access level than the account, and only read-only access on a read-only account.

  • The username of an ONVIF user must differ from every account name and every other ONVIF user.

  • The sensor holds at most 32 users, the ONVIF keys of the accounts included. A password has at most 64 characters.

  • The ONVIF key of an account appears to the VMS as a user with the name of the account. The VMS cannot change or delete it; do that on the account page.

In the WebGUI, an ONVIF user appears in the list of application keys of the account, with the label ONVIF and the line ONVIF user: followed by its username. Deleting it there removes the ONVIF user.

Application key ONVIF user with the label ONVIF, Access level AUTHORIZED and the line ONVIF user: vms-operator, with a delete button
Figure 3. An ONVIF user that a VMS created, in the list of application keys

Troubleshooting

ONVIF / RTSP access cannot be switched on

The switch needs the access level AUTHORIZED or ADMIN, and an account has only one ONVIF key of its own. If the account already has one, delete it first, or use the existing key.