Configuring Login Rule Information

Function

This interface is used to configure login rule information.

Syntax

Operation type: PATCH

URL: https://device_ip/redfish/v1/Systems/SecurityService/SecurityLoad

Request header:

X-Auth-Token: auth_value

Request message body:

{
    "Password":XXX,
    "load_cfg":[{
        "enable":enable,
        "start_time": start_tim,
        "end_time": end_time,
        "ip_addr": ip_addr,
        "mac_addr": mac_addr
    }]
}

Request Parameters

Table 1 Parameter description

Parameter

Mandatory/Optional

Description

Value

Password

Mandatory

User password

The value is a string of 8 to 20 characters.

load_cfg

Mandatory

Configuration item list.

The list can contain a maximum of 30 characters.

enable

Mandatory

Whether a configuration item is enabled.

The value is a character string and can be true or false

start_time

Optional

Allowed login start time.

The value is in 24-hour format, for example, hour:minute.

end_time

Optional

Allowed login end time.

The value is in 24-hour format, for example, hour:minute.

ip_addr

Optional

IP address or IP address and mask length allowed for login.

A character string, indicating an IPv4 address in dotted decimal notation.

The number of mask bits ranges from 1 to 32.

mac_addr

Optional

MAC address allowed for login.

A character string, supporting only unicast addresses.

Only the most significant 24 bits of a unicast address can be configured.

Usage Guidelines

None

Example

Request:

PATCH https://10.10.10.10/redfish/v1/Systems/SecurityLoad

Request header:

X-Auth-Token: auth_value

Request message body:

{
    "Password": "password",
    "load_cfg":[{
        "enable": "true",
        "start_time": "06:00",
        "end_time": "12:00",
        "ip_addr": "xx.xx.xx.xx",
        "mac_addr": "00:89:01:xx:xx:04"
    }]
}
Response:
{
    "error": {
        "code": "Base.1.0.Success",
        "message": "Operation success. See ExtendedInfo for more information.",
        "@Message.ExtendedInfo": [
            {
                "@odata.type": "#MessageRegistry.v1_0_0.MessageRegistry",
                "Description": "Indicates that no error has occurred.",
                "Message": "Config security load successfully.",
                "Severity": "OK",
                "NumberOfArgs": null,
                "ParamTypes": null,
                "Resolution": "None"
            }
        ]
    }
}

Response code: 202

Output Description

Table 2 Operation output description

Field

Type

Description

code

Character string

A string indicating the specific message ID in the message registry.

message

Character string

A readable message corresponding to a message in the message registry.

@odata.type

Character string

OData description of a message resource.

Description

Character string

Detailed description of a message resource.

Message

Character string

Detailed information about a message resource.

Severity

Character string

Severity. The following severity levels are supported:

  • OK
  • Warning
  • Critical

NumberOfArgs

Number

Number of parameters in a message description.

ParamTypes

Array

Parameter type list.

Resolution

Character string

Event handling suggestions.