In this configuration, the FortiGate acts as a SAML service provider (SP) requesting authentication from PlusAuth, which acts as a SAML identity provider (IdP). The following shows the topology for this setup:
The authentication process is as follows in this deployment:
- The user initiates an SSL VPN request to the FortiGate.
- The FortiGate sends the browser POST redirect to FortiClient.
- FortiClient redirects the SAML authentication request to PlusAuth.
- The user authenticates with Okta using their credentials.
- PlusAuth sends a SAML assertion that contains the user and group authentication in a POST redirect to the SSL VPN login page.
- FortiClient sends the redirected PlusAuth request that contains the SAML assertion to the FortiGate.
- The FortiGate consumes the assertion and provides the user with access to resources based on the defined firewall security policy.
The example assumes that you already have a PlusAuth account. This example uses users locally defined within the PlusAuth and your plan allows SAML connections.
Configure PlusAuth for SSL VPN with FortiOS
- Log in to the PlusAuth dashboard as the registered user.
- Add the FortiGate application:
- Go to Clients and create a Regular Web App with any name by clicking Create button
- Go to Connectors tab from client details and click SAML2
- Configure SAML settings:
- In Entity ID field write down
https://<FortiGate IP address>:<port>/remote/saml/metadata/
. In this example, it ishttps://192.168.1.99:10443/remote/saml/metadata/
- In the Consumer Service URL enter
https://<FortiGate IP address>:<port>/remote/saml/login/
. In this example, it ishttps://192.168.1.99:10443/remote/saml/login/
- If you would like to use signed assertions upload or paste SP certificate explained in the table ove to the Signing Certificate field.
- Turn on Sign Out Enabled and enter
https://<FortiGate IP address>:<port>/remote/saml/logout/
to the Sign Out Url. In this example, it ishttps://192.168.1.99:10443/remote/saml/logout/
- In Entity ID field write down
- In User Object Mapping section make sure following SAML assertions exists:With this mapping we are ensuring assigned roles to user will be available to FortiGate under
groups
assertion. - Click to Save button to apply changes.
- Click to Metadata button and download the certificate.
- Create User and Role
Configure FortiGate
Upload the certificate downloaded from client metadata to FortiGate
Go To System > Certificates
Click to Create/Import > Remote Certificate
Upload the certificate and click to OK. The uploaded certificate name will be assigned automatically by Fortigate. In this example, it is
REMOTE_Cert_1
Configure the FortiGate SP to be a SAML user:
- Configure user group assertion on PlusAUth as part of the SAML assertion attributes. It is important that the group attribute value received is locally matched with the
group-name
value:
- Go to VPN > SSL-VPN Settings. Configure VPN settings as desired. In this example the port
10443
is used. If you wish to use different port, change the related configurations accordingly. When testing the VPN solution, starting with a web-based configuration, then moving to a tunnel-based configuration is recommended. Web-based testing can help in troubleshooting. - Go to Policy and Objects > Firewall Policies. Configure a policy as desired.
- Increase the global authentication timeout period to allow users to fill in their credentials in time. The default timeout is five seconds:
End Result
Troubleshooting Tips
Enable debugging for 'SAML'
To disable debug:
Enable debugging for 'SSL VPN':
To disable debug:
List current SSL VPN connections
Check SAML metadata