Skip to content
Guides & References

NX-OS AAA and local credentials

Worked examples for the NX-OS AAA template: login and accounting through a server group, password strength checks on, and AES encryption of stored keys.

Policy LibraryUpdated
Platform
cisco-nx-os
Minimum version
rConfig 8.0.2
Editions
Pro, Vector, Enterprise
On this page

NX-OS AAA and local credentials

Rules for who can log in and what gets recorded: logins checked by a TACACS+ or RADIUS group, commands sent to accounting, strong passwords, and keys stored with AES. They come from the nxos-aaa policy template.

Every example on this page was checked with rConfig Pro's policy engine on

Each of the 8 configs below was run through rConfig Pro’s evaluator with the rule above it, and gave the result shown. The configs are sanitised excerpts of the sample configs that come with the template.

All the rules come from nxos-aaa.policy in the policy templates (v1.5.0). Import the whole file with Import Templates (see importing a policy template), or copy one rule into your own definition. The Cisco NX-OS templates page lists the file’s known limitations. Run the rules against show running-config.

Rule Method Since
Login authentication through a server group must_match_regex 8.0.0
Accounting to a server group must_match_regex 8.0.0
Password strength checking left on must_not_match_regex 8.0.2
AES encryption of stored keys must_match_single_string 8.0.0

Login authentication through a server group

Central login means one place to add and remove people. This rule passes when aaa authentication login default uses a group. Local accounts only, as in aaa authentication login default local, fail.

Definition
// Login authentication uses a TACACS+ or RADIUS server group (aaa authentication login default group ...)
#[must_match_regex]
/^aaa authentication login default group \S+/m
passPassing config: Hardened Nexus 93180YC-FX sample (NX-OS 10.3(4a), synthetic)
aaa authentication login default group ISE-TACACS
aaa authentication login console local
aaa authorization commands default group ISE-TACACS local
aaa accounting default group ISE-TACACS
aaa authentication login error-enable

Why: Default login uses the ISE-TACACS group.

failFailing config: Unhardened Nexus 93180YC-FX sample (NX-OS 10.3(4a), synthetic)
aaa authentication login default local
aaa authentication login console local
aaa authorization commands default group ISE-TACACS local
aaa accounting default local
aaa authentication login error-enable

Why: Default login uses local accounts only.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
NIST SP 800-53 AC-2
NIST CSF 1.1 PR.AC-1
HIPAA (45 CFR) 164.312(a)(1)
ISO/IEC 27001:2022 Annex A A.8.5

Tested with: sample excerpts from NX-OS 10.3(4a) (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.


Accounting to a server group

Accounting records who did what. Sent to a server group, the record leaves the switch and survives a reload. This rule passes when aaa accounting default uses a group.

Definition
// AAA accounting sends to a server group (aaa accounting default group ...)
#[must_match_regex]
/^aaa accounting default group \S+/m
passPassing config: Hardened Nexus 93180YC-FX sample (NX-OS 10.3(4a), synthetic)
aaa authentication login default group ISE-TACACS
aaa authentication login console local
aaa authorization commands default group ISE-TACACS local
aaa accounting default group ISE-TACACS
aaa authentication login error-enable

Why: Accounting goes to the ISE-TACACS group.

failFailing config: Unhardened Nexus 93180YC-FX sample (NX-OS 10.3(4a), synthetic)
aaa authentication login default local
aaa authentication login console local
aaa authorization commands default group ISE-TACACS local
aaa accounting default local
aaa authentication login error-enable

Why: Accounting stays on the switch.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
NIST SP 800-53 AU-2
HIPAA (45 CFR) 164.312(b)
ISO/IEC 27001:2022 Annex A A.8.15

Tested with: sample excerpts from NX-OS 10.3(4a) (synthetic). Minimum rConfig 8.0.0 (must_match_regex). Editions: Pro, Vector, Enterprise.


Password strength checking left on

NX-OS checks new passwords for strength by default and does not print that. This rule fails only if someone has turned the check off with no password strength-check.

Definition
// Password strength checking is not disabled (fails on no password strength-check)
#[must_not_match_regex]
/^no password strength-check$/m
passPassing config: Hardened Nexus 93180YC-FX sample (NX-OS 10.3(4a), synthetic)
username admin password 5 $5$Kq3vT8xP$Zr7mW2nL9cH4bF6dJ1sQ8tY5uV0aE3gK7pX2wN4iM6o role network-admin
ssh key rsa 2048
ip domain-lookup
ip domain-name example.com

Why: No no password strength-check line.

failFailing config: Unhardened Nexus 93180YC-FX sample (NX-OS 10.3(4a), synthetic)
username admin password 5 $5$Kq3vT8xP$Zr7mW2nL9cH4bF6dJ1sQ8tY5uV0aE3gK7pX2wN4iM6o role network-admin
no password strength-check
ssh key rsa 2048
ip domain-lookup
ip domain-name example.com

Why: The strength check is turned off.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
NIST SP 800-53 IA-5
ISO/IEC 27001:2022 Annex A A.5.17

Tested with: sample excerpts from NX-OS 10.3(4a) (synthetic). Minimum rConfig 8.0.2 (must_not_match_regex). Editions: Pro, Vector, Enterprise.


AES encryption of stored keys

feature password encryption aes stores keys, such as TACACS+ keys, with AES instead of the weak type 7 scheme. This rule looks for that exact line.

Definition
// AES password encryption is enabled for stored keys (feature password encryption aes)
#[must_match_single_string]
feature password encryption aes
passPassing config: Hardened Nexus 93180YC-FX sample (NX-OS 10.3(4a), synthetic)
feature tacacs+
feature password encryption aes
feature interface-vlan
feature lacp
feature vpc
feature lldp

Why: The AES feature is on.

failFailing config: Unhardened Nexus 93180YC-FX sample (NX-OS 10.3(4a), synthetic)
feature tacacs+
feature telnet
no feature ssh
feature interface-vlan
feature lacp
feature vpc
feature lldp

Why: There is no feature password encryption aes line.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
NIST SP 800-53 CM-6
ISO/IEC 27001:2022 Annex A A.5.17

Tested with: sample excerpts from NX-OS 10.3(4a) (synthetic). Minimum rConfig 8.0.0 (must_match_single_string). Editions: Pro, Vector, Enterprise.


Type to search.