Legacy Knowledge Base
Published Jun. 30, 2025

How to change the number of digits in the CSRF token parameter "p_auth

Written By

Shimada Taro

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

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

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

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

Issue

  • Can I change the number of digits in the CSRF token parameter "p_auth"?

Environment

  • DXP 7.0+

solution

  • The number of digits of the relevant parameter is controlled by the following property, which can be changed.
    However, as described in the property description, performance effects may occur as tokens become longer.
    https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/portal.properties#L3779-L3785
  • This parameter is only aauthorizedtoken and will not function withoutauthentication status.
    The token is invalidated when the session expires or when the user logs out.
    Also, attempts to reuse past tokens will result in an authentication error.

    Since this parameter only works after authentication, it is recognized that the default setting has no particular effect on security.
Did this article resolve your issue ?

Legacy Knowledge Base