Check Roles
This scenario shows how to configure and use OSDx user roles.
Test Monitor Role
Description
A new user teldat is created using the predefined monitor role. This kind of role allows the execution of a reduced set of operational commands.
Scenario
Step 1: Set the following configuration in DUT0
:
set system login user teldat authentication plaintext-password admin set system login user teldat role monitor
Step 2: Run command service cnm restart
at DUT0
and expect this output:
Show output
CLI Error: Insufficient privileges
Step 3: Run command show running
at DUT0
and expect this output:
Show output
CLI Error: Insufficient privileges
Step 4: Run command show date
at DUT0
and expect this output:
Show output
Fri Nov 24 00:03:28 UTC 2023
Step 5: Login as admin
user on {‘DOC’: ‘SDE’, ‘CAPS’: ‘all -cellular -ceetm’, ‘FWID’: ‘iso’, ‘LICENSE’: ‘VM’, ‘PORT’: ‘4000’, ‘ETH0’: ‘eth0’, ‘ETH1’: ‘eth1’, ‘MAC0’: ‘DE:AD:BE:EF:6C:10’, ‘MAC1’: ‘DE:AD:BE:EF:6C:11’, ‘HDA’: ‘/var/tmp/hd-vm0.img’, ‘MEM’: ‘2049’, ‘MON_PORT’: ‘5000’, ‘MON_ALIAS’: ‘VM0_MON’, ‘ADDR’: ‘localhost’, ‘CMD_TIMEOUT’: ’20s’, ‘REBOOT_TIMEOUT’: ‘300s’, ‘UPDATE_TIMEOUT’: ‘600s’, ‘COMMIT_TIMEOUT’: ’60s’, ‘DELETE_IMAGES’: ‘True’, ‘ALIAS’: ‘DUT0’, ‘FW_NAME’: ‘os_iso.iso’, ‘NEEDS_REBOOT’: False, ‘NEEDS_LICENSE’: True}.
Note
Dynamically change the required user-level for some specific operational commands.
Step 6: Set the following configuration in DUT0
:
set user-level 10 command show date set user-level 0 command show running
Step 7: Run command service cnm restart
at DUT0
and expect this output:
Show output
CLI Error: Insufficient privileges
Step 8: Run command show running
at DUT0
and expect this output:
Show output
# Teldat OSDx VM version v3.8.1.7-beta3 # Fri 24 Nov 2023 12:03:32 AM UTC # Warning: Configuration has not been saved set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set system login user teldat authentication encrypted-password '$6$6TgTrvPSLW0T$XX.2mJx.QQ746o8dhj9l/u3VqVzUYHXCPKZuxQQlO31raku4q8qZu65MKXoDtpwvR2k/Q2CLTWXSMP1n0xwek0' set system login user teldat role monitor set user-level 0 command 'show running' set user-level 10 command 'show date'
Step 9: Run command show date
at DUT0
and expect this output:
Show output
CLI Error: Insufficient privileges
Step 10: Login as admin
user on {‘DOC’: ‘SDE’, ‘CAPS’: ‘all -cellular -ceetm’, ‘FWID’: ‘iso’, ‘LICENSE’: ‘VM’, ‘PORT’: ‘4000’, ‘ETH0’: ‘eth0’, ‘ETH1’: ‘eth1’, ‘MAC0’: ‘DE:AD:BE:EF:6C:10’, ‘MAC1’: ‘DE:AD:BE:EF:6C:11’, ‘HDA’: ‘/var/tmp/hd-vm0.img’, ‘MEM’: ‘2049’, ‘MON_PORT’: ‘5000’, ‘MON_ALIAS’: ‘VM0_MON’, ‘ADDR’: ‘localhost’, ‘CMD_TIMEOUT’: ’20s’, ‘REBOOT_TIMEOUT’: ‘300s’, ‘UPDATE_TIMEOUT’: ‘600s’, ‘COMMIT_TIMEOUT’: ’60s’, ‘DELETE_IMAGES’: ‘True’, ‘ALIAS’: ‘DUT0’, ‘FW_NAME’: ‘os_iso.iso’, ‘NEEDS_REBOOT’: False, ‘NEEDS_LICENSE’: True}.
Test Operator Role
Description
A new user teldat is created using the predefined operator role. This kind of role allows the execution of some operational commands.
Scenario
Step 1: Set the following configuration in DUT0
:
set system login user teldat authentication plaintext-password admin set system login user teldat role operator
Step 2: Run command service cnm restart
at DUT0
and expect this output:
Show output
CLI Error: Insufficient privileges
Step 3: Run command show running
at DUT0
and expect this output:
Show output
# Teldat OSDx VM version v3.8.1.7-beta3 # Fri 24 Nov 2023 12:03:42 AM UTC # Warning: Configuration has not been saved set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set system login user teldat authentication encrypted-password '$6$TE1aB9ryjvV$OC03EGzD6CkcO8KYMFUozQ7.Jpeo3p8tBCYo/lbfirDBpCOAKMuE0EDEUD73jg0CkVH46HinQPU00uvLlTFXK.' set system login user teldat role operator
Step 4: Run command show date
at DUT0
and expect this output:
Show output
Fri Nov 24 00:03:42 UTC 2023
Step 5: Login as admin
user on {‘DOC’: ‘SDE’, ‘CAPS’: ‘all -cellular -ceetm’, ‘FWID’: ‘iso’, ‘LICENSE’: ‘VM’, ‘PORT’: ‘4000’, ‘ETH0’: ‘eth0’, ‘ETH1’: ‘eth1’, ‘MAC0’: ‘DE:AD:BE:EF:6C:10’, ‘MAC1’: ‘DE:AD:BE:EF:6C:11’, ‘HDA’: ‘/var/tmp/hd-vm0.img’, ‘MEM’: ‘2049’, ‘MON_PORT’: ‘5000’, ‘MON_ALIAS’: ‘VM0_MON’, ‘ADDR’: ‘localhost’, ‘CMD_TIMEOUT’: ’20s’, ‘REBOOT_TIMEOUT’: ‘300s’, ‘UPDATE_TIMEOUT’: ‘600s’, ‘COMMIT_TIMEOUT’: ’60s’, ‘DELETE_IMAGES’: ‘True’, ‘ALIAS’: ‘DUT0’, ‘FW_NAME’: ‘os_iso.iso’, ‘NEEDS_REBOOT’: False, ‘NEEDS_LICENSE’: True}.
Note
Dynamically change the required user-level for some specific operational commands.
Step 6: Set the following configuration in DUT0
:
set user-level 10 command show date set user-level 0 command show running
Step 7: Run command service cnm restart
at DUT0
and expect this output:
Show output
CLI Error: Insufficient privileges
Step 8: Run command show running
at DUT0
and expect this output:
Show output
# Teldat OSDx VM version v3.8.1.7-beta3 # Fri 24 Nov 2023 12:03:47 AM UTC # Warning: Configuration has not been saved set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set system login user teldat authentication encrypted-password '$6$TE1aB9ryjvV$OC03EGzD6CkcO8KYMFUozQ7.Jpeo3p8tBCYo/lbfirDBpCOAKMuE0EDEUD73jg0CkVH46HinQPU00uvLlTFXK.' set system login user teldat role operator set user-level 0 command 'show running' set user-level 10 command 'show date'
Step 9: Run command show date
at DUT0
and expect this output:
Show output
CLI Error: Insufficient privileges
Step 10: Login as admin
user on {‘DOC’: ‘SDE’, ‘CAPS’: ‘all -cellular -ceetm’, ‘FWID’: ‘iso’, ‘LICENSE’: ‘VM’, ‘PORT’: ‘4000’, ‘ETH0’: ‘eth0’, ‘ETH1’: ‘eth1’, ‘MAC0’: ‘DE:AD:BE:EF:6C:10’, ‘MAC1’: ‘DE:AD:BE:EF:6C:11’, ‘HDA’: ‘/var/tmp/hd-vm0.img’, ‘MEM’: ‘2049’, ‘MON_PORT’: ‘5000’, ‘MON_ALIAS’: ‘VM0_MON’, ‘ADDR’: ‘localhost’, ‘CMD_TIMEOUT’: ’20s’, ‘REBOOT_TIMEOUT’: ‘300s’, ‘UPDATE_TIMEOUT’: ‘600s’, ‘COMMIT_TIMEOUT’: ’60s’, ‘DELETE_IMAGES’: ‘True’, ‘ALIAS’: ‘DUT0’, ‘FW_NAME’: ‘os_iso.iso’, ‘NEEDS_REBOOT’: False, ‘NEEDS_LICENSE’: True}.
Test Admin Role
Description
A new user teldat is created using the predefined admin role. This kind of role allows the execution of all operational commands and has access to the configuration menu.
Scenario
Step 1: Set the following configuration in DUT0
:
set system login user teldat authentication plaintext-password admin set system login user teldat role admin
Step 2: Run command service cnm restart
at DUT0
and expect this output:
Show output
service inactive. doing nothing.
Step 3: Run command show running
at DUT0
and expect this output:
Show output
# Teldat OSDx VM version v3.8.1.7-beta3 # Fri 24 Nov 2023 12:03:57 AM UTC # Warning: Configuration has not been saved set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set system login user teldat authentication encrypted-password '$6$ae3i9LLjUxHcEG$OnaziNJkdm5Rro2wwZPgbW0c4RGxyMW1FrwiiU/nHBWtAANA2HkfWVcC37CPaMMJBa7CC/niHEF3NdDDwZ/aF/' set system login user teldat role admin
Step 4: Run command show date
at DUT0
and expect this output:
Show output
Fri Nov 24 00:03:57 UTC 2023
Step 5: Login as admin
user on {‘DOC’: ‘SDE’, ‘CAPS’: ‘all -cellular -ceetm’, ‘FWID’: ‘iso’, ‘LICENSE’: ‘VM’, ‘PORT’: ‘4000’, ‘ETH0’: ‘eth0’, ‘ETH1’: ‘eth1’, ‘MAC0’: ‘DE:AD:BE:EF:6C:10’, ‘MAC1’: ‘DE:AD:BE:EF:6C:11’, ‘HDA’: ‘/var/tmp/hd-vm0.img’, ‘MEM’: ‘2049’, ‘MON_PORT’: ‘5000’, ‘MON_ALIAS’: ‘VM0_MON’, ‘ADDR’: ‘localhost’, ‘CMD_TIMEOUT’: ’20s’, ‘REBOOT_TIMEOUT’: ‘300s’, ‘UPDATE_TIMEOUT’: ‘600s’, ‘COMMIT_TIMEOUT’: ’60s’, ‘DELETE_IMAGES’: ‘True’, ‘ALIAS’: ‘DUT0’, ‘FW_NAME’: ‘os_iso.iso’, ‘NEEDS_REBOOT’: False, ‘NEEDS_LICENSE’: True}.
Note
Dynamically change the required user-level for some specific operational commands.
Step 6: Set the following configuration in DUT0
:
set user-level 10 command show date set user-level 0 command show running
Step 7: Run command service cnm restart
at DUT0
and expect this output:
Show output
service inactive. doing nothing.
Step 8: Run command show running
at DUT0
and expect this output:
Show output
# Teldat OSDx VM version v3.8.1.7-beta3 # Fri 24 Nov 2023 12:04:01 AM UTC # Warning: Configuration has not been saved set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set system login user teldat authentication encrypted-password '$6$ae3i9LLjUxHcEG$OnaziNJkdm5Rro2wwZPgbW0c4RGxyMW1FrwiiU/nHBWtAANA2HkfWVcC37CPaMMJBa7CC/niHEF3NdDDwZ/aF/' set system login user teldat role admin set user-level 0 command 'show running' set user-level 10 command 'show date'
Step 9: Run command show date
at DUT0
and expect this output:
Show output
Fri Nov 24 00:04:01 UTC 2023
Step 10: Login as admin
user on {‘DOC’: ‘SDE’, ‘CAPS’: ‘all -cellular -ceetm’, ‘FWID’: ‘iso’, ‘LICENSE’: ‘VM’, ‘PORT’: ‘4000’, ‘ETH0’: ‘eth0’, ‘ETH1’: ‘eth1’, ‘MAC0’: ‘DE:AD:BE:EF:6C:10’, ‘MAC1’: ‘DE:AD:BE:EF:6C:11’, ‘HDA’: ‘/var/tmp/hd-vm0.img’, ‘MEM’: ‘2049’, ‘MON_PORT’: ‘5000’, ‘MON_ALIAS’: ‘VM0_MON’, ‘ADDR’: ‘localhost’, ‘CMD_TIMEOUT’: ’20s’, ‘REBOOT_TIMEOUT’: ‘300s’, ‘UPDATE_TIMEOUT’: ‘600s’, ‘COMMIT_TIMEOUT’: ’60s’, ‘DELETE_IMAGES’: ‘True’, ‘ALIAS’: ‘DUT0’, ‘FW_NAME’: ‘os_iso.iso’, ‘NEEDS_REBOOT’: False, ‘NEEDS_LICENSE’: True}.
Test Custom Role
Description
A new user teldat is created using a custom role. The user-level can be dynamically changed.
Scenario
Step 1: Set the following configuration in DUT0
:
set system login user teldat authentication plaintext-password admin set system login user teldat role custom_role set system login role custom_role level 8
Step 2: Run command service cnm restart
at DUT0
and expect this output:
Show output
CLI Error: Insufficient privileges
Step 3: Run command show running
at DUT0
and expect this output:
Show output
# Teldat OSDx VM version v3.8.1.7-beta3 # Fri 24 Nov 2023 12:04:13 AM UTC # Warning: Configuration has not been saved set system login role custom_role level 8 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set system login user teldat authentication encrypted-password '$6$2KDZpenn4tB04m$KX2OFmqPmjLeA7FI9PePkvEHhRhTDry.aeuAaqXEdUoofw2gJcrTXFLr8ITENg9z/zrRwSslYowJZA8tcGJyr/' set system login user teldat role custom_role
Step 4: Run command show date
at DUT0
and expect this output:
Show output
Fri Nov 24 00:04:13 UTC 2023
Step 5: Login as admin
user on {‘DOC’: ‘SDE’, ‘CAPS’: ‘all -cellular -ceetm’, ‘FWID’: ‘iso’, ‘LICENSE’: ‘VM’, ‘PORT’: ‘4000’, ‘ETH0’: ‘eth0’, ‘ETH1’: ‘eth1’, ‘MAC0’: ‘DE:AD:BE:EF:6C:10’, ‘MAC1’: ‘DE:AD:BE:EF:6C:11’, ‘HDA’: ‘/var/tmp/hd-vm0.img’, ‘MEM’: ‘2049’, ‘MON_PORT’: ‘5000’, ‘MON_ALIAS’: ‘VM0_MON’, ‘ADDR’: ‘localhost’, ‘CMD_TIMEOUT’: ’20s’, ‘REBOOT_TIMEOUT’: ‘300s’, ‘UPDATE_TIMEOUT’: ‘600s’, ‘COMMIT_TIMEOUT’: ’60s’, ‘DELETE_IMAGES’: ‘True’, ‘ALIAS’: ‘DUT0’, ‘FW_NAME’: ‘os_iso.iso’, ‘NEEDS_REBOOT’: False, ‘NEEDS_LICENSE’: True}.
Step 6: Set the following configuration in DUT0
:
set system login role custom_role level 14
Step 7: Run command service cnm restart
at DUT0
and expect this output:
Show output
service inactive. doing nothing.
Step 8: Run command show running
at DUT0
and expect this output:
Show output
# Teldat OSDx VM version v3.8.1.7-beta3 # Fri 24 Nov 2023 12:04:18 AM UTC # Warning: Configuration has not been saved set system login role custom_role level 14 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0' set system login user teldat authentication encrypted-password '$6$2KDZpenn4tB04m$KX2OFmqPmjLeA7FI9PePkvEHhRhTDry.aeuAaqXEdUoofw2gJcrTXFLr8ITENg9z/zrRwSslYowJZA8tcGJyr/' set system login user teldat role custom_role
Step 9: Run command show date
at DUT0
and expect this output:
Show output
Fri Nov 24 00:04:18 UTC 2023
Step 10: Login as admin
user on {‘DOC’: ‘SDE’, ‘CAPS’: ‘all -cellular -ceetm’, ‘FWID’: ‘iso’, ‘LICENSE’: ‘VM’, ‘PORT’: ‘4000’, ‘ETH0’: ‘eth0’, ‘ETH1’: ‘eth1’, ‘MAC0’: ‘DE:AD:BE:EF:6C:10’, ‘MAC1’: ‘DE:AD:BE:EF:6C:11’, ‘HDA’: ‘/var/tmp/hd-vm0.img’, ‘MEM’: ‘2049’, ‘MON_PORT’: ‘5000’, ‘MON_ALIAS’: ‘VM0_MON’, ‘ADDR’: ‘localhost’, ‘CMD_TIMEOUT’: ’20s’, ‘REBOOT_TIMEOUT’: ‘300s’, ‘UPDATE_TIMEOUT’: ‘600s’, ‘COMMIT_TIMEOUT’: ’60s’, ‘DELETE_IMAGES’: ‘True’, ‘ALIAS’: ‘DUT0’, ‘FW_NAME’: ‘os_iso.iso’, ‘NEEDS_REBOOT’: False, ‘NEEDS_LICENSE’: True}.
Step 11: Set the following configuration in DUT0
:
set system login role custom_role level 3
Step 12: Run command service cnm restart
at DUT0
and expect this output:
Show output
CLI Error: Insufficient privileges
Step 13: Run command show running
at DUT0
and expect this output:
Show output
CLI Error: Insufficient privileges
Step 14: Run command show date
at DUT0
and expect this output:
Show output
Fri Nov 24 00:04:23 UTC 2023
Step 15: Login as admin
user on {‘DOC’: ‘SDE’, ‘CAPS’: ‘all -cellular -ceetm’, ‘FWID’: ‘iso’, ‘LICENSE’: ‘VM’, ‘PORT’: ‘4000’, ‘ETH0’: ‘eth0’, ‘ETH1’: ‘eth1’, ‘MAC0’: ‘DE:AD:BE:EF:6C:10’, ‘MAC1’: ‘DE:AD:BE:EF:6C:11’, ‘HDA’: ‘/var/tmp/hd-vm0.img’, ‘MEM’: ‘2049’, ‘MON_PORT’: ‘5000’, ‘MON_ALIAS’: ‘VM0_MON’, ‘ADDR’: ‘localhost’, ‘CMD_TIMEOUT’: ’20s’, ‘REBOOT_TIMEOUT’: ‘300s’, ‘UPDATE_TIMEOUT’: ‘600s’, ‘COMMIT_TIMEOUT’: ’60s’, ‘DELETE_IMAGES’: ‘True’, ‘ALIAS’: ‘DUT0’, ‘FW_NAME’: ‘os_iso.iso’, ‘NEEDS_REBOOT’: False, ‘NEEDS_LICENSE’: True}.