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.
How it works
Section titled “How it works”| 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 RADIUSUser-Name).%{ip}is the client IP address:Connection:Client-IP-Address(the RADIUSFramed-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
GETto Test path (empty = the base URL); anything but401,403or5xxis a success.
Before you begin
Section titled “Before you begin”- 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.
Step 1: Add the Fortinet context server
Section titled “Step 1: Add the Fortinet context server”-
Open Settings › Webhooks, select Context servers and Add context server.
-
Choose Fortinet and fill in:
Field Value Name FortiAuthenticatorBase URL https://fac.contoso.comAuthentication Basic / user + password Username the FortiAuthenticator administrator, for example airgatePassword 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) -
Save, then select Test connection.
Step 2: Add the login and logout actions
Section titled “Step 2: Add the login and logout actions”-
Select Context actions and Add action.
-
Under Start from a preset, pick Fortinet SSO login. Pick the Context server
FortiAuthenticator. The form is filled in:Field Value Name Fortinet SSO loginMethod POSTURL /api/v1/ssoauth/Content type application/jsonBody {"event":"1","username":"%{name}","user_ip":"%{ip}"}To send
DOMAIN\userinstead of the short name, replace%{name}with%{full-username}. -
Save. Repeat with the Fortinet SSO logout preset.
-
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.
Step 3: Run the actions from policy
Section titled “Step 3: Run the actions from policy”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.
Verify
Section titled “Verify”- Sign in with a test user.
- In FortiAuthenticator, the user appears in the SSO user list with the
client’s IP. On FortiGate,
diagnose debug authd fsso listlists it. - In Airgate, Settings › Webhooks › Execution log shows the
Fortinet SSO loginrun with HTTP200.
Troubleshooting
Section titled “Troubleshooting”| 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). |