Security Compliance - Configure Users passwords, Inactivity Timeout API, Password requirements & Login Settings.
Created Nov 12, 2024 at 10:01 PM

Overview

Overview

The documentation pages in this section describe the RESTful APIs included with NetProfiler products. It is assumed that the reader has practical knowledge of RESTful APIs, so the documentation does not go into detail about what REST is and how to use it. Instead the documentation focuses on how to reset user password, view user details, how to view and configure shell remote authentication, how to enable/disable shell users, how to view and configure web acl, how to view and configure ssh acl, how to view and configure inactivity timeout settings.

The following operations can be performed via the API:

  • Display Web(local)/Shell users detail.
  • Reset password for Web(local)/Shell users.
  • Configure Shell Remote Authentication.
  • Enable/Disable Shell Users.
  • Configure Web Acl.
  • Configure Ssh Acl.
  • Display inactivity timeout settings.
  • Configure inactivity timeout settings.
  • Display password requirements settings.
  • Configure password requirements settings.
  • Display login settings.
  • Configure login settings.
  • Upload banner image.

Details about REST resources can be found in the Resources section. This overview continues with how to run these API's.

Authentication

All REST requests must be authenticated. The Authentication section of the Common API describes which authentication methods are presently supported.

Resources

Users: Display Users Detail

Display Web(local)/Shell User details.

GET https://{device}/api/mgmt.users_config/1.0/users
Authorization

This request requires authorization.

Response Body

On success, the server returns a response body with the following structure:

  • JSON
[
  {
    "username": string,
    "user_enabled": string,
    "current_password": string,
    "user_type": string
  }
]

Example:
[
  {
    "username": "mazu", 
    "user_enabled": "True", 
    "current_password": "********", 
    "user_type": "shell"
  }, 
  {
    "username": "admin", 
    "user_enabled": "True", 
    "current_password": "********", 
    "user_type": "shell"
  }, 
  {
    "username": "root", 
    "user_enabled": "True", 
    "current_password": "********", 
    "user_type": "shell"
  }, 
  {
    "username": "dhcp", 
    "user_enabled": "True", 
    "current_password": "********", 
    "user_type": "shell"
  }, 
  {
    "username": "admin", 
    "user_enabled": "True", 
    "current_password": "********", 
    "user_type": "web"
  }
]
Property Name Type Description Notes
users <array of <object>> List of Web(local)/Shell Users detail.
users[user] <object> Web(local)/Shell User detail.
users[user].username <string> Web(local) or Shell username.
users[user].user_enabled <string> Displays user is enabled or not.
users[user].current_password <string> Always hidden with asterisks.
users[user].user_type <string> Displays if a user is of type web(local) or shell.

Users: Configure User Password

Resets Web(local)/Shell Users password.

POST https://{device}/api/mgmt.users_config/1.0/users
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
[
  {
    "username": string,
    "user_enabled": string,
    "current_password": string,
    "new_password": string,
    "user_type": string
  }
]

Example:
[
  {
    "username": "mazu", 
    "user_enabled": "True", 
    "current_password": "abcdef", 
    "new_password": "qwerty", 
    "user_type": "shell"
  }, 
  {
    "username": "admin", 
    "user_enabled": "True", 
    "current_password": "", 
    "new_password": "bb!xiops", 
    "user_type": "web"
  }
]
Property Name Type Description Notes
users <array of <object>> List of Web(local)/Shell Users details for which password needs to be reset.
users[user] <object> Web(local)/Shell User details for which password needs to be reset.
users[user].username <string> Web(local)/Shell username.
users[user].user_enabled <string> User is enabled or not.
users[user].current_password <string> Current password can be empty for web users however is mandatory for web users if require 'Minimum number of changed positions'.
users[user].new_password <string> New password should be in plain text.
users[user].user_type <string> User is of type shell/web.
Response Body

On success, the server does not provide any body in the responses.

Shell Remote Authentication: Display Settings

Display Shell Remote Authentication details.

GET https://{device}/api/mgmt.users_config/1.0/shell_remote_auth
Authorization

This request requires authorization.

Response Body

On success, the server returns a response body with the following structure:

  • JSON
[
  {
    "shell_remote_auth": string
  }
]

Example:
{
  "shell_remote_auth": "true"
}
Property Name Type Description Notes
settings <array of <object>> Shell Remote Authentication Feature.
settings[setting] <object> Shell Remote Authentication.
settings[setting].shell_remote_auth <string> Shell Remote Authentication.

Shell Remote Authentication: Configure Settings

Configure Shell Remote Authentication Feature.

POST https://{device}/api/mgmt.users_config/1.0/shell_remote_auth
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
[
  {
    "shell_remote_auth": string
  }
]

