SameSite cookie attribute
SameSite cookie attribute. By complying with Google Chrome’s new SameSite policy, the NetScaler appliance can manage third-party cookies with the SameSite attribute set in the set-cookie header. The cookie setting mitigates attacks and provides a secured web communication.
SameSite attribute was not explicitly set in the cookie. The browser took the default value as “None.” However, with certain browser upgrade, such as Google Chrome 80, there is a change in the default cross-domain behavior in cookies.
Setting cookie attribute value
SameSite attribute is set to one of the following values and for the Google Chrome browser, the default value is set as “Lax.”
SameSite attribute and if the addcookiesamesite attribute flag is enabled in the Web Application Firewall profile, then the SameSite attribute is overwritten according to the value configured in the profile.
Configure the SameSite attribute in the Web App Firewall profile by using the CLI
SameSite attribute, you must complete the following steps:
-
Enable the
SameSitecookie attribute. -
Set the cookie attribute for the appfw session cookies.
Enable the `Samesite' cookie attribute
set appfw profile <profile-name> –insertCookieSameSiteAttribute ( ON | OFF)
set appfw profile p1 –insertCookieSameSiteAttribute ON
Set same site cookie attribute value for Web Application Firewall session cookies
set appfw profile <profile-name> – cookieSameSiteAttribute ( LAX | NONE | STRICT )
set appfw profile p1 – cookieSameSiteAttribute LAX
Configure the SameSite cookie attribute in the Web App Firewall profile by using the GUI
-
Navigate to Security > NetScaler Web App Firewall > Profiles.
-
In the details pane, select a profile and click Edit.
-
In the NetScaler Web App Firewall Profile page, click Profile Settings under Advanced Settings.
-
In Profile Settings section set the following parameters:a. Insert the cookie
Samesiteattribute. Select the check box to enable the cookieSamesiteattribute. b. Cookie Samesite Attribute. Select an option from the drop-down list to set theSamesitecookie value. -
Click OK and Done.