FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
lvannstruth
Staff
Staff
Article Id 337214
Description

This article describes how to resolve invalid certificate errors seen on FortiClient when attempting to authenticate to an SSL VPN or IPsec VPN on a FortiGate with SAML authentication.

Scope

FortiOS.

Solution

When attempting to complete SAML authentication to a VPN on a FortiGate, an error may be displayed indicating the certificate in use is not trusted.

Example error from FortiClient connecting to an SSL VPN with SAML authentication:

 

lvannstruth_0-1724892873149.png

 

The steps to check/select which certificate is in use for the SAML authentication vary on whether an SSL VPN or an IPsec VPN is in use.

 

SSL VPN.

The certificate used by FortiGate for the SSL VPN will be the same certificate selected as the ‘Server Certificate’ for the SSL VPN. This can be checked on the GUI by going to ‘VPN’ -> ‘SSL-VPN Settings’ and checking the ‘Server Certificate’ field:


lvannstruth_2-1724892960515.png

 

This can be checked on the CLI using the command ‘show vpn ssl settings | grep servercert’.

 

lvannstruth_4-1724892982472.png

 

SSL VPN Resolution.

The server certificate can be set on the GUI under ‘VPN’ -> ‘SSL-VPN Settings’ as seen here:


lvannstruth_5-1724893009064.png

 

These CLI commands can also be used:


config vpn ssl settings

    set servercert <trusted-certificate>

end

 

IPsec VPN.

The certificate in use by FortiGate for SAML authentication on an IPsec VPN can be viewed by checking the ‘User & Authentication’ -> ‘Authentication Settings’ on the FortiGate GUI.

FortiGate user certificate visible on the GUI:

 

lvannstruth_6-1724893043426.png

 

Note:
The ‘Authentication Settings’ page under ‘User & Authentication’ may not be visible by default, it can be enabled on the GUI under ‘System’ -> ‘Feature Visibility’. Refer to this document for more information: Feature visibility.

 

This can also be checked on the FortiGate CLI by using the CLI command ‘show full user setting | grep auth-cert’.

 FortiGate authentication certificate visible on the CLI:

 

lvannstruth_7-1724893066506.png

 

IPsec VPN Resolution.

This can be set on the GUI on the previously shown ‘User & Authentication’ -> ‘Authentication Settings’ page.

Setting the correct certificate on the GUI:

 

lvannstruth_8-1724893066508.png

 

Or with these CLI commands:


config user setting

    set auth-cert <trusted-certificate>

end

 

Additional Notes:

  • The certificate specified under the SAML server configuration under ‘User & Authentication’ -> ‘Single Sign-On’ on the FortiGate GUI does not correspond to the certificate served in the authentication portal. This option specifies the SAML service provider certificate used by the FortiGate when communicating with the SAML identity provider and is not served to the client.
  • The certificate set under ‘User & Authentication' -> 'Authentication Settings' applies to all captive portals or other authentication configured on the FortiGate.
  • Certificate issues may still be observed during SAML authentication when FortiGate is unable to validate the certificate of the SAML identity provider. Refer to the following document for further information on troubleshooting SAML identity provider certificate issues: Technical Tip: Login issues with SAML IdP. 'Failed to verify signature' error in SAML Debug.
  • For additional information on TLS certificates, refer to this article: Troubleshooting Tip: A guide to FortiGate and certificate issues.