Skip to content
AirgateDocumentation

Fortinet single sign-on

Tell FortiAuthenticator (and through it FortiGate) which user has which IP address with Airgate HTTP actions, using the built-in Fortinet SSO login and logout presets.

Airgate can send a user’s sign-in to FortiAuthenticator’s single sign-on REST API, so FortiGate firewalls that use FortiAuthenticator for FSSO can apply user- and group-based policies to Wi-Fi and wired users. This page sets up a Fortinet context server and the Fortinet SSO login and Fortinet SSO logout actions.

Status: Available as an HTTP action target, with built-in presets for the SSO login and logout calls. The calls run from an access rule (after the authentication decision). Automatic logout when a network session stops is Planned; today only Palo Alto User-ID follows RADIUS accounting.

To use a FortiGate as a RADIUS client of Airgate (802.1X, MAB, captive portal), see Fortinet FortiGate, FortiAP and FortiSwitch instead.

Preset Request
Fortinet SSO login POST /api/v1/ssoauth/ with {"event":"1","username":"%{name}","user_ip":"%{ip}"}
Fortinet SSO logout POST /api/v1/ssoauth/ with {"event":"0","username":"%{name}","user_ip":"%{ip}"}
  • %{name} is the user name of the request (Authentication:Username, else the RADIUS User-Name).
  • %{ip} is the client IP address: Connection:Client-IP-Address (the RADIUS Framed-IP-Address, or the guest’s address on the guest portal), else the last address Airgate knows for the device.
  • The Fortinet server type defaults to Bearer token authentication and supports all others. Test connection sends GET to Test path (empty = the base URL); anything but 401, 403 or 5xx is a success.
  • FortiAuthenticator with FSSO enabled and FortiGate already receiving FSSO users from it.
  • A FortiAuthenticator administrator account with REST API (web service) access, and its API access key. Airgate uses Basic authentication with the account name and the key.
  • FortiAuthenticator reachable from Airgate over HTTPS.
  • An Airgate administrator with admin:write.
  1. Open Settings › Webhooks, select Context servers and Add context server.

  2. Choose Fortinet and fill in:

    Field Value
    Name FortiAuthenticator
    Base URL https://fac.contoso.com
    Authentication Basic / user + password
    Username the FortiAuthenticator administrator, for example airgate
    Password the administrator’s API access key (stored encrypted)
    Test path /api/v1/ssoauth/ (optional)
    Verify the server certificate on; paste a private CA into Trusted CA certificate(s)
  3. Save, then select Test connection.

  1. Select Context actions and Add action.

  2. Under Start from a preset, pick Fortinet SSO login. Pick the Context server FortiAuthenticator. The form is filled in:

    Field Value
    Name Fortinet SSO login
    Method POST
    URL /api/v1/ssoauth/
    Content type application/json
    Body {"event":"1","username":"%{name}","user_ip":"%{ip}"}

    To send DOMAIN\user instead of the short name, replace %{name} with %{full-username}.

  3. Save. Repeat with the Fortinet SSO logout preset.

  4. Select Test on the login action, enter a Username (alice) and a Client IP (10.0.20.15) and select Render only to check the body, then Send request.

Create an HTTP enforcement profile for each action ({"context_action_id": "<id>"}) and add the login profile to the rules that admit users, and the logout profile to rules that reject or quarantine them. HTTP profiles are attached through the API; see Webhooks and HTTP actions, Step 3.

  1. Sign in with a test user.
  2. In FortiAuthenticator, the user appears in the SSO user list with the client’s IP. On FortiGate, diagnose debug authd fsso list lists it.
  3. In Airgate, Settings › Webhooks › Execution log shows the Fortinet SSO login run with HTTP 200.
Symptom Cause Fix
Test or run: authentication rejected (HTTP 401) / HTTP 401 in the log Wrong user name or access key, or the account lacks REST API access. Check the administrator in FortiAuthenticator.
Login logged with an empty user_ip The request had no client IP (see the caution above). Use the action for guest portal logins, or for networks that send Framed-IP-Address.
Users stay logged in after they leave Logout runs only from a rule, not on session stop. Rely on the FSSO timeout in FortiAuthenticator, or run the logout action from a reject rule.
Execution log: TLS error FortiAuthenticator’s certificate is not trusted. Add its CA under Trusted CA certificate(s).