Example:
{
  "shell_remote_auth": "true"
}
Property Name Type Description Notes
settings <array of <object>> Enable/Disable Shell Remote Authentication Feature.
settings[setting] <object> Shell Remote Authentication.
settings[setting].shell_remote_auth <string> Enable/Disable Shell Remote Authentication.
Response Body

On success, the server does not provide any body in the responses.

Enable/Disable Shell Users: Display Settings

Displays Shell Users Detail if user is enabled.

GET https://{device}/api/mgmt.users_config/1.0/shell_users
Authorization

This request requires authorization.

Response Body

On success, the server returns a response body with the following structure:

  • JSON
[
  {
    "user_id": string,
    "user_enabled": string,
    "username": string,
    "user_writable": string,
    "user_type": string
  }
]

Example:
[
  {
    "user_id": "1", 
    "user_enabled": "true", 
    "username": "bootloader", 
    "user_writable": "false", 
    "user_type": "bootloader"
  }, 
  {
    "user_id": "2", 
    "user_enabled": "true", 
    "username": "root", 
    "user_writable": "true", 
    "user_type": "system"
  }, 
  {
    "user_id": "3", 
    "user_enabled": "true", 
    "username": "admin", 
    "user_writable": "true", 
    "user_type": "system"
  }, 
  {
    "user_id": "4", 
    "user_enabled": "true", 
    "username": "mazu", 
    "user_writable": "true", 
    "user_type": "system"
  }
]
Property Name Type Description Notes
settings <array of <object>> Display Shell Users Detail if user is enabled.
settings[setting] <object> Shell User.
settings[setting].user_id <string> Value in int enclosed as a string.
settings[setting].user_enabled <string> Value in true/false enclosed as a string.
settings[setting].username <string> Shell username.
settings[setting].user_writable <string> Value in true/false enclosed as a string.
settings[setting].user_type <string> Shell user type.

Enable/Disable Shell Users: Configure Settings

Enable/Disable Shell User.

POST https://{device}/api/mgmt.users_config/1.0/shell_users
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
[
  {
    "user_id": string,
    "user_enabled": string,
    "username": string,
    "user_writable": string,
    "user_type": string
  }
]

Example:
{
  "user_id": "3", 
  "user_enabled": "true", 
  "username": "admin", 
  "user_writable": "<optional> is not used", 
  "user_type": "<optional>is not used"
}
Property Name Type Description Notes
settings <array of <object>> Enable/Disable Shell User.
settings[setting] <object> Enable/Disable Shell User.
settings[setting].user_id <string> Value in int enclosed as a string.
settings[setting].user_enabled <string> Value in true/false enclosed as a string.
settings[setting].username <string> Shell username.
settings[setting].user_writable <string> Value in true/false enclosed as a string. Optional
settings[setting].user_type <string> Shell user type. Optional
Response Body

On success, the server does not provide any body in the responses.

Set Web Acl: Display Settings

Displays Web Acl details.

GET https://{device}/api/mgmt.users_config/1.0/web_acl
Authorization

This request requires authorization.

Response Body

On success, the server returns a response body with the following structure:

  • JSON
[
  {
    "hosts": string
  }
]

Example:
{
  "hosts": "<list of IP's>"
}
Property Name Type Description Notes
settings <array of <object>> Display Web Acl details.
settings[setting] <object> Web Acl Details.
settings[setting].hosts <string> A list of comma separated IP's enclosed as string.

Set Web Acl: Configure Settings

Configure Web Acl.

POST https://{device}/api/mgmt.users_config/1.0/web_acl
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
[
  {
    "Ip_List": string
  }
]

Example:
{
  "Ip_List": "<list of IP's>"
}
Property Name Type Description Notes
settings <array of <object>> Configure Web Acl.
settings[setting] <object> Configure Web Acl.
settings[setting].Ip_List <string> A list of comma separate IP's enclosed as string.
Response Body

On success, the server does not provide any body in the responses.

Set Ssh Acl: Display Settings

Displays Ssh Acl details.

GET https://{device}/api/mgmt.users_config/1.0/ssh_acl
Authorization

This request requires authorization.

Response Body

On success, the server returns a response body with the following structure:

  • JSON
[
  {
    "hosts": string
  }
]

Example:
{
  "hosts": "<list of IP's>"
}
Property Name Type Description Notes
settings <array of <object>> Display Ssh Acl details.
settings[setting] <object> Ssh Acl Details.
settings[setting].hosts <string> A list of comma separated IP's enclosed as string.

Set Ssh Acl: Configure Settings

Configure Ssh Acl.

POST https://{device}/api/mgmt.users_config/1.0/ssh_acl
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
[
  {
    "Ip_List": string
  }
]

Example:
{
  "Ip_List": "<list of IP's>"
}
Property Name Type Description Notes
settings <array of <object>> Configure Ssh Acl.
settings[setting] <object> Configure Ssh Acl.
settings[setting].Ip_List <string> A list of comma separate IP's enclosed as string.
Response Body

