Legacy Knowledge Base
Published Jul. 2, 2025

Unable to access jsonws API over Liferay PaaS

Written By

Anishq Sharma

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.
Note: please note that Liferay has renamed its Liferay Experience Could offerings to Liferay SaaS (formerly LXC) and Liferay PaaS (formerly LXC-SM).

Issue

  • User gets below error while trying to access jsonws API over Liferay PaaS with Basic Auth enabled at Webserver level:
    "error": {
    "message": "Access denied to xxxx",
    "type": "java.lang.SecurityException"
    }

Environment

  • Liferay DXP 7.0
  • Liferay DXP 7.1
  • Liferay DXP 7.2
  • Liferay DXP 7.3

Resolution

  • User needs to remove Basic Auth from Webserver level.
  • In order to remove it, user needs to navigate at webserver/configs/{env}/conf.d/liferay.conf in the git repository and comment out the lines with the auth_basic prefix.
  • Example :
    #auth_basic "Authentication Required";
    #auth_basic_user_file /var/www/html/.htpasswd;

Additional Information

  • Liferay provides Basic Auth at nginx level so the standard test@liferay.com credentials will be user's Liferay admin account. The Basic Auth prevents someone with knowledge of the default Liferay credentials from discovering the non-prod environments and logging in as an administrator to wreak a little havoc.
  • Once user logged into Liferay for the first time, Admin credentials should be modified and Basic Auth should then be removed from the nginx level.
Did this article resolve your issue ?

Legacy Knowledge Base