Documentation for Crowd 2.3. Documentation for other versions of Crowd is available too.
This is an alternate step to "Step 2" defined in Integrating Crowd with Atlassian JIRA for users wanting to integrate Crowd with JIRA 4.2 or earlier.
JIRA needs Crowd's client libraries in order to be able to delegate user authentication to the Crowd application. As stated earlier, we are going to be modifying the JIRA application by editing the application, which is an exploded WAR stored in JIRA/atlassian-jira
.
Copy the Crowd client libraries and configuration files to JIRA:
Copy From | Copy To |
---|---|
CROWD/client/crowd-integration-client-X.X.X.jar | JIRA/atlassian-jira/WEB-INF/lib |
CROWD/client/conf/crowd.properties | JIRA/atlassian-jira/WEB-INF/classes |
Duplicate Crowd Client libraries in your classpath
The crowd-integration-client always needs to be of the same version as the Crowd server. Therefore you need to delete the existing crowd-integration-clien-X.X.X.jar file from JIRA's WEB-INF/lib directory and replace it with CROWD/client/crowd-integration-client-X.X.X.jar instead of just copying it over. Also, renaming the existing crowd-integration-client jar will not work as JIRA will start with duplicate Crowd Client libraries in its classpath.
seraph-0.7.12.jar
file from JIRA's WEB-INF/lib/
directory and replace it with the following file:xfire-all-1.2.1.jar
file from JIRA's WEB-INF/lib/
directory.client/lib/
directory to JIRA's WEB-INF/lib/
directory:xfire-aegis-1.2.6.jar
xfire-core-1.2.6.jar
Replace JIRA's cache configuration file:
Copy From | Replace File |
---|---|
CROWD/client/conf/crowd-ehcache.xml | JIRA/atlassian-jira/WEB-INF/classes/crowd-ehcache.xml |
JIRA/atlassian-jira/WEB-INF/classes/crowd.properties
を編集します。次のプロパティを変更します。
キー | 値 |
---|---|
application.name |
|
application.password | パスワードは Crowd のアプリケーションで定義した名前と一致している必要があります (前述のステップ 1 を参照)。 |
crowd.server.url | http://localhost:8095/crowd/services/ |
session.validationinterval | 各リクエストで認証チェックを行いたい場合は 0 に設定します。その他の場合、ユーザーが Crowd SSO サーバーにログインしているかどうかを検証するためのリクエスト間隔を分単位で設定します。この値を 1 以上に設定すると、Crowd 連携のパフォーマンスが改善します。 |
You can read more about optional settings in the crowd.properties file.
Now that the Crowd client libraries exist, we need to configure JIRA to use them.
Note: if you are migrating/upgrading a JIRA instance that already uses Crowd, you will need to merge these files (not overwrite them).
Edit the JIRA config file JIRA/atlassian-jira/WEB-INF/classes/osuser.xml
. Comment out any existing authentication providers and uncomment/insert the Crowd providers:
<!-- This is where JIRA's credentials checking can be configured. For instance, see http://www.atlassian.com/software/jira/docs/latest/ldap.html --> <opensymphony-user> <authenticator class="com.opensymphony.user.authenticator.SmartAuthenticator" /> <!-- You will need to uncomment the Crowd providers below to enable Crowd integration --> <provider class="com.atlassian.crowd.integration.osuser.CrowdCredentialsProvider"/> <provider class="com.atlassian.crowd.integration.osuser.CrowdAccessProvider"/> <provider class="com.atlassian.crowd.integration.osuser.DelegatingProfileProvider"> <property name="provider-1">com.atlassian.crowd.integration.osuser.CrowdProfileProvider</property> <property name="provider-2">com.atlassian.jira.user.ExternalEntityJiraProfileProvider</property> <property name="provider-2-exclusive-access">true</property> </provider> <!-- CROWD:START - The providers below here will need to be commented out for Crowd integration --> <!-- <provider class="com.atlassian.core.ofbiz.osuser.CoreOFBizCredentialsProvider"> <property name="exclusive-access">true</property> </provider> <provider class="com.opensymphony.user.provider.ofbiz.OFBizProfileProvider"> <property name="exclusive-access">true</property> </provider> <provider class="com.opensymphony.user.provider.ofbiz.OFBizAccessProvider"> <property name="exclusive-access">true</property> </provider> --> <!-- CROWD:END --> </opensymphony-user>
View JIRA/atlassian-jira/WEB-INF/classes/propertyset.xml
. If there is no entry for the CrowdPropertySet, add the following <propertyset> item at the end of the file as the last <propertyset> item:
<propertyset name="crowd" class="com.atlassian.crowd.integration.osuser.CrowdPropertySet"/>
At this stage, JIRA is set up for centralised authentication. If you wish, you can now enable single sign-on (SSO) to JIRA. This will ensure that JIRA's authentication and access request calls will be performed using Seraph. When authentication or access request calls are performed versus the OSUser framework, the JIRA stack will call the Crowd providers and propertyset implementations.
Edit the JIRA/atlassian-jira/WEB-INF/classes/seraph-config.xml
file. Comment out the authenticator
node:
<!--<authenticator class="com.atlassian.jira.security.login.JiraOsUserAuthenticator"/>-->
Add a new authenticator, choosing the one relevant to your version of JIRA:
If you are using JIRA 4.2.x:
<authenticator class="com.atlassian.crowd.integration.seraph.v22.JIRAAuthenticator"/>
If you are using JIRA 4.1.2 or earlier:
<authenticator class="com.atlassian.crowd.integration.seraph.JIRAAuthenticator"/>
Enabling caching on the Crowd server: When using the Atlassian-User and Crowd framework together with JIRA, 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 JIRA: If application caching is enabled for JIRA, JIRA 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 JIRA until the cache expires for that specific item, i.e. for the particular user, group or role.
From JIRA 3.13, the default cache is two hours. In earlier versions, the default value for the application cache is 5 minutes (300 seconds) — increasing this to one or two hours (3600 or 7200 seconds) will improve the performance of your JIRA site.
To improve performance on page-loading in JIRA, we recommend that you disable the auto-complete function in JIRA's 'User Picker' popup screens. Follow the instructions in the JIRA documentation.
More information: In our experience, disabling this feature in JIRA helps performance for customers with extremely large user bases. If you leave this feature enabled and have adequate performance results in JIRA, feel free to leave it enabled.