Technical Tip: PKI user with two factor authentication for SSL VPN
Description
This article describes how to authenticate PKI users on FortiGate via SSL VPN using two-factor authentication with a certificate.
The existing SSLVPN policies need to be adapted in case new groups are added in this setup.
In general, a CA certificate is needed which sign user certificates that the users can use to authenticate themselves against other entities.
Those client certificates will also be used in this article.
Scope
FortiGate.
Solution
- Set up the PKI for this first.
- Import the user's CA Certificate to the FortiGate by going to System -> Certificate -> Import CA Certificate (.crt).
- Import the user's certificate signed by the trusted CA with private key and certificate (BOTH are required!) to the client: either on the browser's Privacy & Security section or the Windows 'Certificate Store' to be accessed by other applications as the FortiClient.
- Private key and certificate file can either be in a bundled file as PKCS#12 file (.p12) or as separate .cer/.crt and .key file.
From the GUI, under SSL VPN settings.

Note:

Authenticate the remote user, using FortiClient (PKI user with password and certificate):


diagnose debug application sslvpn -1
diagnose debug enable
…
2020-05-06 10:13:28 [1250] __fnbamd_build_cert_chain-Chain is complete.
…
2020-05-06 10:13:28 [1460] peer_subject_cn_check-Cert subject 'CN = student'
…
2020-05-06 10:13:28 local auth is done with user 'pki_user', ret=0
Note:
SSL VPN certificate matching is handled by the fnbamd daemon, which uses the settings defined under 'config vpn certificate setting', specifically 'subject-match' and 'cn-match' to perform validation.
Related articles:
Technical Tip: PKI peer user creation for certificate authentication