On success, the server does not provide any body in the responses.

Inactivity Timeout: Display Settings

Display Inactivity Timeout Settings.

GET https://{device}/api/mgmt.users_config/1.0/inactivity_timeout
Authorization

This request requires authorization.

Response Body

On success, the server returns a response body with the following structure:

  • JSON
[
  {
    "inactivity_timeout_enabled": string,
    "inactivity_timeout": string
  }
]

Example:
[
  {
    "inactivity_timeout_enabled": "false", 
    "inactivity_timeout": "2"
  }
]
Property Name Type Description Notes
settings <array of <object>> List of Inactivity Timeout Settings.
settings[setting] <object> Inactivity timeout settings.
settings[setting].
inactivity_timeout_enabled
<string> Inactivity timeout is in enabled/disabled state.
settings[setting].inactivity_timeout <string> Inactivity timeout value in minutes.

Inactivity Timeout: Configure Settings

Configure Inactivity Timeout Settings.

POST https://{device}/api/mgmt.users_config/1.0/inactivity_timeout
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
[
  {
    "inactivity_timeout_enabled": string,
    "inactivity_timeout": string
  }
]

Example:
[
  {
    "inactivity_timeout_enabled": "true", 
    "inactivity_timeout": "2"
  }
]
Property Name Type Description Notes
settings <array of <object>> List of Web(local)/Shell Users details for which password needs to be reset.
settings[setting] <object> Inactivity timeout settings.
settings[setting].
inactivity_timeout_enabled
<string> Inactivity timeout is in enabled/disabled state.
settings[setting].inactivity_timeout <string> Inactivity timeout value in minutes.
Response Body

On success, the server does not provide any body in the responses.

Password Requirements: Display Settings

Display Password Requirement Settings.

GET https://{device}/api/mgmt.users_config/1.0/password_requirements
Authorization

This request requires authorization.

Response Body

On success, the server returns a response body with the following structure:

  • JSON
[
  {
    "Minimum number of characters": number,
    "Require mixed case": string,
    "Require non-alphanumeric characters": string,
    "Number of passwords to remember to prevent repeats": number,
    "Enable password aging": string,
    "Number of days before password expiration": number,
    "Require numeric characters": string,
    "Minimum number of changed positions": number
  }
]

Example:
[
  {
    "Minimum number of characters": 6, 
    "Require mixed case": "false", 
    "Require non-alphanumeric characters": "false", 
    "Number of passwords to remember to prevent repeats": 1, 
    "Enable password aging": "false", 
    "Number of days before password expiration": 0, 
    "Require numeric characters": "false", 
    "Minimum number of changed positions": 0
  }
]
Property Name Type Description Notes
settings <array of <object>> List of Password Requirement Settings.
settings[setting] <object> Password Requirement settings.
settings[setting].
Minimum number of characters
<number> Minimum number of characters in integer format.
settings[setting].Require mixed case <string> Require mixed case value as true/false.
settings[setting].
Require non-alphanumeric characters
<string> Require non-alphanumeric characters value as true/false.
settings[setting].
Number of passwords to remember to prevent repeats
<number> Number of passwords to remember to prevent repeats value in integer format.
settings[setting].Enable password aging <string> Enable password aging value as true/false.
settings[setting].
Number of days before password expiration
<number> Number of days before password expiration in integer format.
settings[setting].
Require numeric characters
<string> Require numeric characters value as true/false.
settings[setting].
Minimum number of changed positions
<number> Minimum number of changed positions in integer format.

Password Requirements: Configure Settings

Configure Password Requirement Settings.

POST https://{device}/api/mgmt.users_config/1.0/password_requirements
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
[
  {
    "Minimum number of characters": number,
    "Require mixed case": string,
    "Require non-alphanumeric characters": string,
    "Number of passwords to remember to prevent repeats": number,
    "Enable password aging": string,
    "Number of days before password expiration": number,
    "Require numeric characters": string,
    "Minimum number of changed positions": number
  }
]

Example:
[
  {
    "Minimum number of characters": 6, 
    "Require mixed case": "false", 
    "Require non-alphanumeric characters": "false", 
    "Number of passwords to remember to prevent repeats": 1, 
    "Enable password aging": "false", 
    "Number of days before password expiration": 0, 
    "Require numeric characters": "false", 
    "Minimum number of changed positions": 0
  }
]
Property Name Type Description Notes
settings <array of <object>> Password Requirement Settings that need to be configured.
settings[setting] <object> Password Requirement settings.
settings[setting].
Minimum number of characters
<number> Minimum number of characters in integer format.
settings[setting].Require mixed case <string> Require mixed case value as true/false.
settings[setting].
Require non-alphanumeric characters
<string> Require non-alphanumeric characters value as true/false.
settings[setting].
Number of passwords to remember to prevent repeats
<number> Number of passwords to remember to prevent repeats value in integer format.
settings[setting].Enable password aging <string> Enable password aging value as true/false.
settings[setting].
Number of days before password expiration
<number> Number of days before password expiration in integer format.
settings[setting].
Require numeric characters
<string> Require numeric characters value as true/false.
settings[setting].
Minimum number of changed positions
<number> Minimum number of changed positions in integer format.
Response Body

