This document describes how to provide restricted access to Nexus users so that they can only enter limited commands with Cisco Secure Access Control Server (ACS) as a RADIUS server. For example, you might want a user to be able to log in to a privileged or a configuration mode and only be allowed to enter interface commands. In order to achieve this, you must create a custom role for the user on the RADIUS server that is used.
The RADIUS server (ACS in this example) and Nexus must be able to contact each other and perform authentications.
The information in this document is based on these software and hardware versions:
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
In order to create a role that only provides read/write access for the interface command, enter:
switch(config)# role name Limited-Access
switch(config-role)# rule 1 permit read-write feature interface
Additional permit access rules are defined with this syntax:
switch(config-role)# rule 1 permit read-write feature snmp
switch(config-role)# rule 2 permit read-write feature snmp
TargetParamsEntry
switch(config-role)# rule 3 permit read-write feature snmp
TargetAddrEntry
Switch(config)#username admin privilege 15 password 0 cisco123!
switch# conf terminal
switch(config)# Radius-server host 10.10.1.1 key cisco123
authenticationaccounting
switch(config)# aaa group server radius RadServer
switch(config-radius)#server 10.10.1.1
switch(config-radius)# use-vrf Management
switch# test aaa server Radius 10.10.1.1 user1 Ur2Gd2BHTest authentication should fail with a Rejection from the server since it is not yet configured. However, it confirms that the server is reachable.
Switch(config)#aaa authentication login default group RadserverYou do not have to worry about the local fallback method here, because Nexus fallbacks to local on its own if the RADIUS server is unavailable.
Switch(config)#aaa accounting default group Radserver
Switch(config)#aaa authentication login error-enable
Use this section in order to confirm that your configuration works properly.
Enter the show role command on Nexus in order to display the defined roles and configured access rules.
switch# show role (Displays all the roles and includes
custom roles that you have created and their permissions.)
Role: network-admin
Description: Predefined network admin role has access to all
commands on the switch.
-------------------------------------------------------------------
Rule Perm Type Scope Entity
----------------------------------------------------------------
1 permit read-write
Role:Limited_Access
Description: Predefined Limited_Access role has access to these commands.
-------------------------------------------------------------------
Rule Perm Type Scope Entity
-------------------------------------------------------------------
1 permit read-write feature Interface
Log in to Nexus with the username and password configured on the ACS. After login, enter the show user-account command in order to verify that the test user has the Limited_Access role:
switch# show user-account
user:admin
this user account has no expiry date
roles:network-admin
user:Test
this user account has no expiry date
roles:Limited_Access
Once the user access role is confirmed, switch into configuration mode and attempt to enter a command other than an interface command. The user should be denied access.
The Output Interpreter Tool (registered customers only) supports certain show commands. Use the Output Interpreter Tool in order to view an analysis of show command output.
This section provides information you can use in order to troubleshoot your switch configuration.
Complete these steps on the switch for role assignment:
The Output Interpreter Tool (registered customers only) supports certain show commands. Use the Output Interpreter Tool in order to view an analysis of show command output.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
11-Jul-2013 |
Initial Release |