Skip to content
Trustaige Docs

Sign in to FortiGate VPN with Trustaige

Make Trustaige the SAML sign-in for FortiGate SSL VPN and IPsec IKEv2, so people connect with FortiClient and their passkey, matched to FortiGate groups.

  • Every plan
  • Needs FortiOS 7.0.1 for SSL VPN
  • Needs FortiOS 7.6.1 for IPsec IKEv2
  • About 30 minutes
View as Markdown

FortiGate accepts a SAML identity provider for remote access. With Trustaige as that provider, FortiClient opens Trustaige in the system browser, the person proves it’s them with their passkey, and FortiGate admits them to the user groups their Trustaige groups map to. The username, password and one-time code go away.

  1. Person to FortiClient: connects with single sign-on
  2. FortiClient to FortiGate: asks to sign in
  3. FortiGate to Trustaige: AuthnRequest, in the system browser
  4. Person and Trustaige: passkey
  5. Trustaige to FortiGate: signed assertion: username and group
  6. FortiGate to FortiClient: tunnel up

One app serves one FortiGate listener: the SSL VPN port, or the IKE SAML port for IPsec IKEv2. FortiOS 7.6.3 replaces SSL VPN tunnel mode with IPsec IKEv2, so new deployments use IPsec.

Before you begin

You needWhy
FortiOS 7.0.1 or later for SSL VPN; 7.6.1 or later for IPsec IKEv2Earlier versions can’t send FortiClient to an external browser.
FortiClient 7.2.5 or 7.4.1 or later for IPsec IKEv2The external browser over IPsec needs both sides.
The address and port people connect toTrustaige builds the FortiGate’s SAML URLs from them.
A certificate on that address that devices trustThe system browser opens the FortiGate during sign-in, and refuses an untrusted certificate.
The permission to manage apps in TrustaigeYou create the app and assign its groups.

1. Set up the app in the hub

  1. In the hub, go to Apps. Under Integrations, find FortiGate VPN and click Connect, then Begin setup.

  2. At Enter the FortiGate’s VPN address, enter the VPN address, for example <your-vpn-host>, and the Port: the SSL VPN listening port, or the IKE SAML port for IPsec IKEv2 (1001 unless you changed it). Click Save.

  3. Check the three addresses the hub shows. They’re the ones FortiGate shows for the same address and port:

    Hub labelValue
    Application identifierhttps://<your-vpn-host>:10443/remote/saml/metadata
    Reply URLhttps://<your-vpn-host>:10443/remote/saml/login
    Sign-out URLhttps://<your-vpn-host>:10443/remote/saml/logout

    Click I’ve done this.

The next step shows Trustaige’s own values. Open Need to enter values manually? to see them, and save the Signing certificate as a .pem file for the FortiGate.

Hub labelValue
Identity provider URLhttps://id.trustaige.com
Sign-in endpointhttps://id.trustaige.com/o/<your-org-id>/saml/sso
Sign-out endpointhttps://id.trustaige.com/o/<your-org-id>/saml/slo

Choose who can connect. On the app’s page, in the Access section, click Assign groups and choose the groups whose people use the VPN. These are the groups FortiGate receives.

2. Add Trustaige to the FortiGate

  1. Go to System → Certificates, click Import → Remote Certificate, and upload Trustaige’s signing certificate.
  2. Go to User & Authentication → Single Sign-On and click Create New. Under SP address, enter the same address and port as in the hub.
  3. For the identity provider, choose Custom and enter the Identity provider URL as the entity ID, the Sign-in endpoint as the single sign-on URL, the Sign-out endpoint as the single logout URL, and the certificate you imported.
  4. Under Additional SAML attributes, set the attribute that identifies users to username and the attribute that identifies groups to group. Both are case-sensitive.

The same server in the CLI, for port 10443 and a remote certificate named REMOTE_Cert_1:

config user saml
    edit "trustaige"
        set entity-id "https://<your-vpn-host>:10443/remote/saml/metadata"
        set single-sign-on-url "https://<your-vpn-host>:10443/remote/saml/login"
        set single-logout-url "https://<your-vpn-host>:10443/remote/saml/logout"
        set idp-entity-id "https://id.trustaige.com"
        set idp-single-sign-on-url "https://id.trustaige.com/o/<your-org-id>/saml/sso"
        set idp-single-logout-url "https://id.trustaige.com/o/<your-org-id>/saml/slo"
        set idp-cert "REMOTE_Cert_1"
        set user-name "username"
        set group-name "group"
        set digest-method sha256
    next
