System Security Configuration Guide for Cisco 8000 Series Routers, IOS XR Releases

PDF

System Security Configuration Guide for Cisco 8000 Series Routers, IOS XR Releases

AAA password types

Want to summarize with AI?

Log in

Introduces different AAA password types, covering Type 8, Type 9, and Type 10 password encryption, configuration steps for each, Type 7 password masking, and the behavior and deprecation of older password types in secure environments.


An AAA password type is a credential storage method that determines whether Cisco IOS XR can decrypt or only verify a stored user password.

  • Encrypted password types protect stored local user credentials.

  • One-way encrypted secrets are preferred for user login accounts because the original password string cannot be deduced from the stored secret.

  • Two-way passwords remain necessary for applications such as PPP that must decrypt the stored password for protocol operation.

  • When both a secret and a password exist for a user, the secret takes precedence for operations that do not require a decryptable password.

Password type behavior

In configuring a user and that user's group membership, you can specify two types of passwords: encrypted or clear text.

The router supports both two-way and one-way (secret) encrypted user passwords. Secret passwords are ideal for user login accounts because the original unencrypted password string cannot be deduced on the basis of the encrypted secret. Some applications (PPP, for example) require only two-way passwords because they must decrypt the stored password for their own function, such as sending the password in a packet. For a login user, both types of passwords may be configured, but a warning message is displayed if one type of password is configured while the other is already present.

If both secret and password are configured for a user, the secret takes precedence for all operations that do not require a password that can be decrypted, such as login. For applications such as PPP, the two-way encrypted password is used even if a secret is present.


Type 8 and Type 9 password encryption

A Type 8 or Type 9 password encryption method is a one-way hashing method that stores a local user secret without preserving the original cleartext value.

  • Type 8 uses SHA256 hashing.

  • Type 9 uses sCrypt hashing.

  • The router can store an already encrypted value or internally encrypt a cleartext value by using the selected method.

Encryption method behavior

This feature provides the options for Type 8 and Type 9 encryption methods in AAA security services. The Type 8 and Type 9 encryption methods enable more secure and robust support for saving passwords with respect to each username. Thus, in scenarios where a lot of confidential data need to be maintained, these encryption methods ensure that the admin and other user passwords are strongly protected.

The implementation of Type 8 encryption method uses SHA256 hashing algorithm, and the Type 9 encryption method uses scrypt hashing algorithm.


Configure Type 8 and Type 9 passwords

Configure user secrets with Type 8 (SHA256) or Type 9 (sCrypt) hashing when these algorithms meet your local password-storage requirements.

When configuring a password, you can:

  • Provide an already encrypted value, which is stored directly in the system without further encryption.

  • Provide a cleartext password, which Cisco IOS XR internally encrypts and stores using your chosen method.

Type 5, Type 8, Type 9, and Type 10 encryption methods all support these options.

For more information about configuring users with Type 8 and Type 9 encryption methods, see Configure Users section.

Before you begin

Create the local user profile before you configure the secret value.

Procedure

  1. Configure Type 8 and Type 9 passwords directly, or enter cleartext passwords for the router to encrypt.

    To configure a user with a pre-encrypted Type 8 password:

    Example:

    Router(config)# username demo8
    Router(config-un)# secret 8 $8$dsYGNam3K1SIJO$7nv/35M/qr6t.dVc7UY9zrJDWRVqncHub1PE9UlMQFs

    The router stores your encrypted secret without further processing.

    To configure a user with a cleartext password (Type 8) for internal encryption:

    Example:

    Router(config)# username demo8
    Router(config-un)# secret 0 enc-type 8 PASSWORD

    The password is encrypted using Type 8 and stored.

    To configure a user with a pre-encrypted Type 9 password:

    Example:

    Router(config)# username demo9
    Router(config-un)# secret 9 $9$nhEmQVczB7dqsO$X.HsgL6x1il0RxkOSSvyQYwucySCt7qFm4v7pqCxkKM

    The router stores your encrypted secret without further processing.

    To configure a user with a cleartext password (Type 9) for internal encryption:

    Example:

    Router(config)# username demo9
    Router(config-un)# secret 0 enc-type 9 PASSWORD

    The password is encrypted using Type 9 and stored.

  2. Configure masked-secret password entry for Type 5, Type 8, Type 9, or Type 10 authentication.

    To enter a masked-secret password (which hides your entry for security), use:

    Example:

    Router(config)# username us6 masked-secret 0 enc-type 8
    
    Enter secret:
    Re-enter secret:
    
    Router(config)# commit

    The entered secret is encrypted and stored securely; if your entries do not match, an error is shown.View the encrypted secret:

    Example:

    Router# show running-config aaa
    ..
    username us6
     secret 8 $8$mlcSk/Ae5Qu/5k$RJdI3SQ8B4iP7rdxxQvVlJVeRHSubZzcgcaLYxjg36s

    To use masked-secret for Type 8 secret authentication (encrypted password from earlier):

    Example:

    Router(config)# username us6 masked-secret 8
    
    Enter secret:
    Re-enter secret:
    
    Router(config)# commit

    When you key in a password, to ensure that it is not displayed on the screen, use the masked-secret option. Steps:

    Use the username command as shown below, and enter the password.

    The following command contains the username us6, 0 to specify a cleartext password, and the encryption type (5, 8, 9, or 10).

    View the encrypted secret:

    Enter the username, 8 to specify Type 8 secret authentication, and enter the Type 8 secret. You can also use a secret encrypted earlier.

    If there is a password mismatch between the two entries, an error message is displayed.

