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.
Shivasagar
Staff
Staff
Article Id 218602
Description

 

This article describes how to authenticate users with SAML before allowing traffic.

 

Solution

 

Azure AD as SAML IDP is used in this scenario. Any SAML IDP will work by changing the IDP URLs. 

 

Configuration for FortiGate[SP]:

 

Creating SAML SP config.


# config user saml
     edit "AAD-Captive"
          set entity-id "https://LAN-IP:1003/saml/metadata"
          set single-sign-on-url "https://LAN-IP:1003/saml/login/"
          set single-logout-url "https://LAN-IP:1003/saml/logout/"
          set idp-entity-id "Copy from Azure portal"
          set idp-single-sign-on-url "Copy from Azure portal"
          set idp-single-logout-url "Copy from Azure portal"
          set idp-cert "Download from Azure portal"
          set user-name "username"
          set group-name "groups"
          set digest-method sha256
     next
end


Creating SAML group to be used in the firewall policy.


# config user group
     edit "AAD-Captive-Grp"
          set member "AAD-Captive"
          config match
               edit 1
                    set server-name "AAD-Captive"
                    set group-name "group-name-sent-by-idp"
               next
          end
     next
end

 

Note.

Modify group name accordingly or remove the matching if all SAML authenticated users should be allowed to log in.

 

Calling the SAML group in the firewall policy. 

There Should be a rule on top to allow DNS/Azure traffic which is required for authentication.


Port1 is for LAN, and Port2&3 are for WAN.

 

Shivasagar_0-1658916379833.png

 

Configuration for Azure[IDP]:

ID/Login/Logout of FortiGate[SP].

 

SAML1.png

Attribute for Username and Group.

 

SAML2.png

 

Certificate to be used on FortiGate. Use the Base64 format.


SAML3.png

 

ID/Login/Logout URL of IDP.

 

SAML4.png
Note:

Captive portal need not be enabled on the interface to trigger authentication.

Authentication would be triggered based on the groups called in the policy.

Contributors