.. _dellemc.enterprise_sonic.sonic_aaa_module: ********************************** dellemc.enterprise_sonic.sonic_aaa ********************************** **Manage AAA configuration on SONiC** Version added: 1.1.0 .. contents:: :local: :depth: 1 Synopsis -------- - This module provides configuration management of AAA for devices running SONiC. Parameters ---------- .. raw:: html
Parameter Choices/Defaults Comments
config
dictionary
AAA configuration
For all lists in the module, the list items should be specified in order of desired priority.
List items specified first have the highest priority.
accounting
dictionary
added in 4.0.0
AAA accounting configuration.
commands_accounting
dictionary
AAA commands accounting configuration.
accounting_console_exempt
boolean
    Choices:
  • no
  • yes
Exempt accounting of events from console.
accounting_method
list / elements=string
    Choices:
  • tacacs+
  • logging
Specifies the methods in which to perform accounting.
accounting_record_type
string
    Choices:
  • start-stop
  • stop-only
Specifies the type of record to be sent to the accounting server.
session_accounting
dictionary
AAA session accounting configuration.
accounting_console_exempt
boolean
    Choices:
  • no
  • yes
Exempt accounting of events from console.
accounting_method
list / elements=string
    Choices:
  • tacacs+
  • logging
Specifies the methods in which to perform accounting.
accounting_record_type
string
    Choices:
  • start-stop
  • stop-only
Specifies the type of record to be sent to the accounting server.
authentication
dictionary
added in 3.0.0
AAA authentication configuration
auth_method
list / elements=string
    Choices:
  • ldap
  • local
  • radius
  • tacacs+
  • cac-piv
Specifies the order of the methods in which to authenticate login
Any 1 choice may be specified or 2 choices consisting of local and another group may be specified
cac-piv option is only available in devices running sonic 4.5.0 and above.
MFA is not applicable when cac-piv is configured as first factor for authentication.
console_auth_local
boolean
    Choices:
  • no
  • yes
Enable/disable local authentication on console
failthrough
boolean
    Choices:
  • no
  • yes
Enable/disable failthrough
login_mfa_console
boolean
added in 3.1.0
    Choices:
  • no
  • yes
Enable/disable MFA method for console access.
mfa_auth_method
string
added in 3.1.0
    Choices:
  • rsa-securid
Specifies RSA SecurID as multi-factor authentication method.
authorization
dictionary
added in 3.0.0
AAA authorization configuration
commands_auth_method
list / elements=string
    Choices:
  • local
  • tacacs+
Specifies the order of the methods in which to authorize commands
login_auth_method
list / elements=string
    Choices:
  • ldap
  • local
Specifies the order of the methods in which to authorize login
name_service
dictionary
added in 3.0.0
AAA name-service configuration
group
list / elements=string
    Choices:
  • ldap
  • local
  • login
Name-service source for group method
netgroup
list / elements=string
    Choices:
  • ldap
  • local
Name-service source for netgroup method
passwd
list / elements=string
    Choices:
  • ldap
  • local
  • login
Name-service source for passwd method
shadow
list / elements=string
    Choices:
  • ldap
  • local
  • login
Name-service source for shadow method
sudoers
list / elements=string
    Choices:
  • ldap
  • local
Name-service source for sudoers method
state
string
    Choices:
  • merged ←
  • deleted
  • overridden
  • replaced
The state of the configuration after module completion

