• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 关于我们

01-基础配置命令参考

目录

03-RBAC命令

本章节下载 03-RBAC命令  (202.06 KB)

03-RBAC命令


1 RBAC

说明

设备运行于FIPS模式时,本特性部分配置相对于非FIPS模式有所变化,具体差异请见本文相关描述。有关FIPS模式的详细介绍请参见“安全配置指导”中的“FIPS”。

 

1.1  RBAC配置命令

1.1.1  description

description命令用来配置用户角色描述信息。

undo description用来删除用户角色的描述信息。

【命令】

description text

undo description

【缺省情况】

未定义用户角色描述信息。

【视图】

用户角色视图

【缺省用户角色】

network-admin

【参数】

text:用户角色描述信息,为1~128个字符的字符串,区分大小写。

【使用指导】

描述信息用来方便管理员对用户角色进行管理。

【举例】

# 为用户角色role1配置描述信息为“labVIP”。

<Sysname> system-view

[Sysname] role name role1

[Sysname-role-role1] description labVIP

【相关命令】

·     display role

·     role

1.1.2  display role

display role命令用来显示用户角色信息。

【命令】

display role [ name role-name ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

name role-name:用户角色名称,为1~63个字符的字符串,区分大小写。

【使用指导】

如果不指定用户角色名称,则表示显示所有用户角色的信息,包括系统缺省存在的用户角色的信息。

【举例】

# 显示用户角色123的信息。

<Sysname> display role name 123

Role: 123

  Description: new role

  VLAN policy: deny

  Permitted VLANs: 1 to 5, 7 to 8

  Interface policy: deny

  Permitted interfaces: Ten-GigabitEthernet1/0/1 to Ten-GigabitEthernet1/0/3, Vlan-interface1 to Vlan-interface20

  VPN instance policy: deny

  Permitted VPN instances: vpn, vpn1, vpn2

  -------------------------------------------------------------------

  Rule    Perm   Type  Scope         Entity

  -------------------------------------------------------------------

  1       permit RWX   feature-group abc

  2       deny   -W-   feature       ldap

  3       permit       command       system ; radius sc *

  R:Read W:Write X:Execute

表1-1 display role命令显示信息描述表

字段

描述

Role

用户角色名称,其中系统预定义的19个用户角色名称分别为network-admin、network-operator、level-nn为0~15)、security-audit

Description

用户角色描述信息

VLAN policy

配置的VLAN策略:

·     deny:表示除允许操作指定的VLAN外,其它VLAN均不能被用户操作

·     permit (default):表示系统缺省允许用户操作任何VLAN

Permitted VLANs

允许用户操作的VLAN

Interface policy

配置的接口策略:

·     deny:表示除允许操作指定的接口外,其它接口均不能被用户操作

·     permit (default):表示系统缺省允许用户操作任何接口

Permitted interfaces

允许用户操作的接口

VPN-instance policy

配置的VPN策略:

·     deny:表示除允许操作指定的VPN实例外,其它VPN实例均不能被用户操作

·     permit (default):表示系统缺省允许用户操作任何VPN实例

Permitted VPN instances

允许用户操作的VPN实例

Rule

用户角色规则编号(系统预定义的权限规则通过sys-n标识)

Perm

对命令行的操作许可:

·     permit:允许操作

·     deny:禁止操作

Type

命令行类型:

·     R:读类型

·     W:写类型

·     X:执行类型

Scope

用户角色规则的类型:

·     command:基于命令行的规则

·     feature:基于特性的规则

·     feature-group:基于特性组规则

Entity

用户角色规则中定义的具体内容(命令特征字符串、特性名称或者特性组名称)

·     “-”表示所有特性

·     “*”为通配符,表示0个或多个任意字符

 

【相关命令】

·     role

1.1.3  display role feature

display role feature命令用来显示特性相关信息。

【命令】

display role feature [ name feature-name | verbose ]

【视图】

任意视图

【缺省用户角色】

network-admin

netword-operator

【参数】

name feature-name:显示指定特性的详细信息,feature-name表示系统中的特性名称,且所有特性名称中的字母均为小写。

verbose:显示所有特性的详细信息,即显示特性内包含的所有命令行列表。

【使用指导】

如果不指定任何关键字,则显示系统中所有特性的名称列表。

【举例】

# 显示系统中所有特性的名称列表。

<Sysname> display role feature

Feature: device          (Device configuration related commands)

Feature: interface       (Interface related commands)

Feature: syslog          (Syslog related commands)

Feature: process         (Process related commands)

……(略)

# 显示所有特性的详细信息。

<Sysname> display role feature verbose

Feature: device          (Device configuration related commands)               

  display clock    (R)                                                         

  debugging dev    (W)                                                         

  display debugging dev    (R)                                                 

  display device *    (R)                                                      

  display diagnostic-information *    (R)                                      

  display environment *    (R)                                                 

  display fan *    (R)                                                         

  display power *    (R)                                                        

  display rps *    (R)                                                         

  display system-working-mode    (R)                                           

  display current-configuration *    (R)                                        

  display saved-configuration *    (R)                                         

  display default-configuration *    (R)                                       

  display startup    (R)                                                        

  display this *    (R)                                                        

  display archive configuration    (R)                                         

  clock datetime *    (W)                                                      

  reboot *    (W)                                                              

  save *    (W)                                                                

  archive configuration    (W)                                                 

  backup startup-configuration to *    (W)                                     

  restore startup-configuration from *    (W)                                  

  reset saved-configuration *    (W)                                           

  startup saved-configuration *    (W)                                         

  display transceiver *    (R)                                                 

  bootrom *    (W)                                                             

  system-view ; temperature-limit *    (W)                    &nbs