Fortinet white logo
Fortinet white logo

CLI Reference

system saml

system saml

Use this command to configure FortiMail to act as a SAML SSO service provider (SP).

Single sign-on (SSO) can save time by reducing how frequently people or services must log in when using many network services. Once they log in, they can access all other authorized services that use SSO until their session expires.

FortiMail supports SSO for HTTPS access to the webmail or personal quarantine and administrator GUI.

Tooltip

CalDAV and WebDAV authentication in FortiMail webmail currently do not support SSO.

In Security Assertion Markup Language (SAML) SSO, you must configure both of these to connect and authenticate with each other:

  • FortiMail, which is the service provider (SP)

  • FortiAuthenticator or other remote authentication server, which is the identity provider (IdP). See profile sso.

For details, see the FortiMail SAML SSO workflow.

Syntax

config system saml

set status {enable | disable}

set dynamic-ip-status {enable | disable}

set dynamic-ip {<client_ipv4/mask>,...}

set sp-entity-id "<entity-id_str>"

set hostname {<service_fqdn> | <service_ipv4>}

set second-sp-status {enable | disable}

set second-sp-entity-id <entity-id_str>

set second-hostname {<service_fqdn> | <service_ipv4>}

end

Variable

Description

Default

dynamic-ip-status {enable | disable}

Enable if the IdP uses dynamic client IP addresses, even within the same SAML session. (This can be useful, for example, if the IdP is deployed behind a load balancer.) Also configure dynamic-ip {<client_ipv4/mask>,...}.

disable

dynamic-ip {<client_ipv4/mask>,...}

Enter the IdP's client IP addresses or subnet.If no IP range is specified, then any IP address is allowed.

This setting applies only if dynamic-ip-status {enable | disable} is enable.

Caution

For better security, only allow IdP communications from known IP addresses.

hostname {<service_fqdn> | <service_ipv4>}

Enter the FQDN or IP address that is the base of the SP ACS URL. That URL is where the IdP will respond to authentication requests from FortiMail services.

This setting may be optional unless multiple FQDN or IP addresses exist for FortiMail or if SSO is enabled via the CLI. (When SSO is enabled via the administrative GUI and you click Apply, this setting is automatically populated using the address that is in your browser.)

This setting is used in the SP ACS URL for both the administrative GUI and webmail, unless second-sp-status {enable | disable} is enable. If so, for webmail you must configure second-hostname {<service_fqdn> | <service_ipv4>}.

Caution

This address must be globally DNS-resolvable and routable, including by FortiMail. Otherwise when you try to download the SP metadata, there is an error message: File does not exist or is invalid.

second-hostname {<service_fqdn> | <service_ipv4>}

Enter the FQDN or IP address that is the base of the SP ACS URL. This is where the IdP will respond to authentication requests from the FortiMail webmail or personal quarantine service.

This setting applies only if second-sp-status {enable | disable} is enable.

second-sp-entity-id <entity-id_str>

Enter the globally unique entity identifier for FortiMail webmail when it connects to the IdP, such as:

https://fortimail.example.com/sp2

This setting applies only if second-sp-status {enable | disable} is enable.

second-sp-status {enable | disable}

Enable if you want to configure a different SP ACS URL and metadata for the webmail and personal quarantine service. (This can be useful, for example, if the IdP needs to identify those services separately.) Also configure second-sp-entity-id <entity-id_str> etc.

disable

sp-entity-id "<entity-id_str>"

Enter the globally unique entity identifier used by the IdP to identify the FortiMail owner and SP, such as:

https://fortimail.example.com/sp

This setting may be optional, unless your IdP requires a specific name or format because it is the central control point for federated SPs, or if you have customized the SAML hostname {<service_fqdn> | <service_ipv4>} and want it to match.(When SSO is enabled, this setting is automatically populated using the values of hostname <host_str> and local-domain-name <domain-name_str>.)

This setting is used for both the administrative GUI and webmail or personal quarantine access, unless second-sp-status {enable | disable} is enable. If so, for webmail you must configure second-sp-entity-id <entity-id_str>.

Caution

The entity ID is not required to be resolvable by DNS. (The entity ID is a URI, not a URL.)

status {enable | disable}

Enable or disable SSO.

disable

