Authorization

This scenario shows how to set up per-command authorization.

Tacacs Method Privileged User

Description

A TACACS+ server configured to deny the show date command and allow everything else is added to a TACACS+ group, which is added to an AAA list. This list is assigned to CLI’s command authorization. Whenever a user attempts to run a command, this is sent to the server and is only executed when authorized to do so.

Scenario

Step 1: Set the following configuration in DUT0:

set interfaces ethernet eth0 address 10.215.168.64/24
set system aaa group tacacs tacgroup1 server serv1
set system aaa list list1 method 1 group tacacs tacgroup1
set system aaa server tacacs serv1 address 10.215.168.1
set system aaa server tacacs serv1 encrypted-key U2FsdGVkX197Ko9ObdZI7siS80NeI3ehRLXiveBIZ+I=
set system cli aaa authorization list1
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set system login user testadmin authentication encrypted-password '$6$EOQST4bly140u3u2$.cjvlnAI2WGR3ZneV7F4bhB3DB91h4W8kNtStxqxK.cAuMk./0CYm7OwjiNAGKKYrECM14tkSlPuXLRD237ZW/'
set system login user testadmin role admin

Step 2: Ping IP address 10.215.168.1 from DUT0:

admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1
Show output
PING 10.215.168.1 (10.215.168.1) 56(84) bytes of data.
64 bytes from 10.215.168.1: icmp_seq=1 ttl=64 time=0.156 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.156/0.156/0.156/0.000 ms

Step 3: Run command show version at DUT0 and expect this output:

Show output
OS vendor:                 Teldat
OS name:                   OSDx
OS version:                v4.1.1.5
OS Linux kernel:           6.1.90
OS built by:               jenkins@daphne
OS build date:             Fri May 9 11:30:35 UTC 2025
OS installation:           physical
OS boot mode:              user
License:                   VM_BASE Firewall eth-Rate-Permit-Full

Hardware vendor:           QEMU
Hardware model:            VM
Hardware OEM model:        Standard PC (i440FX + PIIX, 1996)
Hardware version:          pc-i440fx-5.2
Hardware UUID:             58aa87cd-94d4-547a-bdcc-f04ea35d4eb0
Hardware architecture:     amd64
Hardware fwid:             iso
Hardware base MAC:         de:ad:be:ef:6c:00
Hardware cpu:              1 x QEMU Virtual CPU version 2.5+ (4 cores)

Last reboot reason:        Power Failure

Date:                      Sun 11 May 2025 21:01:39 +00:00
Uptime:                    1:03:49
CPU load (1m, 5m, 15m):    0.11 0.15 0.17
CPU usage % (1m):          0.71
Storage usage (kB):        360116/8144384
Memory usage (kB):         392608/1570536
Users logged in:           1
Mode (current/next boot):  user/user

Hostname:                  osdx

Step 4: Run command show date at DUT0 and expect this output:

Show output
CLI Error: Unauthorized

Note

Commands are expanded before being sent to the authorization server

Step 5: Run command sh da at DUT0 and expect this output:

Show output
CLI Error: Unauthorized

Step 6: Run command show running at DUT0 and expect this output:

Show output
# Teldat OSDx VM version v4.1.1.5
# Sun 11 May 2025 21:01:39 +00:00
# Warning: Configuration has not been saved
set interfaces ethernet eth0 address 10.215.168.64/24
set system aaa group tacacs tacgroup1 server serv1
set system aaa list list1 method 1 group tacacs tacgroup1
set system aaa server tacacs serv1 address 10.215.168.1
set system aaa server tacacs serv1 encrypted-key U2FsdGVkX197Ko9ObdZI7siS80NeI3ehRLXiveBIZ+I=
set system cli aaa authorization list1
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set system login user testadmin authentication encrypted-password '$6$EOQST4bly140u3u2$.cjvlnAI2WGR3ZneV7F4bhB3DB91h4W8kNtStxqxK.cAuMk./0CYm7OwjiNAGKKYrECM14tkSlPuXLRD237ZW/'
set system login user testadmin role admin

Tacacs Method Non-Privileged User

Description

In this case, the same scenario is tested but with a non-privileged user called testmonitor.

Scenario

Step 1: Set the following configuration in DUT0:

set interfaces ethernet eth0 address 10.215.168.64/24
set system aaa group tacacs tacgroup1 server serv1
set system aaa list list1 method 1 group tacacs tacgroup1
set system aaa server tacacs serv1 address 10.215.168.1
set system aaa server tacacs serv1 encrypted-key U2FsdGVkX19zTes889zZTGzzXw9tqYiYzpzsweH4zbk=
set system cli aaa authorization list1
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set system login user testmonitor authentication encrypted-password '$6$RXB10Vwf6aN7Dtyo$GFTxs0ICXwaZRDyb3QzBD8N38xicszUQwLQzolhBaHUh6CHFYst8lHD1lw2gxj86XT1MAsP1zBezh.vHUvfd1.'
set system login user testmonitor role monitor

Step 2: Ping IP address 10.215.168.1 from DUT0:

admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1
Show output
PING 10.215.168.1 (10.215.168.1) 56(84) bytes of data.
64 bytes from 10.215.168.1: icmp_seq=1 ttl=64 time=2.46 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 2.458/2.458/2.458/0.000 ms

Step 3: Run command show version at DUT0 and expect this output:

Show output
OS vendor:                 Teldat
OS name:                   OSDx
OS version:                v4.1.1.5
OS Linux kernel:           6.1.90
OS built by:               jenkins@daphne
OS build date:             Fri May 9 11:30:35 UTC 2025
OS installation:           physical
OS boot mode:              user
License:                   VM_BASE Firewall eth-Rate-Permit-Full

Hardware vendor:           QEMU
Hardware model:            VM
Hardware OEM model:        Standard PC (i440FX + PIIX, 1996)
Hardware version:          pc-i440fx-5.2
Hardware UUID:             58aa87cd-94d4-547a-bdcc-f04ea35d4eb0
Hardware architecture:     amd64
Hardware fwid:             iso
Hardware base MAC:         de:ad:be:ef:6c:00
Hardware cpu:              1 x QEMU Virtual CPU version 2.5+ (4 cores)

Last reboot reason:        Power Failure

Date:                      Sun 11 May 2025 21:01:53 +00:00
Uptime:                    1:04:03
CPU load (1m, 5m, 15m):    0.08 0.14 0.16
CPU usage % (1m):          0.71
Storage usage (kB):        360116/8144384
Memory usage (kB):         374956/1570536
Users logged in:           1
Mode (current/next boot):  user/user

Hostname:                  osdx

Step 4: Run command show date at DUT0 and expect this output:

Show output
CLI Error: Unauthorized

Step 5: Run command show running at DUT0 and expect this output:

Show output
CLI Error: Insufficient privileges