The user secret is stored by using the selected Type 8 or Type 9 hashing method.


Type 10 password encryption

A Type 10 password encryption method is a SHA512-based hashing method that stores local user secrets for Cisco IOS XR user management.

  • Type 10 is the default encryption method when a user secret is configured with a cleartext value.

  • Type 10 secrets synchronize from XR VM to System Admin VM when the System Admin VM has the same user.

  • The Type 10 password is applied on the System Admin VM only when the username exists there.

Type 10 behavior

The Cisco IOS XR 64 bit software supports Type 10 (SHA512 ) encryption algorithm for passwords used in user management. With this feature, SHA512 is used by default for the passwords in user name configuration. This is applicable even for the first user creation. The SHA512 encryption algorithm provides improved security to the user passwords compared to the older algorithms such as MD5 and SHA256 .

Restrictions for type 10 password encryption usage

The usage of Type 10 password encryption is subjected to this restriction:

  • In a first user configuration scenario or when a user is reconfigured, only the Type 5 and Type 10 encryption are synced from XR VM to System Admin VM and Host VM; Type 8 and Type 9 are not synced.


Configure Type 10 password encryption

Configure user secrets with the default Type 10 SHA512 hashing method to ensure stronger local credential storage.

Use these options to configure Type 10 sha512 password encryption for a user on a Cisco IOS XR device.

Before you begin

Review the Type 10 password encryption behavior before you configure the user secret.

Procedure

  1. Configure the Type 10 user secret.

    Example:

    Router#configure
    Router(config)#username user10 secret testpassword
    Router(config-un)#commit

    Example:

    Router#configure
    Router(config)#username root secret 10 $6$9UvJidvsTEqgkAPU$3CL1Ei/F.E4v/Hi.UaqPrvJWf1
    Router(config-un)#commit

    Example:

    Router#configure
    Router(config)#username user10 secret 0 enc-type 10 testpassword
    Router(config-un)#commit

    Example:

    Router#show run aaa
    !
    username user10
    secret 10 $6$9UvJidvsTEqgkAPU$3CL1Ei/F.E4v/Hi.UaqPrvJWf1
    !

    Example:

    Router(config)#username user10 secret 10 $6$9UvJidvsTEqgkAPU$3CL1Ei/F.E4v/Hi.UaqPrvJWf1
    Router(config-un)#commit

    The Type 10 encryption is applied by default when you create a user with a clear-text password.

    Also, a new parameter '10' is available for the secret option under the username command to explicitly configure Type 10 encryption.

    In scenarios where you have to enter the clear-text password, you can specify the encryption algorithm to be used by using the enc-type keyword and the clear-text password as follows:

    The above configuration returns the encrypted password using Type10 algorithm (use the show run username command to verify that) which can then be configured for the user as follows:

  2. Review the Type 10 running configuration.

    Example:

    Router#show run username user10
    !
    username user10
    secret 10 $6$9UvJidvsTEqgkAPU$3CL1Ei/F.E4v/Hi.UaqPrvJWf1
    !

Deprecated Type 7 password and Type 5 secret behavior

Password configuration options before release 24.4.1

Until Release 24.4.1, there were two options for configuring a password:

  • Password: Uses Type 7 encryption to store the password.

  • Secret: Supports Type 5, 8, 9, or 10 hashing algorithms to store the password securely.

Deprecation notice

Starting from the Release 24.4.1, the use of Type 7 password and Type 5 secret are deprecated due to security concerns. The deprecation process commences from the Release 24.4.1. We expect the full deprecation in a future release. We recommend using the default option, which is Type 10 secret.

