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.
Debbie_FTNT
Staff
Staff
Article Id 374809
Description

 

This article explains SAML authentication basics in an easily understood manner.

 

Scope

 

FortiGate, FortiProxy, FortiAuthenticator.

 

Solution

 

SAML (Security Assertion Markup Language) is an XML-based standard, developed to exchange authentication and authorization data between an Identity Provider (commonly abbreviated IdP) and a Service Provider (commonly abbreviated SP).

 

A Service Provider may for example be a VPN gateway, firewall, or web application requiring the user to be authenticated.

An Identity Provider is an authentication server; this may be FortiAuthenticator, Google, Entra ID, Okta, or similar.

 

A unique feature of SAML is that the user authenticates to the Identity Provider directly, and the user’s credentials do not pass through the service/application/gateway the user is authenticating to. Authentication typically happens in a browser.

 

There are two authentication flows:

  • SP-initiated: The user connects to the Service Provider, like a VPN tunnel, and the Service Provider directs to the Identity Provider for authentication. This is a more common use case.
  • IdP-initiated: The user connects to the Identity Provider, and after authentication, is directed to (or able to choose a) Service Provider (like a website or specific application).

 

This article focuses on SP-initiated authentication.

 

SAML functions broadly as follows:

 

  1. The user accesses the Service Provider (via FortiClient, browser, third-party web applications, etc.).


saml_panel1.PNG

 

  1. The Service Provider points the user (client application) to Identity Provider.


saml_panel2.PNG

 

  1. The Identity Provider asks for user and Service Provider details.


saml_panel3.PNG

Note:

The Identity Provider needs to know which Service Provider redirected the user, to ensure only valid requests from known Service Providers are handled.

 

  1. The user (client application) provides credentials and other relevant information to the Service Provider.


saml_panel4.PNG

Note:

The credentials are not sent via SAML itself but entered into a website hosted by the Identity Provider. If the connecting client is not a browser (for example FortiClient), then the client application will launch an inbuilt or external browser window to submit the credentials.

 

  1. The Identity Provider processes credentials and looks up other relevant information, like group memberships, second-factor authentication, etc.


saml_panel5.PNG

 

  1. The Identity Provider accepts credentials, generates a SAML response that includes details about the Identity Provider, and assigns a cookie.


saml_panel6.PNG

 

Note:

The cookie is stored in the browser and used if a Service Provider redirects to the Identity Provider again. Instead of having to authenticate again, the user (client application) presents the cookie, and the Identity Provider behaves the same as if authentication was successful. The cookie will usually have a valid duration of a few hours only.

 

  1. The user (client application) presents the SAML response to the Service Provider.


saml_panel7.PNG

 

  1. If everything is in order (correct group memberships, for example), the Service Provider accepts the user.


saml_panel8.PNG

 

Related documents:

Fortinet Cyberglossary: Security Assertion Markup Language (SAML)

FortiAuthenticator Documentation: SAML IdP

Technical Tip: Configuring SAML SSO login for FortiGate administrators with Entra ID acting as SAML ...

FortiGate Documentation: Configuring SAML SSO login for SSL VPN with Entra ID acting as SAML IdP

Troubleshooting Tip: How to troubleshoot SAML authentication

FortiGate Documentation: ZTNA proxy access with SAML authentication example

Technical Tip: FortiGate SAML authentication resource list

Comments
iskandar_lie
Staff
Staff

well explained in a fun way