Related topics

profile sso

system appearance

system saml

system saml

Use this command to configure FortiMail to act as a SAML SSO service provider (SP).

Single sign-on (SSO) can save time by reducing how frequently people or services must log in when using many network services. Once they log in, they can access all other authorized services that use SSO until their session expires.

FortiMail supports SSO for HTTPS access to the webmail or personal quarantine and administrator GUI.

Tooltip

CalDAV and WebDAV authentication in FortiMail webmail currently do not support SSO.

In Security Assertion Markup Language (SAML) SSO, you must configure both of these to connect and authenticate with each other:

  • FortiMail, which is the service provider (SP)

  • FortiAuthenticator or other remote authentication server, which is the identity provider (IdP). See profile sso.

For details, see the FortiMail SAML SSO workflow.

Syntax

config system saml

set status {enable | disable}

set dynamic-ip-status {enable | disable}

set dynamic-ip {<client_ipv4/mask>,...}

set sp-entity-id "<entity-id_str>"

set hostname {<service_fqdn> | <service_ipv4>}

set second-sp-status {enable | disable}

set second-sp-entity-id <entity-id_str>

set second-hostname {<service_fqdn> | <service_ipv4>}

end

Variable

Description

Default

dynamic-ip-status {enable | disable}

Enable if the IdP uses dynamic client IP addresses, even within the same SAML session. (This can be useful, for example, if the IdP is deployed behind a load balancer.) Also configure dynamic-ip {<client_ipv4/mask>,...}.

disable

dynamic-ip {<client_ipv4/mask>,...}

Enter the IdP's client IP addresses or subnet.If no IP range is specified, then any IP address is allowed.

This setting applies only if dynamic-ip-status {enable | disable} is enable.

Caution

For better security, only allow IdP communications from known IP addresses.

hostname {<service_fqdn> | <service_ipv4>}

Enter the FQDN or IP address that is the base of the SP ACS URL. That URL is where the IdP will respond to authentication requests from FortiMail services.

This setting may be optional unless multiple FQDN or IP addresses exist for FortiMail or if SSO is enabled via the CLI. (When SSO is enabled via the administrative GUI and you click Apply, this setting is automatically populated using the address that is in your browser.)

This setting is used in the SP ACS URL for both the administrative GUI and webmail, unless second-sp-status {enable | disable} is enable. If so, for webmail you must configure second-hostname {<service_fqdn> | <service_ipv4>}.

Caution

This address must be globally DNS-resolvable and routable, including by FortiMail. Otherwise when you try to download the SP metadata, there is an error message: File does not exist or is invalid.

second-hostname {<service_fqdn> | <service_ipv4>}

Enter the FQDN or IP address that is the base of the SP ACS URL. This is where the IdP will respond to authentication requests from the FortiMail webmail or personal quarantine service.

This setting applies only if second-sp-status {enable | disable} is enable.

second-sp-entity-id <entity-id_str>

Enter the globally unique entity identifier for FortiMail webmail when it connects to the IdP, such as:

https://fortimail.example.com/sp2

This setting applies only if second-sp-status {enable | disable} is enable.

second-sp-status {enable | disable}

Enable if you want to configure a different SP ACS URL and metadata for the webmail and personal quarantine service. (This can be useful, for example, if the IdP needs to identify those services separately.) Also configure second-sp-entity-id <entity-id_str> etc.

disable

sp-entity-id "<entity-id_str>"

Enter the globally unique entity identifier used by the IdP to identify the FortiMail owner and SP, such as:

https://fortimail.example.com/sp

This setting may be optional, unless your IdP requires a specific name or format because it is the central control point for federated SPs, or if you have customized the SAML hostname {<service_fqdn> | <service_ipv4>} and want it to match.(When SSO is enabled, this setting is automatically populated using the values of hostname <host_str> and local-domain-name <domain-name_str>.)

This setting is used for both the administrative GUI and webmail or personal quarantine access, unless second-sp-status {enable | disable} is enable. If so, for webmail you must configure second-sp-entity-id <entity-id_str>.

Caution

The entity ID is not required to be resolvable by DNS. (The entity ID is a URI, not a URL.)

status {enable | disable}

Enable or disable SSO.

disable

Related topics

profile sso

system appearance