How to Prevent Password Autocompletion in Confluence

Still need help?

The Atlassian Community is here for you.

Ask the community

The following browsers have removed support for the use of autocomplete="off"

  • Apple Safari 6.1.6 (OS X 10.7)
  • Google Chrome 41+
  • Microsoft Edge
  • Microsoft Internet Explorer 11+
  • Mozilla Firefox 30+

As this is a design choice made by the browser's authors, there is no current work around available. We have a suggestion in place to have an option to autocomplete the username and password from the front end.

CONFSERVER-54157 - Getting issue details... STATUS

If you are using Google chrome to access Confluence then you can use Fill out forms automatically.

and if you are using Firefox then you refer to the page Control whether Firefox automatically fills in forms


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

The content on this page includes steps to customize or extend Atlassian software (adding/changing CSS rules, HTML, JavaScript, etc.). Per the Atlassian Support Offerings, support does not include customizations made to Atlassian products. Be aware that this material is provided for your information only and using it is done so at your risk.

If you have any questions about this or any customization, please ask the community at Atlassian Answers or consider working with an Atlassian Solution Partner.

Purpose

Some organizations have security requirements that require the AutoComplete attribute to be set to "off" for Usernames and Passwords in form based authentication. Confluence does not prevent autocompletion by default, and you will need to alter the login form in order to alter this behavior.

Solution

With a few modifications, the autocomplete=off attribute can be set for both the username and password fields. You will need to alter the page for the user login form in order to accomplish setting the autocomplete to off.

Password.vm

  1. Edit <CONFLUENCE_INSTALL>/confluence/template/aui/password.vm
  2. Find the line

    <input type="password" name="$!webwork.htmlEncode($parameters.name)" id="$!webwork.htmlEncode($parameters.id)" ##

    And modify it to

    <input type="password" autocomplete="off" name="$!webwork.htmlEncode($parameters.name)" id="$!webwork.htmlEncode($parameters.id)" ##
  3. Save the file, shut down and restart Confluence
  4. Test your changes

This solution was tested in Confluence 5.x and 6.x. Future versions may change the files and form.



Last modified on Dec 16, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.