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

New in version 2.8.

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

Parameters

  • access_token - Token-based authentication. Generated from GUI of Fortigate. type: str required: 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. This attribute was present already in previous version in a deeper level. It has been moved out to this outer level. type: str required: False choices: present, absent
  • user_radius - Configure RADIUS server entries. type: dict
    • state - B(Deprecated) type: str required: False choices: present, absent
    • accounting_server - Additional accounting servers. type: list
      • id - ID (0 - 4294967295). type: int required: True
      • port - RADIUS accounting port number. type: int
      • secret - Secret key. type: str
      • server - {} Server CN domain name or IP. type: str
      • source_ip - Source IP address for communications to the RADIUS server. type: str
      • status - Status. type: str choices: enable, disable
    • acct_all_servers - Enable/disable sending of accounting messages to all configured servers . type: str choices: enable, disable
    • acct_interim_interval - Time in seconds between each accounting interim update message. type: int
    • all_usergroup - Enable/disable automatically including this RADIUS server in all user groups. type: str choices: disable, enable
    • auth_type - Authentication methods/protocols permitted for this RADIUS server. type: str choices: auto, ms_chap_v2, ms_chap, chap, pap
    • class - Class attribute name(s). type: list
      • name - Class name. type: str required: True
    • h3c_compatibility - Enable/disable compatibility with the H3C, a mechanism that performs security checking for authentication. type: str choices: enable, disable
    • name - RADIUS server entry name. type: str required: True
    • nas_ip - IP address used to communicate with the RADIUS server and used as NAS-IP-Address and Called-Station-ID attributes. type: str
    • password_encoding - Password encoding. type: str choices: auto, ISO-8859-1
    • password_renewal - Enable/disable password renewal. type: str choices: enable, disable
    • 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
    • radius_port - RADIUS service port number. type: int
    • rsso - Enable/disable RADIUS based single sign on feature. type: str choices: enable, disable
    • rsso_context_timeout - Time in seconds before the logged out user is removed from the "user context list" of logged on users. type: int
    • 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
    • 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
    • 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
    • rsso_flush_ip_session - Enable/disable flushing user IP sessions on RADIUS accounting Stop messages. type: str choices: enable, disable
    • rsso_log_flags - Events to log. type: str choices: protocol-error, profile-missing, accounting-stop-missed, accounting-event, endpoint-block, radiusd-other, none
    • rsso_log_period - Time interval in seconds that group event log messages will be generated for dynamic profile events. type: int
    • rsso_radius_response - Enable/disable sending RADIUS response packets after receiving Start and Stop records. type: str choices: enable, disable
    • rsso_radius_server_port - UDP port to listen on for RADIUS Start and Stop records. type: int
    • rsso_secret - RADIUS secret used by the RADIUS accounting server. type: str
    • rsso_validate_request_secret - Enable/disable validating the RADIUS request shared secret in the Start or End record. type: str choices: enable, disable
    • secondary_secret - Secret key to access the secondary server. type: str
    • secondary_server - {} secondary RADIUS CN domain name or IP. type: str
    • secret - Pre-shared secret key used to access the primary RADIUS server. type: str
    • server - Primary RADIUS server CN domain name or IP address. type: str
    • source_ip - Source IP address for communications to the RADIUS server. type: str
    • 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
    • sso_attribute_key - Key prefix for SSO group value in the SSO attribute. type: str
    • sso_attribute_value_override - Enable/disable override old attribute value with new value for the same endpoint. type: str choices: enable, disable
    • tertiary_secret - Secret key to access the tertiary server. type: str
    • tertiary_server - {} tertiary RADIUS CN domain name or IP. type: str
    • timeout - Time in seconds between re-sending authentication requests. type: int
    • use_management_vdom - Enable/disable using management VDOM to send requests. type: str choices: enable, disable
    • username_case_sensitive - Enable/disable case sensitive user names. type: str choices: enable, disable

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"
            port: "5"
            secret: "<your_own_value>"
            server: "192.168.100.40"
            source_ip: "84.230.14.43"
            status: "enable"
        acct_all_servers: "enable"
        acct_interim_interval: "11"
        all_usergroup: "disable"
        auth_type: "auto"
        class:
         -
            name: "default_name_15"
        h3c_compatibility: "enable"
        name: "default_name_17"
        nas_ip: "<your_own_value>"
        password_encoding: "auto"
        password_renewal: "enable"
        radius_coa: "enable"
        radius_port: "22"
        rsso: "enable"
        rsso_context_timeout: "24"
        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: "30"
        rsso_radius_response: "enable"
        rsso_radius_server_port: "32"
        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"
        tertiary_secret: "<your_own_value>"
        tertiary_server: "<your_own_value>"
        timeout: "45"
        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.