fortios_user_radius – Configure RADIUS server entries in Fortinet’s FortiOS and FortiGate.

New in version 2.10.

Synopsis

  • This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify user feature and radius category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0

Requirements

The below requirements are needed on the host that executes this module.

  • ansible>=2.9.0

FortiOS Version Compatibility


v6.0.0 v6.0.5 v6.0.11 v6.2.0 v6.2.3 v6.2.5 v6.2.7 v6.4.0 v6.4.1 v6.4.4 v7.0.0
fortios_user_radius yes yes yes yes yes yes yes yes yes yes yes

Parameters

  • access_token - Token-based authentication. Generated from GUI of Fortigate. type: str required: False
  • enable_log - Enable/Disable logging for task. type: bool required: False default: False
  • vdom - Virtual domain, among those defined previously. A vdom is a virtual instance of the FortiGate that can be configured and used as a different unit. type: str default: root
  • state - Indicates whether to create or remove the object. type: str required: True choices: present, absent
  • user_radius - Configure RADIUS server entries. type: dict more...
    • accounting_server - Additional accounting servers. type: list more...
      • id - ID (0 - 4294967295). type: int required: True more...
      • interface - Specify outgoing interface to reach server. Source system.interface.name. type: str more...
      • interface_select_method - Specify how to select outgoing interface to reach server. type: str choices: auto, sdwan, specify more...
      • port - RADIUS accounting port number. type: int more...
      • secret - Secret key. type: str more...
      • server - {} Server CN domain name or IP. type: str more...
      • source_ip - Source IP address for communications to the RADIUS server. type: str more...
      • status - Status. type: str choices: enable, disable more...
    • acct_all_servers - Enable/disable sending of accounting messages to all configured servers . type: str choices: enable, disable more...
    • acct_interim_interval - Time in seconds between each accounting interim update message. type: int more...
    • all_usergroup - Enable/disable automatically including this RADIUS server in all user groups. type: str choices: disable, enable more...
    • auth_type - Authentication methods/protocols permitted for this RADIUS server. type: str choices: auto, ms_chap_v2, ms_chap, chap, pap more...
    • class - Class attribute name(s). type: list more...
      • name - Class name. type: str required: True more...
    • group_override_attr_type - RADIUS attribute type to override user group information. type: str choices: filter-Id, class more...
    • h3c_compatibility - Enable/disable compatibility with the H3C, a mechanism that performs security checking for authentication. type: str choices: enable, disable more...
    • interface - Specify outgoing interface to reach server. Source system.interface.name. type: str more...
    • interface_select_method - Specify how to select outgoing interface to reach server. type: str choices: auto, sdwan, specify more...
    • name - RADIUS server entry name. type: str required: True more...
    • nas_ip - IP address used to communicate with the RADIUS server and used as NAS-IP-Address and Called-Station-ID attributes. type: str more...
    • password_encoding - Password encoding. type: str choices: auto, ISO-8859-1 more...
    • password_renewal - Enable/disable password renewal. type: str choices: enable, disable more...
    • radius_coa - Enable to allow a mechanism to change the attributes of an authentication, authorization, and accounting session after it is authenticated. type: str choices: enable, disable more...
    • radius_port - RADIUS service port number. type: int more...
    • rsso - Enable/disable RADIUS based single sign on feature. type: str choices: enable, disable more...
    • rsso_context_timeout - Time in seconds before the logged out user is removed from the "user context list" of logged on users. type: int more...
    • rsso_endpoint_attribute - RADIUS attributes used to extract the user end point identifer from the RADIUS Start record. type: str choices: User-Name, NAS-IP-Address, Framed-IP-Address, Framed-IP-Netmask, Filter-Id, Login-IP-Host, Reply-Message, Callback-Number, Callback-Id, Framed-Route, Framed-IPX-Network, Class, Called-Station-Id, Calling-Station-Id, NAS-Identifier, Proxy-State, Login-LAT-Service, Login-LAT-Node, Login-LAT-Group, Framed-AppleTalk-Zone, Acct-Session-Id, Acct-Multi-Session-Id more...
    • rsso_endpoint_block_attribute - RADIUS attributes used to block a user. type: str choices: User-Name, NAS-IP-Address, Framed-IP-Address, Framed-IP-Netmask, Filter-Id, Login-IP-Host, Reply-Message, Callback-Number, Callback-Id, Framed-Route, Framed-IPX-Network, Class, Called-Station-Id, Calling-Station-Id, NAS-Identifier, Proxy-State, Login-LAT-Service, Login-LAT-Node, Login-LAT-Group, Framed-AppleTalk-Zone, Acct-Session-Id, Acct-Multi-Session-Id more...
    • rsso_ep_one_ip_only - Enable/disable the replacement of old IP addresses with new ones for the same endpoint on RADIUS accounting Start messages. type: str choices: enable, disable more...
    • rsso_flush_ip_session - Enable/disable flushing user IP sessions on RADIUS accounting Stop messages. type: str choices: enable, disable more...
    • rsso_log_flags - Events to log. type: list choices: protocol-error, profile-missing, accounting-stop-missed, accounting-event, endpoint-block, radiusd-other, none more...
    • rsso_log_period - Time interval in seconds that group event log messages will be generated for dynamic profile events. type: int more...
    • rsso_radius_response - Enable/disable sending RADIUS response packets after receiving Start and Stop records. type: str choices: enable, disable more...
    • rsso_radius_server_port - UDP port to listen on for RADIUS Start and Stop records. type: int more...
    • rsso_secret - RADIUS secret used by the RADIUS accounting server. type: str more...
    • rsso_validate_request_secret - Enable/disable validating the RADIUS request shared secret in the Start or End record. type: str choices: enable, disable more...
    • secondary_secret - Secret key to access the secondary server. type: str more...
    • secondary_server - {} secondary RADIUS CN domain name or IP. type: str more...
    • secret - Pre-shared secret key used to access the primary RADIUS server. type: str more...
    • server - Primary RADIUS server CN domain name or IP address. type: str more...
    • source_ip - Source IP address for communications to the RADIUS server. type: str more...
    • sso_attribute - RADIUS attribute that contains the profile group name to be extracted from the RADIUS Start record. type: str choices: User-Name, NAS-IP-Address, Framed-IP-Address, Framed-IP-Netmask, Filter-Id, Login-IP-Host, Reply-Message, Callback-Number, Callback-Id, Framed-Route, Framed-IPX-Network, Class, Called-Station-Id, Calling-Station-Id, NAS-Identifier, Proxy-State, Login-LAT-Service, Login-LAT-Node, Login-LAT-Group, Framed-AppleTalk-Zone, Acct-Session-Id, Acct-Multi-Session-Id more...
    • sso_attribute_key - Key prefix for SSO group value in the SSO attribute. type: str more...
    • sso_attribute_value_override - Enable/disable override old attribute value with new value for the same endpoint. type: str choices: enable, disable more...
    • switch_controller_acct_fast_framedip_detect - Switch controller accounting message Framed-IP detection from DHCP snooping (seconds). type: int more...
    • switch_controller_service_type - RADIUS service type. type: list choices: login, framed, callback-login, callback-framed, outbound, administrative, nas-prompt, authenticate-only, callback-nas-prompt, call-check, callback-administrative more...
    • tertiary_secret - Secret key to access the tertiary server. type: str more...
    • tertiary_server - {} tertiary RADIUS CN domain name or IP. type: str more...
    • timeout - Time in seconds between re-sending authentication requests. type: int more...
    • use_management_vdom - Enable/disable using management VDOM to send requests. type: str choices: enable, disable more...
    • username_case_sensitive - Enable/disable case sensitive user names. type: str choices: enable, disable more...

