English | Korean | Chinese | Japanese

Chapter 2. Configuration: User

 

Set up User Accounts

1. Add User Account: In the User List, click the button at the bottom to add a new user account.

2. Select Account to Edit: Select a user account to edit. If you set a user account as the default user (Server), it will become the default user for the VMS server at startup.

3. Change Credentials: Change the user ID and password as needed.

4. Set Permissions: Set the permissions for each user.

5. Set Concurrent Session Limit: Set the maximum number of concurrent remote user sessions for each account. This number must be greater than one (1).

6. Assign Hidden Channels: Assign hidden channels to each user.

7. User Management Server: After defining the URL and encryption key, you can operate an external server to provide user information to the VMS server. The response from the user management server must be:

 Response
/* http://x.x.x.x/user.php?user_id=user */
{
  "status": 200, /* 200: Success, 404: Not Found */
  "message": "Success",
  "user_id": "user",
  "user_pw": "1234",
  /* "user_pw_encrypted": "624b286bacdd25d6bef4ed2b19645f34",
       - Encrypted using the AES256 algorithm, see PHP example below */
  "permissions": {
    "shutdown": false,
    "disconnect": false,
    "config": false,
    "remote": true,
    "playback": true,
    "instant_recording": true,
    "backup": true,
    "export": true,
    "search": true
  },
  "max_concurrent_remote": 1,
  "hidden_channels": [
    "1-3", 6, 10
  ],
  "hide_channels_in_ui": true
}

8. Encryption Example: Example PHP code for encryption:

function aes256_encrypt($plaintext) {
    $iv = $CONFIG['aes_iv'];   // up to 32 bytes
    $key = $CONFIG['aes_key']; // up to 16 bytes
    $ciphertext = openssl_encrypt($plaintext, "AES-256-CBC",
            $key, OPENSSL_RAW_DATA, $iv);
    return bin2hex($ciphertext);
}