Description
This article describes how to set up both OKTA and FortiGate for SAML SSO for web mode SSL VPN with FortiGate acting as SP.
Scope
FortiGate.
Solution
Configuring the OKTA developer account IDP application:
Example.
Select 'Download OKTA Certificate'. This will be imported to the FortiGate later.
Note:
Configuring the FortiGate for SSL VPN and as SP.
config user saml
edit "oka-saml-vpn"
set cert "Fortinet_Factory"
set entity-id https://x.x.x.x:8443/remote/saml/metadata <----- Same as set up on OKTA.
set single-sign-on-url https://x.x.x.x:8443/remote/saml/login <----- Same as setup on OKTA.
set single-logout-url https://x.x.x.x:8443/remote/saml/logout <----- Same as setup on OKTA.
set idp-entity-id http://www.okta.com/exkqd4u2jRYahxjUr4x6 <----- Available under 'setup instructions' (step 10 on OKTA).
set idp-single-sign-on-url https://dev-760674.okta.com/app/fortinetdev760674_samlfgt_2/exkqd4u2jRYahxjUr4x6/sso/saml <----- Available under 'setup instructions' (step 10 on OKTA).
set idp-single-logout-url "https://dev-760674.okta.com/app/fortinetdev760674_samlfgt_2/exkqd4u2jRYahxjUr4x6/slo/saml"
set idp-cert "REMOTE_Cert_1"
set user-name "FirstName" <----- The parameter to map as username. In this case, it is FirstName.
next
end3
config user group
edit "ssl-saml-ngrp"
set member "oka-saml-vpn"
end
next4) Complete the SSL VPN configuration.
config vpn ssl settings
set servercert "self-sign"
set tunnel-ip-pools "SSLVPN_TUNNEL_ADDR1"
set tunnel-ipv6-pools "SSLVPN_TUNNEL_IPv6_ADDR1"
set port 8443
set source-interface "port1"
set source-address "all"
set source-address6 "all"
set default-portal "web-access"
config authentication-rule
edit 1
set groups "ssl-saml-ngrp"
set portal "web-access"
next
end
end
config firewall policy
edit 1
set name "samltest"
set srcintf "ssl.root"
set dstintf "port2"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set logtraffic all
set groups "ssl-saml-ngrp"
set nat enable
next
Testing SSL VPN.
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.