end
config user saml
    edit "trustaige"
        set entity-id "https://<your-vpn-host>:10443/remote/saml/metadata"
        set single-sign-on-url "https://<your-vpn-host>:10443/remote/saml/login"
        set single-logout-url "https://<your-vpn-host>:10443/remote/saml/logout"
        set idp-entity-id "https://id.trustaige.com"
        set idp-single-sign-on-url "https://id.trustaige.com/o/<your-org-id>/saml/sso"
        set idp-single-logout-url "https://id.trustaige.com/o/<your-org-id>/saml/slo"
        set idp-cert "REMOTE_Cert_1"
        set user-name "username"
        set group-name "group"
        set digest-method sha256
    next
end

3. Match Trustaige groups to user groups

Trustaige sends each assigned group the person belongs to, directly or through a parent group, in the group attribute: the group’s slug, or its name when it has none.

  1. Go to User & Authentication → User Groups and create a Firewall group.
  2. Under Remote Groups, add the trustaige server and enter the Trustaige group this user group stands for.
  3. Use the user group in the SSL VPN or IPsec policy.
config user group
    edit "vpn-staff"
        set member "trustaige"
        config match
            edit 1
                set server-name "trustaige"
                set group-name "vpn-staff"
            next
        end
    next
end

For IPsec IKEv2, also name the IKE SAML port and the SAML server on the interface that receives the connections, and use the user group in the phase 1 configuration:

config system global
    set auth-ike-saml-port 1001
end
config system interface
    edit "wan1"
        set ike-saml-server "trustaige"
    next
end
config user group
    edit "vpn-staff"
        set member "trustaige"
        config match
            edit 1
                set server-name "trustaige"
                set group-name "vpn-staff"
            next
        end
    next
end
config system global
    set auth-ike-saml-port 1001
end
config system interface
    edit "wan1"
        set ike-saml-server "trustaige"
    next
end

4. Turn on FortiClient’s external browser

In the FortiClient VPN connection, or the connection in your FortiClient EMS profile, turn on both:

  • Enable Single Sign On (SSO) for VPN Tunnel
  • Use external browser as user-agent for saml user authentication

FortiClient waits for the browser to hand the result back on a local port, 8020 by default, set by saml-redirect-port under config vpn ssl settings.

5. Test a connection

On a device with FortiClient, connect with single sign-on. The system browser opens your organization’s Trustaige sign-in; prove it’s you with your passkey, and FortiClient connects. Each sign-in appears in the hub’s Audit log.

Policies on the app apply to this sign-in like any other, device trust included, because it happens in the system browser.

What Trustaige sends

Name IDThe person’s email in your organization, format emailAddress
usernameThe person’s email in your organization
groupThe app’s assigned groups the person belongs to
SignaturesThe response and the assertion are both signed

Trustaige also sends uid, givenName, surname, displayName, roles and deviceId under their own names; FortiGate ignores them. To rename an attribute, open the app’s menu, choose Edit app, and change it under Attribute Mappings.

Troubleshooting

The sign-in window says passkeys aren't available

FortiClient is using its embedded browser. Turn on Use external browser as user-agent for saml user authentication in the connection, and check the FortiOS and FortiClient versions under Before you begin.

“no application is configured for this service provider”

The entity ID the FortiGate sends doesn’t match the app’s Application identifier. Compare them character for character, port included. To correct the hub’s side, open the app’s menu, choose Edit app, and change the Entity ID.

“failed to resolve ACS endpoint: requested ACS URL not registered”

The FortiGate’s single sign-on URL differs from the app’s Reply URL, often by the port. Make the two the same.

“Access denied: you are not assigned to this application”

The person isn’t in any group assigned to the app. Add them to one, or assign a group they’re in.

The person signs in, but FortiGate refuses the connection

No user group matched. Check that the group-name in the user group is the Trustaige group exactly as sent (its slug, or its name when it has none), and that the group is assigned to the app.