Documentation for Confluence 2.5.4 - 2.5.8.
Documentation for [Confluence Cloud] and the latest Confluence Server is available too.

This version of the document applies to Confluence 1.0 and earlier. Users of Confluence 1.0.1 and later should refer to this document instead.

This article will help you set up Confluence to re-use your existing JIRA user base. The examples assume you are running Confluence under Tomcat 4.1.x and your JIRA database is running under Postgres, but the same concepts (but not the verbatim examples) can be applied to other application-servers or databases.

Please note that this feature will not work if you are using JIRA with the embedded HSQL database. That is, this will not work if you are running JIRA standalone against the default database out of the box. However, it does not matter which database you are using for Confluence.

Step 1 - Run through standard setup process

  • Install Confluence as per normal.
  • Ensure you do not add any spaces or content once the setup is complete.

Note: the admin user account will no longer be valid once you switch over to using your JIRA user base. Therefore you should avoid adding any content with this account.

Step 2 - Set up datasource to JIRA user base

  • Open up server.xml located in the conf folder.

    If you have already set up JIRA to run against Tomcat, then all you have to do is cut and paste the datasource information you entered for JIRA into Confluence's <context>.

  • Locate your confluence context statement which should look similar to the following:
    <Context path="/confluence" docBase="[OMMITTED]" debug="0" reloadable="true">
        <Logger className="org.apache.catalina.logger.FileLogger" prefix="atlassian-confluence." suffix=".log" timestamp="true"/></Context>
    
    and insert the following block of code after the <Logger className . . . timestamp="true'/> statement.
    <Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/JiraDS">                        
    <parameter>
        <name>username</name>
        <value>postgres</value>
    </parameter>
    <parameter>
        <name>password</name>
        <value>postgres</value>
    </parameter>                        
    <parameter>
        <name>driverClassName</name>
        <value>org.postgresql.Driver</value>
    </parameter>
    <parameter>
        <name>url</name>
        <value>jdbc:postgresql://your.domain.com/jira_database_name</value>
    </parameter>
    </ResourceParams>
    

You will need to change the sample values given above to suit your installation.

Step 3 - Install JDBC driver in Tomcat

  • Download a postgres JDBC driver from here
  • Copy the jar file into the /common/lib folder

Step 4 - Modify osuser.xml

  • Find this file in the /confluence/WEB-INF/classes folder and open in a text editor
  • Comment out the following block of code:
    <provider class="com.atlassian.confluence.user.providers.ConfluenceCredentialsProvider">
        <property name="configuration.provider.class">
            com.atlassian.confluence.user.ConfluenceHibernateConfigProvider
        </property>
    </provider>
    <provider class="com.atlassian.confluence.user.providers.ConfluenceAccessProvider">
        <property name="configuration.provider.class">
            com.atlassian.confluence.user.ConfluenceHibernateConfigProvider
        </property>
    </provider>
    <provider class="com.atlassian.confluence.user.providers.ConfluenceProfileProvider">
        <property name="configuration.provider.class">
            com.atlassian.confluence.user.ConfluenceHibernateConfigProvider
        </property>
    </provider>
    
  • Uncomment this block:
    <provider class="com.atlassian.confluence.user.providers.jira.JiraJdbcCredentialsProvider">
        <property name="datasource">java:comp/env/jdbc/JiraDS</property>
    </provider>
    <provider class="com.atlassian.confluence.user.providers.jira.JiraJdbcAccessProvider">
        <property name="datasource">java:comp/env/jdbc/JiraDS</property>
    </provider>
    <provider class="com.atlassian.confluence.user.providers.jira.JiraJdbcProfileProvider">
        <property name="datasource">java:comp/env/jdbc/JiraDS</property>
        <property name="configuration.provider.class">
            com.atlassian.confluence.user.ConfluenceHibernateConfigProvider
        </property>
    </provider>
    
  • Replace the datasource property with the datasource you set up in step 2.

Step 5 - Create Confluence Groups in JIRA

  • Add confluence-users and confluence-administrators groups in JIRA
  • Add yourself to both these groups.

To give your existing JIRA users access to Confluence, you have two options.

  1. Manually edit the groups of these users inside JIRA and give them membership to one or both of these confluence groups OR
  2. Restart Confluence. Log in using your JIRA account, and go to Administration and then Global Permissions. Now add USE permission to your desired JIRA groups.

In order to use Confluence, users must be a member of the confluence-users group (or have confluence USE permission).

Step 6 - Activating External User Management

Finally, since user management is now conducted in JIRA and outside of Confluence, you will need to switch external user management on.

Activating external user management will remove user and group management options from Confluence. Your users will also no longer be able to edit their full name or email address inside Confluence (if they want to, they would have to do so in JIRA). To do this:

  • Log into Confluence using your JIRA account
  • Goto Administration and then General Configuration
  • Click the edit button to edit the defaults
  • Switch External User Management ON
  • ラベルなし