Notes

Note

  • Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks

Examples

- hosts: fortigates
  collections:
    - fortinet.fortios
  connection: httpapi
  vars:
   vdom: "root"
   ansible_httpapi_use_ssl: yes
   ansible_httpapi_validate_certs: no
   ansible_httpapi_port: 443
  tasks:
  - name: Configure RADIUS server entries.
    fortios_user_radius:
      vdom:  "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      user_radius:
        accounting_server:
         -
            id:  "4"
            interface: "<your_own_value> (source system.interface.name)"
            interface_select_method: "auto"
            port: "7"
            secret: "<your_own_value>"
            server: "192.168.100.40"
            source_ip: "84.230.14.43"
            status: "enable"
        acct_all_servers: "enable"
        acct_interim_interval: "13"
        all_usergroup: "disable"
        auth_type: "auto"
        class:
         -
            name: "default_name_17"
        group_override_attr_type: "filter-Id"
        h3c_compatibility: "enable"
        interface: "<your_own_value> (source system.interface.name)"
        interface_select_method: "auto"
        name: "default_name_22"
        nas_ip: "<your_own_value>"
        password_encoding: "auto"
        password_renewal: "enable"
        radius_coa: "enable"
        radius_port: "27"
        rsso: "enable"
        rsso_context_timeout: "29"
        rsso_endpoint_attribute: "User-Name"
        rsso_endpoint_block_attribute: "User-Name"
        rsso_ep_one_ip_only: "enable"
        rsso_flush_ip_session: "enable"
        rsso_log_flags: "protocol-error"
        rsso_log_period: "35"
        rsso_radius_response: "enable"
        rsso_radius_server_port: "37"
        rsso_secret: "<your_own_value>"
        rsso_validate_request_secret: "enable"
        secondary_secret: "<your_own_value>"
        secondary_server: "<your_own_value>"
        secret: "<your_own_value>"
        server: "192.168.100.40"
        source_ip: "84.230.14.43"
        sso_attribute: "User-Name"
        sso_attribute_key: "<your_own_value>"
        sso_attribute_value_override: "enable"
        switch_controller_acct_fast_framedip_detect: "48"
        switch_controller_service_type: "login"
        tertiary_secret: "<your_own_value>"
        tertiary_server: "<your_own_value>"
        timeout: "52"
        use_management_vdom: "enable"
        username_case_sensitive: "enable"

Return Values

Common return values are documented: https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values, the following are the fields unique to this module:

  • build - Build number of the fortigate image returned: always type: str sample: 1547
  • http_method - Last method used to provision the content into FortiGate returned: always type: str sample: PUT
  • http_status - Last result given by FortiGate on last operation applied returned: always type: str sample: 200
  • mkey - Master key (id) used in the last call to FortiGate returned: success type: str sample: id
  • name - Name of the table used to fulfill the request returned: always type: str sample: urlfilter
  • path - Path of the table used to fulfill the request returned: always type: str sample: webfilter
  • revision - Internal revision number returned: always type: str sample: 17.0.2.10658
  • serial - Serial number of the unit returned: always type: str sample: FGVMEVYYQT3AB5352
  • status - Indication of the operation's result returned: always type: str sample: success
  • vdom - Virtual domain used returned: always type: str sample: root
  • version - Version of the FortiGate returned: always type: str sample: v5.6.3

Status

  • This module is not guaranteed to have a backwards compatible interface.

Authors

  • Link Zheng (@chillancezen)
  • Jie Xue (@JieX19)
  • Hongbin Lu (@fgtdev-hblu)
  • Frank Shen (@frankshen01)
  • Miguel Angel Munoz (@mamunozgonzalez)
  • Nicolas Thomas (@thomnico)

Hint

If you notice any issues in this documentation, you can create a pull request to improve it.