Issue
- In 7.4, iframe does not show signed in session of a separate 7.4 portal
Environment
- 7.4
Resolution
- The iFrame is working as expected in that the portal is rendered within the frame and the cookies are available to the browser tab. However, since the “sameSite” flag is not set to
none
, and theSecure
flag is not set, then the portal ignores any cookies outside of the current domain, resulting in the current behavior. To resolve this, do the following: - Make sure all cookies use
sameSite=None
andSecure = true
. As an example, this can be done in Tomcat by adding the following to conf/web.xml:<session-config>
<cookie-config>
<secure>true</secure>
</cookie-config>
...
and this to conf/context.xml:<CookieProcessor sameSiteCookies="none"/>
- Enable HTTPS support in the portal
- Alternatively, if Liferay is fronted by a web server such as NGINX or Apache, the same cookies settings could be applied there instead. Please refer to your webserver documentation for more details.
-
- For example, in NGINX the following could be used in a location directive.
proxy_cookie_path / "/; HTTPOnly; Secure; SameSite=none";
- For example, in NGINX the following could be used in a location directive.