legacy-knowledge-base
公開されました Jul. 2, 2025

Liferay Experience Cloud Self-Managed上でjsonws APIにアクセスできない。

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

learn-legacy-article-disclaimer-text

問題

  • Liferay Experience Cloud Self-Managed(LXC-SM)で、WebserverレベルでBasic Authを有効にしてjsonws APIにアクセスしようとすると、以下のエラーが発生します:
    "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

解決策

  • ユーザーは、WebサーバーレベルからBasic Authを削除する必要があります。
  • これを削除するには、git リポジトリの webserver/configs/{env}/conf.d/liferay.conf にアクセスし、auth_basic というプレフィックスがついた行をコメントアウトする必要があります。
  • 例:
    #auth_basic "Authentication Required";
    #auth_basic_user_file /var/www/html/.htpasswd;

追加情報

  • LiferayはnginxレベルでBasic Authを提供するので、標準的なtest@liferay.com の認証情報はユーザーのLiferayの管理アカウントになります。 Basic Authは、Liferayのデフォルトの認証情報を知っている人が、非Prod環境を発見して管理者としてログインし、ちょっとした破壊行為をするのを防ぎます。
  • ユーザーが初めてLiferayにログインしたら、Adminの認証情報を変更し、nginxレベルからBasic Authを削除する必要があります。
did-this-article-resolve-your-issue

legacy-knowledge-base