Note

With the deprecation of Type 7 password encryption in Cisco IOS XR Release 24.4.1, any configuration that used Type 7 passwords will be automatically converted and saved as Type 10 secrets during the upgrade to version 24.4.1.

If you have usernames that include both a password and a secret, then:

For the first 3000 users, the router will retain the original secret and discard the password.

For users beyond the first 3000, the router will convert the password as Type 10 secrets by overwriting the original secret.

Password

The password options available in the router from the Release 24.4.1:

RP/0/RP0/CPU0:ios(config-un)#password ?
LINE The type 7 password followed by '7 ' OR SHA512-based password (deprecated, use 'secret')

Changes:

  • All the options that were present until the Release 24.4.1 are removed except LINE (to accept cleartext).

  • During upgrade: Any configuration using the Type 7 password configuration is automatically converted to Type 10 secret.

    Post-upgrade: You can still use the Type 7 password configurations option after new commits, but the password will be stored as Type 10 secret.

  • New syslog has been added to indicate the deprecation process:

    %SECURITY-PSLIB-4-DEPRECATED_PASSWORD_TYPE : The password configuration is deprecated.
     Converting it to a Type 10 secret for user <user name>.
  • show running configuration command output before upgrade:

    username example
    password 7 106D000A0618
    !

    show running configuration command output post-upgrade:

    username example
    
    secret 10 $6$P53pb/FFxNIT4b/.$yVakako4fp9PZiIYYh1xS0.W6b/yPrSyC8j4gLs6xli57iClOryPXyN9y8yojRD2nhAWb9pjr/WAIhbXqq8st.
    !

Masked-password

The masked-password options available in CLI from the Release 24.4.1:

Router(config-un)# masked-password ?
0 Specifies a cleartext password will follow
clear Config deprecated. Will be removed in 7.7.1. Specify '0' instead.
<cr> The cleartext user password

Changes:

  • The options 7 and encrypted that were present until the Release 24.4.1 are removed.

  • During upgrade: Any configuration using the Type 7 password configuration is automatically converted to Type 10 secret.

  • Post-upgrade: Masked-password is an alternate method of configuring the password. You can still use the masked-password keyword with a clear string after new commits, but the password will be stored as Type 10 secret.

  • New syslog has been added to indicate the deprecation process:

    %SECURITY-PSLIB-4-DEPRECATED_PASSWORD_TYPE : The password configuration is deprecated.
     Converting it to a Type 10 secret for user <user name>.
  • show running configuration command output before upgrade:

    username example
    password 7 106D000A0618
    !

    show running configuration command output post-upgrade:

    username example
    
    secret 10 $6$P53pb/FFxNIT4b/.$yVakako4fp9PZiIYYh1xS0.W6b/yPrSyC8j4gLs6xli57iClOryPXyN9y8yojRD2nhAWb9pjr/WAIhbXqq8st.
    !

Password-policy

The password-policy options available in CLI from the Release 24.4.1:

Router(config-un)# password-policy ?
WORD Specify the password policy name

Router(config-un)# password-policy abcd password ?
0 Specifies an UNENCRYPTED password will follow
7 Specifies that an encrypted password will follow
LINE The UNENCRYPTED (cleartext) user password
clear Config deprecated. Will be removed in 7.7.1. Specify '0' instead.
encrypted Config deprecated. Will be removed in 7.7.1. Specify '7' instead.

Changes:

  • All the options that were present until 24.4.1are removed except LINE (to accept cleartext).

  • During upgrade: Any configuration using the Type 7 password configuration is automatically converted to Type 10 secret.

    Post-upgrade: You can still use the password-policy configurations option after new commits, but the it will be stored as Type 10 secret.

  • New syslog has been added to indicate the deprecation process:

    %SECURITY-PSLIB-4-DEPRECATED_PASSWORD_TYPE : The password configuration is deprecated.
     Converting it to a Type 10 secret for user <username>.
  • show running configuration f command output before upgrade:

    username example
    password-policy abcd password 7 106D000A0618
    !

    show running configuration command output post-upgrade:

    username example
    secret 10 $6$P53pb/FFxNIT4b/.$yVakako4fp9PZiIYYh1xS0.W6b/yPrSyC8j4gLs6xli57iClOryPXyN9y8yojRD2nhAWb9pjr/WAIhbXqq8st.
    !
    !

AAA password-policy

The aaa password-policy options available in CLI from the Release 24.4.1:

