Technical Tip: Configure FortiGate v7.4.5+ / v7.6.1+ to allow access_token in URL Parameters from FortiNAC v7.4.3+
| Description | This article describes how to enable the 'access_token' parameter in the URL for a FortiGate API request as a work-around to avoid API key being removed from FortiNAC.
Starting from FortiGate FortiOS v7.4.5 and 7.6.1, API requests no longer allow the access_token as a URL parameter by default. Consequently, FortiNAC will fail to update ports/switch VLANs on a FortiSwitch in FortiLink mode. When this occurs, the API key is removed from the FortiGate device model in FortiNAC.
Affects non-RADIUS-enabled FortiSwitch ports where FortiNAC relies on APIs to make changes.
Example of behavior:
The following messages are also seen in the output.master file:
Fortigate.switchPortVlanMS_API VLAN API failed for port 366 Fortigate.switchPortVlanMS_API port state API failed Fortigate.switchPortVlan returning false |
| Scope | FortiGate FortiOS v7.4.5+ / 7.6.1+, FortiNAC vF 7.4.3+ & vF 7.6.5+. REST API. |
| Solution | If using the access_token as a URL parameter is required, the configuration can be adjusted to enable it.
Note: Enabling 'rest-api-key-url-query' in FortiGate should be carefully evaluated since it has the potential to expose the network to some risks.
Configure FortiGate:
config system global set rest-api-key-url-query enable end
FortiNAC:
Related article: Technical Tip: Configuring FortiGate v7.4.5+/v7.6.1+ to Allow access_token in URL Parameters |
