Changing the duration of the remember me cookies

When a user selects the Remember my login on this computer option, the user will not need to re-enter their credentials again from the same browser, unless they are explicitly logged out. In addition, by default, this feature lasts for 30 days.

In this recipe, we will look at how to change the duration and extend it to the maximum extent possible.

Getting ready

Since we will be making direct changes to a JIRA system file, make sure you create backups for any files you modify. This recipe will also require a restart of JIRA, so plan this during a time slot that will not affect your users.

How to do it…

Proceed with the following steps to change the remember me cookie duration:

  1. Open the seraph-config.xml file from the <JIRA_INSTALL>/atlassian-jira/WEB-INF/classes directory in a text editor.
  2. Locate the following lines and change the value of param-value to the desired number in seconds:
    <init-param>
        <param-name>autologin.cookie.age</param-name>
        <param-value>1209600</param-value>
    </init-param>
  3. Restart JIRA for the changes to apply.

How it works…

JIRA uses the Seraph framework (https://docs.atlassian.com/atlassian-seraph/latest) to manage its HTTP session cookies. When the Remember me option is checked, it will create a seraph.rememberme.cookie.

The seraph-config.xml file is used to configure the Seraph framework and the autologin.cookie.age parameter is used to set the maximum age for the cookie.

See also

Refer to the Changing the default session timeout recipe on how to change the default session timeout setting.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset