Technical Tip: How to add X-Authenticated-User header in Site Publish rule
Description
This article describes how to add the X-Authenticated-User header in the Site Publish rule if the user is authenticated.
Scope
FortiWeb and FortiWeb VM.
Solution
FortiWeb uses HTTP headers, including X-Authenticated-User, to manage user authentication. It is used to pass the authenticated username from an upstream authentication server to the downstream server/services.
To add this header, navigate to Application Delivery > Site-Publish > Site Publish Rule.
Create a new rule, fill in all the information, enable the Append Custom Header, and select OK.
 After that, there will be a new Pan below to add a Custom-Header.

Â
To perform this via CLI, enter the commands below:
config waf site-publish-helper rule
edit "NeWps"
set published-site www
set auth-server-pool "Radius server"
set path /
set alert-type success
set append-custom-header enable
config custom-headers
edit 1
set custom-header-name X-Authenticated-User
set custom-header-value-format xxx-USERNAME-xxx
next
end
next
end