Notes ----- .. note:: - Tested against Enterprise SONiC Distribution by Dell Technologies - Supports ``check_mode`` Examples -------- .. code-block:: yaml # Using "merged" state # # Before state: # ------------- # # sonic# show aaa # (No AAA configuration present) # # sonic# show mfa # --------------------------------------------------------- # Multi-factor Authentication Information # --------------------------------------------------------- # MFA Authentication : None # Console Exempted : None # MFA Service Security Profile : None # RSA SecurID Security Profile : None - name: Merge AAA configuration dellemc.enterprise_sonic.sonic_aaa: config: authentication: auth_method: - local - ldap console_auth_local: true failthrough: true mfa_auth_method: 'rsa-securid' login_mfa_console: true authorization: commands_auth_method: - local - tacacs+ login_auth_method: - local - ldap accounting: commands_accounting: accounting_method: - tacacs+ - logging accounting_record_type: 'start-stop' accounting_console_exempt: true session_accounting: accounting_method: - logging accounting_record_type: 'stop-only' accounting_console_exempt: true name_service: group: - ldap netgroup: - local passwd: - login shadow: - ldap sudoers: - local state: merged # After state: # ------------ # # sonic# show aaa # --------------------------------------------------------- # AAA Authentication Information # --------------------------------------------------------- # failthrough : True # login-method : local, ldap # login-mfa : rsa-securid # console authentication : local # --------------------------------------------------------- # AAA Authorization Information # --------------------------------------------------------- # login : local, ldap # commands : local, tacacs+ # --------------------------------------------------------- # AAA Accounting Information # --------------------------------------------------------- # commands : tacacs+, logging (start-stop, console-disabled) # session : logging (stop-only, console-disabled) # --------------------------------------------------------- # AAA Name-Service Information # --------------------------------------------------------- # group-method : ldap # netgroup-method : local # passwd-method : login # shadow-method : ldap # sudoers-method : local # # sonic# show mfa # --------------------------------------------------------- # Multi-factor Authentication Information # --------------------------------------------------------- # MFA Authentication : rsa-securid # Console Exempted : No # MFA Service Security Profile : None # RSA SecurID Security Profile : None # Using "replaced" state # # Before state: # ------------- # # sonic# show aaa # --------------------------------------------------------- # AAA Authentication Information # --------------------------------------------------------- # failthrough : True # login-method : local, ldap # login-mfa : rsa-securid # console authentication : local # --------------------------------------------------------- # AAA Authorization Information # --------------------------------------------------------- # login : local, ldap # commands : local, tacacs+ # --------------------------------------------------------- # AAA Accounting Information # --------------------------------------------------------- # commands : tacacs+, logging (start-stop, console-disabled) # session : logging (stop-only, console-disabled) # --------------------------------------------------------- # AAA Name-Service Information # --------------------------------------------------------- # group-method : ldap # netgroup-method : local # passwd-method : login # shadow-method : ldap # sudoers-method : local # # sonic# show mfa # --------------------------------------------------------- # Multi-factor Authentication Information # --------------------------------------------------------- # MFA Authentication : rsa-securid # Console Exempted : No # MFA Service Security Profile : None # RSA SecurID Security Profile : None - name: Replace AAA configuration dellemc.enterprise_sonic.sonic_aaa: config: authentication: auth_method: - cac-piv - local console_auth_local: true failthrough: false authorization: commands_auth_method: - local accounting: commands_accounting: accounting_method: - tacacs+ session_accounting: accounting_record_type: 'start-stop' name_service: group: - ldap state: replaced # After state: # ------------ # # sonic# show aaa # --------------------------------------------------------- # AAA Authentication Information # --------------------------------------------------------- # failthrough : False # login-method : cac-piv, local # login-mfa : None # console authentication : local # --------------------------------------------------------- # AAA Authorization Information # --------------------------------------------------------- # login : local # --------------------------------------------------------- # AAA Accounting Information # --------------------------------------------------------- # commands : tacacs+ (start-stop, console-disabled) # session : logging (start-stop, console-disabled) # --------------------------------------------------------- # AAA Name-Service Information # --------------------------------------------------------- # group-method : ldap # # sonic# show mfa # --------------------------------------------------------- # Multi-factor Authentication Information # --------------------------------------------------------- # MFA Authentication : None # Console Exempted : None # MFA Service Security Profile : None # RSA SecurID Security Profile : None # Using "overridden" state # # Before state: # ------------- # # sonic# show aaa # --------------------------------------------------------- # AAA Authentication Information # --------------------------------------------------------- # failthrough : True # login-method : local, ldap # login-mfa : rsa-securid # console authentication : local # --------------------------------------------------------- # AAA Authorization Information # --------------------------------------------------------- # login : local, ldap # commands : local, tacacs+ # --------------------------------------------------------- # AAA Accounting Information # --------------------------------------------------------- # commands : tacacs+ (start-stop, console-disabled) # session : logging (start-stop, console-disabled) # --------------------------------------------------------- # AAA Name-Service Information # --------------------------------------------------------- # group-method : ldap # netgroup-method : local # passwd-method : login # shadow-method : ldap # sudoers-method : local # # sonic# show mfa # --------------------------------------------------------- # Multi-factor Authentication Information # --------------------------------------------------------- # MFA Authentication : rsa-securid # Console Exempted : Yes # MFA Service Security Profile : None # RSA SecurID Security Profile : None - name: Override AAA configuration dellemc.enterprise_sonic.sonic_aaa: config: authentication: auth_method: - tacacs+ console_auth_local: true failthrough: true mfa_auth_method: 'rsa-securid' login_mfa_console: true accounting: commands_accounting: accounting_method: - tacacs+ - logging accounting_record_type: 'stop-only' accounting_console_exempt: true session_accounting: accounting_method: - logging accounting_record_type: 'stop-only' accounting_console_exempt: true state: overridden # After state: # ------------ # # sonic# show aaa # --------------------------------------------------------- # AAA Authentication Information # --------------------------------------------------------- # failthrough : True # login-method : tacacs+ # login-mfa : rsa-securid # console authentication : local # # sonic# show mfa # --------------------------------------------------------- # Multi-factor Authentication Information # --------------------------------------------------------- # MFA Authentication : rsa-securid # Console Exempted : No # MFA Service Security Profile : None # RSA SecurID Security Profile : None # --------------------------------------------------------- # AAA Accounting Information # --------------------------------------------------------- # commands : tacacs+, logging (stop-only, console-disabled) # session : logging (stop-only, console-disabled) # Using "deleted" state # # Before state: # ------------- # # sonic# show aaa # --------------------------------------------------------- # AAA Authentication Information # --------------------------------------------------------- # failthrough : True # login-method : local, ldap # login-mfa : rsa-securid # console authentication : local # --------------------------------------------------------- # AAA Authorization Information # --------------------------------------------------------- # login : local, ldap # commands : local, tacacs+ # --------------------------------------------------------- # AAA Accounting Information # --------------------------------------------------------- # commands : tacacs+, logging (stop-only, console-disabled) # session : logging (stop-only, console-disabled) # --------------------------------------------------------- # AAA Name-Service Information # --------------------------------------------------------- # group-method : ldap # netgroup-method : local # passwd-method : login # shadow-method : ldap # sudoers-method : local # # sonic# show mfa # --------------------------------------------------------- # Multi-factor Authentication Information # --------------------------------------------------------- # MFA Authentication : rsa-securid # Console Exempted : No # MFA Service Security Profile : None # RSA SecurID Security Profile : None - name: Delete AAA individual attributes dellemc.enterprise_sonic.sonic_aaa: config: authentication: auth_method: - local - ldap console_auth_local: true failthrough: true mfa_auth_method: 'rsa-securid' login_mfa_console: true authorization: commands_auth_method: - local - tacacs+ login_auth_method: - local - ldap accounting: commands_accounting: accounting_method: - tacacs+ - logging accounting_record_type: 'stop-only' accounting_console_exempt: true session_accounting: accounting_method: - logging accounting_record_type: 'stop-only' accounting_console_exempt: true name_service: group: - ldap netgroup: - local passwd: - login shadow: - ldap sudoers: - local state: deleted # After state: # ------------ # # sonic# show aaa # (No AAA configuration present) # # sonic# show mfa # --------------------------------------------------------- # Multi-factor Authentication Information # --------------------------------------------------------- # MFA Authentication : None # Console Exempted : None # MFA Service Security Profile : None # RSA SecurID Security Profile : None # Using "deleted" state # # Before state: # ------------- # # sonic# show aaa # --------------------------------------------------------- # AAA Authentication Information # --------------------------------------------------------- # failthrough : True # login-method : local, ldap # login-mfa : rsa-securid # console authentication : local # --------------------------------------------------------- # AAA Authorization Information # --------------------------------------------------------- # login : local, ldap # commands : local, tacacs+ # --------------------------------------------------------- # AAA Accounting Information # --------------------------------------------------------- # commands : tacacs+, logging (stop-only, console-disabled) # session : logging (stop-only, console-disabled) # --------------------------------------------------------- # AAA Name-Service Information # --------------------------------------------------------- # group-method : ldap # netgroup-method : local # passwd-method : login # shadow-method : ldap # sudoers-method : local # # sonic# show mfa # --------------------------------------------------------- # Multi-factor Authentication Information # --------------------------------------------------------- # MFA Authentication : rsa-securid # Console Exempted : Yes # MFA Service Security Profile : None # RSA SecurID Security Profile : None - name: Delete all AAA configuration dellemc.enterprise_sonic.sonic_aaa: config: {} state: deleted # After state: # ------------ # # sonic# show aaa # (No AAA configuration present) # # sonic# show mfa # --------------------------------------------------------- # Multi-factor Authentication Information # --------------------------------------------------------- # MFA Authentication : None # Console Exempted : None # MFA Service Security Profile : None # RSA SecurID Security Profile : None Return Values ------------- Common return values are documented `here `_, the following are the fields unique to this module: .. raw:: html
Key Returned Description
after
dictionary
when changed
The resulting configuration module invocation.

after_generated
dictionary
when check_mode
The generated configuration module invocation.

before
dictionary
always
The configuration prior to the module invocation.

commands
list
always
The set of commands pushed to the remote device.

Sample:
['command 1', 'command 2', 'command 3']


Status ------ Authors ~~~~~~~ - S\. Talabi (@stalabi1)