On success, the server does not provide any body in the responses.

Login Settings: Display Settings

Display Login Settings.

GET https://{device}/api/mgmt.users_config/1.0/login_settings
Authorization

This request requires authorization.

Response Body

On success, the server returns a response body with the following structure:

  • JSON
[
  {
    "Allow only one log-in per user name/password combination": string,
    "Force password change on first log-in": string,
    "Number of log-in attempts before account is locked": number,
    "Number of minutes to keep an account locked": number,
    "Prevent user 'admin' from being locked out via DoS attack": string,
    "Log-in splash screen display": number,
    "Log-in text": string
  }
]

Example:
[
  {
    "Allow only one log-in per user name/password combination": "false", 
    "Force password change on first log-in": "false", 
    "Number of log-in attempts before account is locked": 3, 
    "Number of minutes to keep an account locked": 30, 
    "Prevent user 'admin' from being locked out via DoS attack": "false", 
    "Log-in splash screen display": 0, 
    "Log-in text": "Welcome"
  }
]
Property Name Type Description Notes
settings <array of <object>> List of Login Settings.
settings[setting] <object> Login settings.
settings[setting].
Allow only one log-in per user name/password combination
<string> Allow only one log-in per user name/password combination value as true/false.
settings[setting].
Force password change on first log-in
<string> Force password change on first log-in value as true/false.
settings[setting].
Number of log-in attempts before account is locked
<number> Number of log-in attempts before account is locked value in integer format.
settings[setting].
Number of minutes to keep an account locked
<number> Number of minutes to keep an account locked value in integer format.
settings[setting].
Prevent user 'admin' from being locked out via DoS attack
<string> Prevent user 'admin' from being locked out via DoS attack value as true/false.
settings[setting].
Log-in splash screen display
<number> Log-in splash screen display in integer format.
settings[setting].Log-in text <string> Log-in text value as true/false.

Login Settings: Configure Settings

Configure Login Settings.

POST https://{device}/api/mgmt.users_config/1.0/login_settings
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
[
  {
    "Allow only one log-in per user name/password combination": string,
    "Force password change on first log-in": string,
    "Number of log-in attempts before account is locked": number,
    "Number of minutes to keep an account locked": number,
    "Prevent user 'admin' from being locked out via DoS attack": string,
    "Log-in splash screen display": number,
    "Log-in text": string
  }
]

Example:
[
  {
    "Allow only one log-in per user name/password combination": "false", 
    "Force password change on first log-in": "false", 
    "Number of log-in attempts before account is locked": 3, 
    "Number of minutes to keep an account locked": 30, 
    "Prevent user 'admin' from being locked out via DoS attack": "false", 
    "Log-in splash screen display": 0, 
    "Log-in text": "Welcome"
  }
]
Property Name Type Description Notes
settings <array of <object>> Login Settings that need to be configured.
settings[setting] <object> Login settings.
settings[setting].
Allow only one log-in per user name/password combination
<string> Allow only one log-in per user name/password combination value as true/false.
settings[setting].
Force password change on first log-in
<string> Force password change on first log-in value as true/false.
settings[setting].
Number of log-in attempts before account is locked
<number> Number of log-in attempts before account is locked value in integer format.
settings[setting].
Number of minutes to keep an account locked
<number> Number of minutes to keep an account locked value in integer format.
settings[setting].
Prevent user 'admin' from being locked out via DoS attack
<string> Prevent user 'admin' from being locked out via DoS attack value as true/false.
settings[setting].
Log-in splash screen display
<number> Log-in splash screen display in integer format.
settings[setting].Log-in text <string> Log-in text value as true/false.
Response Body

On success, the server does not provide any body in the responses.

Error Codes

In the event that an error occurs while processing a request, the server will respond with appropriate HTTP status code and additional information in the response body:

{
     "error_id":   "{error identifier}",
     "error_text": "{error description}",
     "error_info": {error specific data structure, optional}
}

The table below lists the possible errors and the associated HTTP status codes that may returned.

Error ID HTTP Status Comments
PARTIAL_CONTENT 206 Operation was partially successfull.
BAD_REQUEST 400 Invalid argument.
AUTH_REQUIRED 401 Authentication required.
AUTH_INVALID_CREDENTIALS 401 Make sure the user name is correct and type your password again. Be sure to use the correct case for the user name and password.
INTERNAL_ERROR 500 Internal error.