Router(config)# aaa password-policy abcd
RP/0/RP0/CPU0:ios(config-pp)#?
min-char-change Number of characters change required between old and new passwords (deprecated, will be removed in 25.3.1)
restrict-password-advanced Advanced restrictions on new password (deprecated, will be removed in 25.3.1)
restrict-password-reverse Restricts the password to be same as reversed old password (deprecated, will be removed in 25.3.1)

Changes:

  • The options min-char-change, restrict-password-advanced, and restrict-password-reverse that were present until the Release 24.4.1 are deprecated.

  • During upgrade: These deprecated configurations do not go through any change during upgrade.

    Post-upgrade: These deprecated keywords do not take effect when configured post-upgrade.

  • New syslog have been added to indicate the deprecation process:

    %SECURITY-LOCALD-4-DEPRECATED_PASSWORD_POLICY_OPTION : The password policy option 'min-char-change' is deprecated.
    Password/Secret will not be checked against this option now.
    %SECURITY-LOCALD-4-DEPRECATED_PASSWORD_POLICY_OPTION : The password policy option 'restrict-password-reverse' is deprecated.
     Password/Secret will not be checked against this option now.
    %SECURITY-LOCALD-4-DEPRECATED_PASSWORD_POLICY_OPTION : The password policy option 'restrict-password-advanced' is deprecated.
    Password/Secret will not be checked against this option now.
  • show running configuration command output before upgrade:

    aaa password-policy abcd
    lower-case 3
    min-char-change 1
    restrict-password-reverse
    restrict-password-advanced
    !

    show running configuration command output post-upgrade:

    aaa password-policy abcd
    lower-case 3
    min-char-change 1
    restrict-password-reverse
    restrict-password-advanced
    !

Secret

The secret options available in CLI from the Release 24.4.1:

Router(config-un)# secret ?
0 Specifies a cleartext password will follow
10 Specifies that SHA512-based password will follow
8 Specifies that SHA256-based password will follow
9 Specifies that Scrypt-based password will follow
LINE The cleartext user password
Router(config-un)# secret 0 enc-type ?
<8-10> Specifies which algorithm to use. Only 8,9,10 supported [Note: Option '5' is not available to use from 24.4]

Changes:

  • The options 5 and encrypted are removed.

  • During upgrade: Configurations using Type 5 secret will remain unchanged.

    Post-upgrade: Though the keyword 5 has been deprecated, you can still apply the existing configurations using Type 5 secret.

  • New syslog has been added to indicate the deprecation process:

    %SECURITY-LOCALD-2-DEPRECATED_SECRET_TYPE : Type 5 secret is deprecated.
    Please use the 'secret' keyword with option type 10 for user.
  • show running configuration command output before upgrade:

    username example
    secret 5 $1$kACo$2RtpcwyiRuRB/DhWzabfU1
    !
    !

    show running configuration

    command output post-upgrade:

    username example
    secret 5 $1$kACo$2RtpcwyiRuRB/DhWzabfU1
    !
    !

Masked-secret

The masked-secret options available in CLI from the Release 24.4.1:

Router(config-un)# masked-secret ?
0 Specifies a cleartext password will follow

10 Specifies that SHA512-based password will follow
8 Specifies that SHA256-based password will follow
9 Specifies that Scrypt-based password will follow
clear Config deprecated. Will be removed in 7.7.1. Specify '0' instead.
<cr> The cleartext user password

Changes:

  • The options 5 and encrypted are removed.

  • During upgrade: Configurations using masked-secret with Type 5 will remain unchanged.

    Post-upgrade: Though the keyword 5 has been deprecated, you can still apply the existing configurations using Type 5 masked secret.

  • New syslog has been added to indicate the deprecation process:

    %SECURITY-LOCALD-2-DEPRECATED_SECRET_TYPE : Type 5 secret is deprecated.
    Please use the 'secret' keyword with option type 10 for user.
  • show running configuration command output before upgrade:

    username example
    secret 5 $1$kACo$2RtpcwyiRuRB/DhWzabfU1
    !
    !

    show running configuration command output post-upgrade:

    username example
    secret 5 $1$kACo$2RtpcwyiRuRB/DhWzabfU1
    !
    !

Special use cases

