Legacy Knowledge Base
公開されました Jun. 30, 2025

CSRFトークンパラメータ「p_auth」の桁数を変更する方法

Written By

Shimada Taro

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.

問題

  • CSRFトークンパラメータ「p_auth」の桁数を変更できますか?

環境

  • DXP 7.0+

解決

  • 当該パラメータの桁数は以下のプロパティ(auth.token.length)で制御されており、変更が可能です。
    ただし、プロパティの説明にある通り、トークンが長くなるとパフォーマンス影響が起きる可能性があります。
    https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/portal.properties#L3744-L3750
  • 本パラメータはあくまでも認可トークンであり、認証状態でないと機能しません。
    セッションが切れる際や、ユーザがログアウトする際は、トークンが無効になります。
    また、過去のトークンを再利用しようとすると、認証エラーが発生します。

    認証後にしか機能しないパラメータである為、デフォルト設定でもセキュリティ上は特に影響しない認識です。
Did this article resolve your issue ?

Legacy Knowledge Base