fortios_system_accprofile – Configure access profiles for system administrators in Fortinet’s FortiOS and FortiGate

New in version 2.8.

Synopsis

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

Requirements

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

  • fortiosapi>=0.9.8

Parameters

Parameter Choices/Defaults Comments
host
- / required
FortiOS or FortiGate ip address.
https
boolean
    Choices:
  • no
  • yes ←
Indicates if the requests towards FortiGate must use HTTPS protocol
password
-
Default:
""
FortiOS or FortiGate password.
system_accprofile
-
Default:
null
Configure access profiles for system administrators.
admintimeout
-
Administrator timeout for this access profile (0 - 480 min, default = 10, 0 means never timeout).
admintimeout-override
-
    Choices:
  • enable
  • disable
Enable/disable overriding the global administrator idle timeout.
authgrp
-
    Choices:
  • none
  • read
  • read-write
Administrator access to Users and Devices.
comments
-
Comment.
ftviewgrp
-
    Choices:
  • none
  • read
  • read-write
FortiView.
fwgrp
-
    Choices:
  • none
  • read
  • read-write
  • custom
Administrator access to the Firewall configuration.
fwgrp-permission
-
Custom firewall permission.
address
-
    Choices:
  • none
  • read
  • read-write
Address Configuration.
policy
-
    Choices:
  • none
  • read
  • read-write
Policy Configuration.
schedule
-
    Choices:
  • none
  • read
  • read-write
Schedule Configuration.
service
-
    Choices:
  • none
  • read
  • read-write
Service Configuration.
loggrp
-
    Choices:
  • none
  • read
  • read-write
  • custom
Administrator access to Logging and Reporting including viewing log messages.
loggrp-permission
-
Custom Log & Report permission.
config
-
    Choices:
  • none
  • read
  • read-write
Log & Report configuration.
data-access
-
    Choices:
  • none
  • read
  • read-write
Log & Report Data Access.
report-access
-
    Choices:
  • none
  • read
  • read-write
Log & Report Report Access.
threat-weight
-
    Choices:
  • none
  • read
  • read-write
Log & Report Threat Weight.
name
- / required
Profile name.
netgrp
-
    Choices:
  • none
  • read
  • read-write
  • custom
Network Configuration.
netgrp-permission
-
Custom network permission.
cfg
-
    Choices:
  • none
  • read
  • read-write
Network Configuration.
packet-capture
-
    Choices:
  • none
  • read
  • read-write
Packet Capture Configuration.
route-cfg
-
    Choices:
  • none
  • read
  • read-write
Router Configuration.
scope
-
    Choices:
  • vdom
  • global
Scope of admin access: global or specific VDOs.
secfabgrp
-
    Choices:
  • none
  • read
  • read-write
Security Fabric.
state
-
    Choices:
  • present
  • absent
Indicates whether to create or remove the object
sysgrp
-
    Choices:
  • none
  • read
  • read-write
  • custom
System Configuration.
sysgrp-permission
-
Custom system permission.
admin
-
    Choices:
  • none
  • read
  • read-write
Administrator Users.
cfg
-
    Choices:
  • none
  • read
  • read-write
System Configuration.
mnt
-
    Choices:
  • none
  • read
  • read-write
Maintenance.
upd
-
    Choices:
  • none
  • read
  • read-write
FortiGuard Updates.
utmgrp
-
    Choices:
  • none
  • read
  • read-write
  • custom
Administrator access to Security Profiles.
utmgrp-permission
-
Custom Security Profile permissions.
antivirus
-
    Choices:
  • none
  • read
  • read-write
Antivirus profiles and settings.
application-control
-
    Choices:
  • none
  • read
  • read-write
Application Control profiles and settings.
data-loss-prevention
-
    Choices:
  • none
  • read
  • read-write
DLP profiles and settings.
dnsfilter
-
    Choices:
  • none
  • read
  • read-write
