Documentation for Crowd 2.5. Documentation for other versions of Crowd is available too.
This is an alternate step to "Step 2" defined in Integrating Crowd with Atlassian Confluence for users wanting to integrate Crowd with Confluence 3.4 or earlier.
Confluence needs Crowd's client library and configuration file in order to be able to delegate user authentication to the Crowd application. As stated earlier, we will modify the Confluence application by editing the application, which is an exploded WAR stored in CONFLUENCE/confluence
.
Copy the Crowd client library and configuration file to Confluence:
Copy From | Copy To |
---|---|
CROWD/client/crowd-integration-client-X.X.X.jar | CONFLUENCE/confluence/WEB-INF/lib |
CROWD/client/conf/crowd.properties | CONFLUENCE/confluence/WEB-INF/classes |
There is no need to copy across anything from CROWD/client/lib
. All the required libraries from that directory already exist in Confluence versions 2.3 and later.
Be sure that there is only one crowd-integration-client-x.x.x.jar
file in the lib directory. Otherwise, it would cause library incompatibilities.
A note about older Confluence versions:
Confluence 2.5.6 to 2.6.1 are not compatible with Crowd 1.2 and later. We recommend that you upgrade to Confluence 2.6.2 or later. If you can not upgrade your Confluence instance, you will need to remove the seraph-X.X.X.jar
file from Confluence's <CONFLUENCE-INSTALLATION>/confluence/WEB-INF/lib/seraph-X.X.X.jar
and replace it with the following file:
http://repository.atlassian.com/maven2/com/atlassian/seraph/atlassian-seraph/0.10/atlassian-seraph-0.10.jar.
Replace Confluence's cache configuration file:
Copy From | Replace File |
---|---|
CROWD/client/conf/crowd-ehcache.xml | CONFLUENCE/confluence/WEB-INF/classes/crowd-ehcache.xml |
CONFLUENCE/confluence/WEB-INF/classes/crowd.properties
を編集します。次のプロパティを変更します。
キー | 値 |
---|---|
application.name |
|
application.password | The application.name and application.password must match the Name and Password that you specified when defining the application in Crowd (see Step 1 above). |
crowd.server.url |
|
session.validationinterval | This is the number of minutes between validation requests, when Crowd validates whether the user is logged in to or out of the Crowd SSO server. Set to the required number of minutes between validation requests. The recommended default is 2 minutes. Setting this value to 1 or higher will increase the performance of Crowd's integration. Setting this value to 0 will cause the application to perform authentication checks on each request but can cause poor performance, especially with Crowd 2.1 - Crowd 2.3.2 using REST due to CWD-2646. |
You can read more about optional settings in the crowd.properties file.
Now that the Crowd client libraries exist, we need to configure Confluence to use them.
Edit the CONFLUENCE/confluence/WEB-INF/classes/atlassian-user.xml
file so that the content of the file is:
<atlassian-user> <repositories> <crowd key="crowd" name="Crowd Repository"/> </repositories> </atlassian-user>
Make sure the content of the file is only what is indicated above, otherwise you may get this error
At this stage, Confluence is set up for centralised authentication. If you wish to enable single sign-on (SSO) or if you are using Confluence 3.2.1 or later, take the following steps to ensure that Confluence's authentication and access request calls will be performed using Seraph:
Skip this step if you are using the Confluence NTLM plugin to enable SSO. Instead, follow the instructions on configuring Confluence for NTLM SSO.
Edit the CONFLUENCE/confluence/WEB-INF/classes/seraph-config.xml
file. Comment out the authenticator
node:
<!--<authenticator class="com.atlassian.confluence.user.ConfluenceAuthenticator"/>-->
Add a new authenticator, choosing the one relevant to your version of Confluence:
If you are using Confluence 3.4 or later:
<authenticator class="com.atlassian.crowd.integration.seraph.v22.ConfluenceAuthenticator"/>
If you are using Confluence 3.3.3 or earlier:
<authenticator class="com.atlassian.crowd.integration.seraph.ConfluenceAuthenticator"/>
Once the setup is complete, you may wish to turn 'External User Management' on in Confluence. This will prevent Confluence administrators from being able to add or update users. For more information please see the Confluence documentation regarding External User Management.
注意:
Enabling caching on the Crowd server: When using the Atlassian-User and Crowd framework together with Confluence, it is highly recommended that caching be enabled on the Crowd server. Multiple redundant calls to the Atlassian-User framework are made on any given request. These results can be stored locally between calls by enabling caching via the Crowd Options menu. Note that this caching on the Crowd server is enabled by default.
Enabling application caching for Confluence: If application caching is enabled for Confluence, Confluence will obtain all necessary information for the period specified by the cache configuration. See Configuring Caching for an Application. If a change or addition occurs to Crowd users, groups and roles, these changes will not be visible in Confluence until the cache expires for that specific item, i.e. for the particular user, group or role.
The default period for the application cache is 5 minutes (300 seconds). To increase the performance of your application, consider changing the cache value to one or two hours (3600 or 7200 seconds).