Technical Tip: FortiNAC Dynamic Address tag API calls failing on FortiGates running FortiOS v7.4.8 and later (Known Issue)
| Description | This article describes a known issue where the FortiNAC appliance is unable to successfully make a REST API calls to the FortiGate to update dynamic address tags after the FortiGate is upgraded to FortiOS v7.4.8 or later (administrators will likely find that the solution works with FortiOS v7.4.7 and then stops working post-upgrade). |
| Scope | FortiGate, FortiNAC-F, Dynamic Address Tags. |
| Solution | First of all, refer to the following documentation for the FortiGate/FortiNAC-F tag integration being discussed in this article:
As noted in the above documents, the FortiNAC shares users' login information with the FortiGate via dynamic address tags, which are synchronized via REST API calls made from FortiNAC to the FortiGate. Administrators who configure this solution correctly on FortiOS v7.4.7 and earlier will likely find that it works without issues, but after upgrading to FortiOS v7.4.8 and later may find that tag synchronization stops working successfully.
This is a known-issue, though there are currently two separate contributing causes to the issue that are discussed below, each of which has a different solution. To determine which issue is being encountered, run the following CLI debug commands on the FortiGate in a logged SSH session while the FortiNAC is making the API call to update dynamic address tags, then examine the results against the provided symptoms:
diagnose debug application csfd -1 diagnose debug application httpsd -1 diagnose debug application nodejs -1 diagnose debug console timestamp enable diagnose debug enable
Issue 1: 'HTTP 400 Bad Request' (FortiGate-side issue). While running the above debugs, administrators may observe the following output pattern produced by the csfd process when the FortiNAC performs the API call associated with dynamic tag updates:
Notably, the FortiGate's csfd process does receive the HTTP POST request from the FortiNAC, processes it, then rejects it with an HTTP 400 Bad Request reply.
This issue occurs due to a case-sensitivity issue that affects how the HTTP headers are processed by the FortiGate, and it is addressed as of Change #1154124, with a fix delivered in FortiOS v7.6.5 and later (but not FortiOS v7.4 at this time, see the Known Issues section of the Release Notes for v7.4.8 and later).
Issue 2: 'Parse Error: Invalid method encountered' (FortiNAC-F issue). This issue manifests similarly to Issue 1 at a high-level (dynamic address tags will fail to update/synchronize), but the root cause is different. When running the above debugs on the FortiGate, check for the following symptom pattern:
Notably, the above pattern shows that the node process on the FortiGate does receive the API request from the FortiNAC, parses it, then determines that the request is invalid and does not forward it to the csfd process. As noted above, this issue is likely to occur after upgrading to FortiOS v7.4.8 and later, but is not likely to occur when running up to FortiOS v7.4.7. Furthermore, the FortiNAC may be running v7.4.3, v7.6.5, or earlier.
The reason this occurs is that the included Node.js package was updated as part of FortiOS v7.4.8, and this update included strict enforcement of HTTP request structures as defined in RFC 9110. This enforcement revealed that the HTTP request made by FortiNAC-F to the FortiGate for dynamic tag updates was actually non-compliant with the aforementioned RFC, and so the FortiGate is now recognizing and subsequently disallowing these malformed requests.
This issue has been identified and addressed on the FortiNAC-F side by Changes 1233513 and 1253908 and will be addressed in the upcoming FortiNAC-F v7.4.4, v7.6.6, and later.
Related article: |
