How to disable the 'Remember Me' feature in Confluence

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

Code Changes Required

This configuration requires changing the Confluence code in your installation. You will need to reapply these changes whenever you upgrade Confluence. Proceed with caution.

目的

The Confluence Administration Console does not provide an option for disabling the 'Remember Me' feature. If you like, you can vote for and comment on the request to provide this ability: CONF-10383.

As a workaround, you can modify the Velocity file login.vm as described below. This modification simply removes the 'Remember Me' checkbox from the web page.

ソリューション

Confluence Single Node

The steps required are as follows:

  1. Confluence を停止します。
  2. Go to your Confluence installation directory
  3. Locate the <CONFLUENCE-INSTALLATION>/confluence/login.vm file and make a backup copy
  4. Edit the file
  5. Locate the following line of code:

    #bodytag( "Component" "label='remember.accesskey'" "name='os_cookie'" "value='false'" "theme='aui'" 
    "template='onofflist.vm'" "tabindex='4'") #end
    

    Comment out the line so that it looks like this (note the extra '#' character in front):

    ##bodytag( "Component" "label='remember.accesskey'" "name='os_cookie'" "value='false'" "theme='aui'" 
    "template='onofflist.vm'" "tabindex='4'") #end
    
  6. Locate another, similar line of code:

    #bodytag( "Component" "label='remember.accesskey'" "name='os_cookie'" "value='false'" "theme='aui'" 
    "template='onofflist.vm'") #end
    

    Comment out the line so that it looks like this:

    ##bodytag( "Component" "label='remember.accesskey'" "name='os_cookie'" "value='false'" "theme='aui'" 
    "template='onofflist.vm'") #end
    
  7. Save the file and restart Confluence
  8. Repeat the above steps each time you install a new version of Confluence

 

Confluence Data Center

In Confluence Data Center, we enforce the Remember Me setting silently in order to account for inconsistencies in the session affinity between the nodes.

If you want to change the default behavior, you will need to change the default value for this variable. Here's how you can do it:

  1. Confluence を停止します。
  2. Go to Confluence installation directory
  3. Locate the <CONFLUENCE-INSTALLATION>/confluence/login.vm file and make a backup copy
  4. Edit the file
  5. Locate the following section of code:

    #if ($action.shouldRememberMeCheckboxBeOmitted())
        <input type="hidden" name="os_cookie" value="true"/>
    #else	
  6. Modify the above code as follows

    #if ($action.shouldRememberMeCheckboxBeOmitted())
        <input type="hidden" name="os_cookie" value="false"/>
    #else	
  7. Save the file and restart Confluence

  8. Repeat the above steps each time you install a new version of Confluence

 

Verify the Fix

In order to verify if your changes were applied, you will need to do the following:

  1. Logout of your current session
  2. After you open Confluence and login, check your browser cookies
  3. You should NOT see any cookie with the name: seraph.confluence

 



最終更新日 2017 年 9 月 29 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.