Integrating Crowd with Atlassian JIRA 4.2 or earlier

Integrating Crowd with Atlassian JIRA

このページの内容

お困りですか?

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

コミュニティに質問

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.

Use the client libraries from Crowd 2.2.7 to integrate with JIRA 4.2 or earlier even when the Crowd server is more recent. The client libraries from Crowd 2.2.7 remain compatible with later releases of the Crowd server.

Step 2. Configuring JIRA to talk to Crowd

2.1 Install the Crowd Client Libraries into JIRA

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.

  1. If you are using the Crowd WAR distribution, then you will need to get the CROWD client libraries from the Crowd distribution, available on our download site.
  2. 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

    JIRA should only have a single copy of crowd-integration-client installed. Therefore you need to delete the existing crowd-integration-client-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.

  3. If you are using JIRA 3.11 or earlier, you will need to remove the seraph-0.7.12.jar file from JIRA's WEB-INF/lib/ directory and replace it with the following file:
    http://repository.atlassian.com/maven2/com/atlassian/seraph/atlassian-seraph/0.10/atlassian-seraph-0.10.jar
  4. If you are using JIRA 3.12.2 or earlier, you will need to update JIRA's xfire libraries:
    • Remove the xfire-all-1.2.1.jar file from JIRA's WEB-INF/lib/ directory.
    • Copy the following two files from Crowd's client/lib/ directory to JIRA's WEB-INF/lib/directory:
      • xfire-aegis-1.2.6.jar
      • xfire-core-1.2.6.jar
  5. 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

  6. JIRA/atlassian-jira/WEB-INF/classes/crowd.properties を編集します。次のプロパティを変更します。

    キー

    application.name

    jira
    The application name must match the name that you specified when you defined the application in Crowd (see Step 1 above).

    application.password

    パスワードは Crowd のアプリケーションで定義した名前と一致している必要があります (前述のステップ 1 を参照)。

    crowd.server.url

    http://localhost:8095/crowd/services/
    If your Crowd server's port is configured differently from the default (i.e. 8095), set it accordingly.

    session.validationinterval

    各リクエストで認証チェックを行いたい場合は 0 に設定します。その他の場合、ユーザーが Crowd SSO サーバーにログインしているかどうかを検証するためのリクエスト間隔を分単位で設定します。この値を 1 以上に設定すると、Crowd 連携のパフォーマンスが改善します。

オプション設定の詳細については「crowd.properties ファイルについて」をご参照ください。

2.2 Configure JIRA to use Crowd's Authenticator

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).

  1. 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>
    
  2. 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"/>
    
  3. At this stage, JIRA is set up for centralized 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"/>
      

2.3 (Optional) Tune the Cache

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.

(info) 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.

2.4 (Optional) Disable the Auto-Complete Function in JIRA's User Picker

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.

最終更新日 2017 年 11 月 28 日

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

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