DNS Filter profiles and settings.
endpoint-control
-
    Choices:
  • none
  • read
  • read-write
FortiClient Profiles.
icap
-
    Choices:
  • none
  • read
  • read-write
ICAP profiles and settings.
ips
-
    Choices:
  • none
  • read
  • read-write
IPS profiles and settings.
spamfilter
-
    Choices:
  • none
  • read
  • read-write
AntiSpam filter and settings.
voip
-
    Choices:
  • none
  • read
  • read-write
VoIP profiles and settings.
waf
-
    Choices:
  • none
  • read
  • read-write
Web Application Firewall profiles and settings.
webfilter
-
    Choices:
  • none
  • read
  • read-write
Web Filter profiles and settings.
vpngrp
-
    Choices:
  • none
  • read
  • read-write
Administrator access to IPsec, SSL, PPTP, and L2TP VPN.
wanoptgrp
-
    Choices:
  • none
  • read
  • read-write
Administrator access to WAN Opt & Cache.
wifi
-
    Choices:
  • none
  • read
  • read-write
Administrator access to the WiFi controller and Switch controller.
username
- / required
FortiOS or FortiGate username.
vdom
-
Default:
"root"
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.

Notes

Note

  • Requires fortiosapi library developed by Fortinet
  • Run as a local_action in your playbook

Examples

- hosts: localhost
  vars:
   host: "192.168.122.40"
   username: "admin"
   password: ""
   vdom: "root"
  tasks:
  - name: Configure access profiles for system administrators.
    fortios_system_accprofile:
      host:  "{{ host }}"
      username: "{{ username }}"
      password: "{{ password }}"
      vdom:  "{{ vdom }}"
      https: "False"
      system_accprofile:
        state: "present"
        admintimeout: "3"
        admintimeout-override: "enable"
        authgrp: "none"
        comments: "<your_own_value>"
        ftviewgrp: "none"
        fwgrp: "none"
        fwgrp-permission:
            address: "none"
            policy: "none"
            schedule: "none"
            service: "none"
        loggrp: "none"
        loggrp-permission:
            config: "none"
            data-access: "none"
            report-access: "none"
            threat-weight: "none"
        name: "default_name_20"
        netgrp: "none"
        netgrp-permission:
            cfg: "none"
            packet-capture: "none"
            route-cfg: "none"
        scope: "vdom"
        secfabgrp: "none"
        sysgrp: "none"
        sysgrp-permission:
            admin: "none"
            cfg: "none"
            mnt: "none"
            upd: "none"
        utmgrp: "none"
        utmgrp-permission:
            antivirus: "none"
            application-control: "none"
            data-loss-prevention: "none"
            dnsfilter: "none"
            endpoint-control: "none"
            icap: "none"
            ips: "none"
            spamfilter: "none"
            voip: "none"
            waf: "none"
            webfilter: "none"
        vpngrp: "none"
        wanoptgrp: "none"
        wifi: "none"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
build
string
always
Build number of the fortigate image

Sample:
1547
http_method
string
always
Last method used to provision the content into FortiGate

Sample:
PUT
http_status
string
always
Last result given by FortiGate on last operation applied

Sample:
200
mkey
string
success
Master key (id) used in the last call to FortiGate

Sample:
id
name
string
always
Name of the table used to fulfill the request

Sample:
urlfilter
path
string
always
Path of the table used to fulfill the request

Sample:
webfilter
revision
string
always
Internal revision number

Sample:
17.0.2.10658
serial
string
always
Serial number of the unit

Sample:
FGVMEVYYQT3AB5352
status
string
always
Indication of the operation's result

Sample:
success
vdom
string
always
Virtual domain used

Sample:
root
version
string
always
Version of the FortiGate

Sample:
v5.6.3


Status

Authors

  • Miguel Angel Munoz (@mamunozgonzalez)
  • Nicolas Thomas (@thomnico)

Hint

If you notice any issues in this documentation you can edit this document to improve it.