Description | This article describes the setting 'set policy-match-deep-inspect' in web proxy configuration, which gives an option to enable/disable application-level policy match in the presence of deep inspection SSL security profile |
Scope | FortiGate v7.2.9 and above |
Solution |
Starting from v7.2.1 GA, a feature has been added to FortiGate (when web proxy is configured) which implicitly enforces deep inspection when HTTP CONNECT request or TLS SNI partially matches to a policy. When the HTTP CONNECT request or TLS SNI of an HTTPS session partially matches a policy with deep inspection enabled, it indicates deep inspection is needed to match the encrypted HTTP request against the policy.
In this use case, the feature is expected to implicitly enforce deep inspection of the policy to the HTTPS traffic so that it simplifies the policy definition for these cases by avoiding one more policy to handle HTTP CONNECT request or TLS SNI.
As a result, when handling HTTP-CONNECT or HTTPS-TLS SNI, in the presence of only hostname, FortiGate does partially policy match, if the partially proxy-address matches successfully, and the current policy indicates deep inspection without ssl-exempt, the feature will pause on current policy, and enforce deep ssl inspection to get full proxy-address info to rematch/verify this policy.
To understand the behavior better, see below example: There is a FortiGate with explicit proxy enabled and a proxy address with type category (external-address) referenced in a policy (name: full-inspection)with a ssl-ssh-profile, which has deep SSL inspection enabled. Policy 'full-inspection' is located at the top of another policy (name: no-inspection) which doesn't have any SSL inspection profile assigned to it.
config firewall proxy-address edit "external-address" set type category next end
config firewall proxy-policy edit 3 edit 4 end
To do policy matching, FortiGate goes through policies based on the order that is configured. When policy 3 (full-inspection) is evaluated, the request is in CONNECT state, the URL matches the host part of proxy-adress, and FortiGate assumes it could be a potential match. So it does a deep-inspection for HTTPS traffic, and resumes the policy match after the deep-scanning of HTTPS.
This means even traffic that matches policy 4 (no-inspection) will still go through deep SSL inspection. Starting from v7.2.9, there is an option to enable/disable application-level policy match for deep inspection for legacy config based on old policy match logic (by default it is enabled):
config web-proxy global
If this behavior is not requested, it is possible to change the order of the policy (for instance in the above example make sure policy 4 is above policy 3) or disable 'policy-category-deep-inspect'. |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.