Use case 1: Configurations using both Type 7 password and secret with 8, 9, or 10 hashing, for the same user

  • During upgrade:

    • For the first 3000 username configurations, the password configuration will be rejected, and the secret configuration will remain unchanged.

    • For the rest of the username configurations, the original secret configuration will be rejected, and the password will be converted to Type 10 secret.

  • Post-upgrade:

    • For a new username configured, or the username that is already present before the upgrade, the password configuration will be rejected.

    • New syslog has been added to indicate the deprecation process:

      %SECURITY-PSLIB-4-SECRET_CONFIG_PRESENT : The password configuration is deprecated.
      Once secret is configured, cannot use password config for user <user name> at index <x> now.

      where 'x' is a number representing the index.

Use case 2: Configurations using both Type 7 password and Type 5 secret, for the same user

  • During upgrade:

    • For any username configuration, the original Type 5 secret configuration will be rejected, and the password will be converted to Type 10 secret.

  • Post-upgrade:

    • For a new username configured, or the username that is already present before the upgrade, the password configuration will be converted to Type 10 secret.

    • New syslog has been added to indicate the deprecation process:

      %SECURITY-PSLIB-4-DEPRECATED_PASSWORD_TYPE : The password configuration is deprecated.
       Converting it to a Type 10 secret for user <username>.

Type 7 password masking

A Type 7 password masking method is a password-entry method that hides password text from the terminal during Type 7 password authentication configuration.

  • The masked-password option prevents the entered password from appearing on the screen.

  • The running configuration stores the resulting password in encrypted Type 7 form.

  • The router displays an error message if the two password entries do not match.

Feature history

The feature history table lists release support for this feature.

Table 1. Feature History Table

Feature Name

Release Information

Feature Description

Password Masking

Release 25.4.1

Introduced in this release on: Fixed Systems (8010 [ASIC: A100])(select variants only*)

* This feature is supported on:

  • 8011-32Y8L2H2FH

  • 8011-12G12X4Y-A/D

Password Masking

Release 25.1.1

Introduced in this release on: Fixed Systems (8700 [ASIC: K100], 8010 [ASIC: A100])(select variants only*)

* This feature is supported on:

  • 8712-MOD-M

  • 8011-4G24Y4H-I

Password Masking

Release 24.4.1

Introduced in this release on: Fixed Systems (8200 [ASIC: P100], 8700 [ASIC: P100])(select variants only*); Modular Systems (8800 [LC ASIC: P100])(select variants only*)

* This feature is supported on:

  • 8212-48FH-M

  • 8711-32FH-M

  • 88-LC1-36EH

  • 88-LC1-12TH24FH-E

  • 88-LC1-52Y8H-EM

Password Masking

Release 7.3.1

With this feature, when you key in a password or secret, it is not displayed on the screen. This enhances security.

The feature is enabled by default. The following options are added to the username command:

  • masked-password

  • masked-secret

Type 7 password masking behavior

When you key in a password, to ensure that it is not displayed on the screen, use the masked-password option. Details:

Use the username command as shown below, and enter the password.

The following command contains the username us3, and 0 to specify a cleartext password.

Router(config)# username us3 masked-password 0

Enter password:
Re-enter password:

Router(config)#commit

View the encrypted password:

Router# show run aaa
..

username us3
 password 7 105A1D0D

Enable Type 7 password authentication and enter the encrypted password 105A1D0D. You can also use a password encrypted earlier.

Router(config)# username us3 masked-password 7

Enter password:
Re-enter password:


Router(config)#commit

If there is a password mismatch between the two entries, an error message is displayed.


Configure Type 7 password masking

Hide typed password characters while configuring a Type 7 password for local user authentication.

Use the masked-password option when you enter a password that must not be displayed on the screen.

Before you begin

Review the deprecation guidance for Type 7 password configuration before you use this task.

Procedure

  1. Configure a masked cleartext password for the user.

    Example:

    Router(config)# username us3 masked-password 0
    
    Enter password:
    Re-enter password:
    
    Router(config)#commit
    • When you enter the password, use the masked-password option to ensure it is not displayed on the screen.

    • Use the username command as shown and enter the password. The example above uses username "us3" and 0 to specify a cleartext password.

  2. Review the encrypted password in the running configuration.

    Example:

    Router# show run aaa
    ..
    
    username us3
     password 7 105A1D0D

    Use the running configuration to confirm the password is stored as an encrypted Type 7 value.

  3. Configure Type 7 password authentication with the encrypted password.

    Example:

    Router(config)# username us3 masked-password 7
    
    Enter password:
    Re-enter password:
    
    
    Router(config)#commit

    You can use the encrypted password previously generated by the router or another encrypted password.

  4. Confirm password entry behavior.

    View the encrypted password in the running configuration.

The user's password is configured, and the running configuration stores the encrypted Type 7 value.