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

New in version 2.0.0.

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.15

Tips

Using member operation to add an element to an existing object.

FortiOS Version Compatibility

Supported Version Ranges: v6.0.0 -> 7.4.3

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
  • member_path - Member attribute path to operate on. type: str
  • member_state - Add or delete a member under specified attribute path. type: str choices: present, absent
  • 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...
    • account_key_cert_field - Define subject identity field in certificate for user access right checking. type: str choices: othername, rfc822name, dnsname more...
    • account_key_processing - Account key processing operation. The FortiGate will keep either the whole domain or strip the domain from the subject identity. type: str choices: same, strip more...
    • accounting_server - Additional accounting servers. type: list member_path: accounting_server:id more...
      • id - ID (0 - 4294967295). see Notes. 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 address. 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...
    • ca_cert - CA of server to trust under TLS. Source vpn.certificate.ca.name. type: str more...
    • call_station_id_type - Calling & Called station identifier type configuration , this option is not available for 802.1x authentication. type: str choices: legacy, IP, MAC more...
    • class - Class attribute name(s). type: list member_path: class:name more...
      • name - Class name. type: str required: true more...
    • client_cert - Client certificate to use under TLS. Source vpn.certificate.local.name. type: str more...
    • delimiter - Configure delimiter to be used for separating profile group names in the SSO attribute . type: str choices: plus, comma 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...
    • mac_case - MAC authentication case . type: str choices: uppercase, lowercase more...
    • mac_password_delimiter - MAC authentication password delimiter . type: str choices: hyphen, single-hyphen, colon, none more...
    • mac_username_delimiter - MAC authentication username delimiter . type: str choices: hyphen, single-hyphen, colon, none more...
    • name - RADIUS server entry name. type: str required: true more...
    • nas_id - Custom NAS identifier. type: str more...
    • nas_id_type - NAS identifier type configuration . type: str choices: legacy, custom, hostname 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 identifier 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 address. 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...
    • server_identity_check - Enable/disable RADIUS server identity check (verify server domain name/IP address against the server certificate). type: str choices: enable, disable 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...
    • status_ttl - Time for which server reachability is cached so that when a server is unreachable, it will not be retried for at least this period of time (0 = cache disabled). type: int more...
    • switch_controller_acct_fast_framedip_detect - Switch controller accounting message Framed-IP detection from DHCP snooping (seconds). type: int more...
    • switch_controller_nas_ip_dynamic - Enable/Disable switch-controller nas-ip dynamic to dynamically set nas-ip. type: str choices: enable, disable 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 address. type: str more...
    • timeout - Time in seconds to retry connecting server. type: int more...
    • tls_min_proto_version - Minimum supported protocol version for TLS connections . type: str choices: default, SSLv3, TLSv1, TLSv1-1, TLSv1-2, TLSv1-3 more...
    • transport_protocol - Transport protocol to be used . type: str choices: udp, tcp, tls 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

- name: Configure RADIUS server entries.
  fortinet.fortios.fortios_user_radius:
      vdom: "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      user_radius:
          account_key_cert_field: "othername"
          account_key_processing: "same"
          accounting_server:
              -
                  id: "6"
                  interface: "<your_own_value> (source system.interface.name)"
                  interface_select_method: "auto"
                  port: "0"
                  secret: "<your_own_value>"
                  server: "192.168.100.40"
                  source_ip: "84.230.14.43"
                  status: "enable"
          acct_all_servers: "enable"
          acct_interim_interval: "0"
          all_usergroup: "disable"
          auth_type: "auto"
          ca_cert: "<your_own_value> (source vpn.certificate.ca.name)"
          call_station_id_type: "legacy"
          class:
              -
                  name: "default_name_21"
          client_cert: "<your_own_value> (source vpn.certificate.local.name)"
          delimiter: "plus"
          group_override_attr_type: "filter-Id"
          h3c_compatibility: "enable"
          interface: "<your_own_value> (source system.interface.name)"
          interface_select_method: "auto"
          mac_case: "uppercase"
          mac_password_delimiter: "hyphen"
          mac_username_delimiter: "hyphen"
          name: "default_name_31"
          nas_id: "<your_own_value>"
          nas_id_type: "legacy"
          nas_ip: "<your_own_value>"
          password_encoding: "auto"
          password_renewal: "enable"
          radius_coa: "enable"
          radius_port: "0"
          rsso: "enable"
          rsso_context_timeout: "28800"
          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: "0"
          rsso_radius_response: "enable"
          rsso_radius_server_port: "1813"
          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"
          server_identity_check: "enable"
          source_ip: "84.230.14.43"
          sso_attribute: "User-Name"
          sso_attribute_key: "<your_own_value>"
          sso_attribute_value_override: "enable"
          status_ttl: "300"
          switch_controller_acct_fast_framedip_detect: "2"
          switch_controller_nas_ip_dynamic: "enable"
          switch_controller_service_type: "login"
          tertiary_secret: "<your_own_value>"
          tertiary_server: "<your_own_value>"
          timeout: "5"
          tls_min_proto_version: "default"
          transport_protocol: "udp"
          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.