Legacy Knowledge Base
Published Jun. 30, 2025

Liferay accepts only fully signed SAML responses. Can this requirement be turned off?

Written By

Peter Nyiro

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • From a security standpoint, it's a best practice to sign the Response. However, we can switch off this requirement in our other apps.
  • I can understand that Liferay by default requires the complete signature of the response, but could this be turned off somehow?

Environment

  • DXP 7.3+

Resolution

  • The SAML standard states signature verification to be a MUST for SAML bindings that involve the browser. Liferay uses the HTTP Post binding for SSO, which falls into this category.
  • So it comes down to trusting all the users on the private network and the security of their workstation, to prevent malicious capture and reply of SAML messages.
  • If this risk is acceptable, the SAML code can be changed.
    We can't recommend or support this method due to security reasons.

    In WebSsoProfileImpl, change in method "doProcessResponse" 
    from
    MessageContext messageContext = decodeSamlMessage( 
    httpServletRequest, httpServletResponse, 
    getSamlBinding(SAMLConstants.SAML2_POST_BINDING_URI), true);
    to
    MessageContext messageContext = decodeSamlMessage( 
    httpServletRequest, httpServletResponse, 
    getSamlBinding(SAMLConstants.SAML2_POST_BINDING_URI), false);
Did this article resolve your issue ?

Legacy Knowledge Base