`
gaoyuntao2005
  • 浏览: 303024 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

crowd Jira confluence 集成

阅读更多

版本:
confluence-2.7-std.zip
atlassian-jira-enterprise-3.12.1-standalone.zip
crowd-1.2.1-std.zip

适用情况: Confluence WIKI已建立一段时间,考虑搭建JIRA环境,并将WIKI用户集成到JIRA中。

参考:
集成Crowd与Confluence(Integrating Crowd with Atlassian Confluence)
confluence.atlassian.com/display/CROWD/3.2.03+Integrating+Crowd+with+Atlassian+Confluence

集成Crowd与JIRA(Integrating Crowd with Atlassian JIRA)
confluence.atlassian.com/display/CROWD/3.2.06+Integrating+Crowd+with+Atlassian+JIRA

原理:
1.将Confluence的组织机构数据导入Crowd并使用Crowd进行认证,步骤1-步骤13的内容。
2.设置JIRA使用Crowd进行认证,并使用Confluence的组织机构数据,步骤14-步骤13的内容。


步骤:
1.解压缩crowd-1.2.1-std.zip
在内嵌的Tomcat的common\lib目录下放一个数据库驱动;

在start_crowd.bat里设置
-Duser.language=en -Duser.country=US
否则第二次启动Crowd会抛异常,详见
http://jira.atlassian.com/browse/CWD-344
 
2.启动start_crowd.bat
http://127.0.0.1:8095/crowd/console/
填写申请码、按照默认项一路Next
Crowd上面有Home、Application、Principal、Group、Role、Session、Directory、Options、System Information、Backup & Restore等菜单。

3.增加一个Directory:
在Directory下选择Add Directory,选择Internal类型,名称填confluence。

4.向该Directory中导入现在Confluence已有的用户:
在Directory下选择import user,选择Atlassian Importer。
注意:
选择Atlassian Product为confluence
选择Directory为上面步骤的Directory。

5.在Application中增加Confluence应用
选择Add Application。
注意Default Directory选择上面已导入用户的Directory。

6.允许该Application中的Directory组均可登录该Applcation
在“View Application  –  confluence”
在Directories项里,选中Allow all to Authenticate为true,确认后选择update
可以在Config Test中,测试登录。

7.作完上述工作,Crowd的配置基本结束,下面是如何更改Confluence使用上面的配置。
同样,可以在Crowd中建一个JIRA应用,然后让JIRA应用和Confluence应用同样使用上面的Directory,Direcotry中包含了已导入的Confluence用户,这样就做到了统一的身份登录管理,经测试,可以达到单点登录的效果。

8.向Confluence应用拷贝lib包

Copy From

Copy To

CROWD/client/crowd-core-x.x.x.jar

CONFLUENCE/confluence/WEB-INF/lib

CROWD/client/crowd-atlassian-user-x.x.x.jar

CONFLUENCE/confluence/WEB-INF/lib

警告:Confluence 2.5.6 to 2.6.1 与Crowd 1.2. *并不完全兼容。建议更新到2.6.2或更高版本

如果坚持使用Confluence老版本,则需要替换Confluence's CONFLUENCE-HOME/WEB-INF/lib/seraph-0.X.X.jar为
http://repository.atlassian.com/maven2/com/atlassian/seraph/atlassian-seraph/0.9/atlassian-seraph-0.9.jar

Zhang提示:建议Confluence升级,在Crowd官方文档不止一处提到要升级。
 
9.编辑confluence/WEB-INF/classes/crowd.properties 

application.name

confluence 上面第5 步骤填写的应用名称

application.password

上面第5 步骤填写的密码

crowd.server.url

http://localhost:8095/crowd/services/

session.validationinterval

0


10.   编辑CONFLUENCE/confluence/WEB-INF/classes/atlassian-user.xml为
<atlassian-user>
    <repositories>
        <crowd key="crowd" name="Crowd Repository"/>  
    </repositories>
</atlassian-user> 

11.编辑CONFLUENCE/confluence/WEB-INF/classes/seraph-config.xml
参照下面注释
<!--<authenticator class="com.atlassian.confluence.user.ConfluenceAuthenticator"/>-->
更换为
<authenticator class="com.atlassian.crowd.integration.seraph.ConfluenceAuthenticator"/>

12.在Confluence系统管理>站点配置>安全隐私中打开Confluence的外部用户管理(External User Management),这样用户或管理员就不能在Confluence编辑用户信息了。
这个步骤可以不做,可根据下面的陈述选择:
http://confluence.atlassian.com/display/DOC/Activating+External+User+Management
For Confluence 2.5.6 and later: External user management when running with Crowd is optional. You can leave external user management off and still run Confluence under Crowd. But external user management is recommended, because it allows you to use Crowd's powerful cross-directory administration features instead of Confluence's more limited Confluence-centric user management.
仅就这个文档的目的来看,我们可以不做此项。因为我们就是Confluence-centric user management,还没有进行cross- directory。

13.通过以上步骤,已经将Confluence转移为使用Crowd进行认证了。可以启动Confluence测试一下。提示:需要通过在Confluence后台重建索引才能浏览到人员目录。
下面是如何将JIRA配置成为使用Crowd服务以及Confluence的用户信息。

 

14.新建一个JIRA环境。

 

15.原理类似步骤4,但此次是手工增加组:在crowd中的director里中增加jira的默认组,方式:向步骤3创建的confluence中增加组:jira-users、jira-developers、jira-administrators。

 

16.按照crowd文档的要求,以上三个组中必须有一个principal存在,可以将confluence的admin设置进去。

 

17.类似步骤5,增加一个名为jira的application。其中application.name与 application.password 将设置在JIRA/atlassian-jira/WEB-INF/classes/crowd.properties中。Default Directory要选择confluence,既让jira使用confluence已有的用户进行认证。

 

18.类似步骤6,在View Application  –  jira 中的directory项目卡中,选择confluence属性Allow all to Authenticate为true,并执行update。

 

19.类似步骤8,向jira拷贝crowd客户端包。

 

20.类似步骤9,修改JIRA/atlassian-jira/WEB-INF/classes/crowd.properties

 

21.修改JIRA/atlassian-jira/WEB-INF/classes/osuser.xml,去掉已有的providers,更改为默认注释的Crowd providers,该文件内有详细的更改说明。

 

22.类似步骤11,编辑JIRA/atlassian-jira/WEB-INF/classes/seraph-config.xml,使之成为:

<authenticator class="com.atlassian.crowd.integration.seraph.JIRAAuthenticator" />

 

23.更改JIRA的权限配置,如允许confluence-users登录浏览JIRA信息,也可将用户配置到jira-users组中。

 

OK,可以试验下单点登录了,在同一个Session会话窗口中,登录其中一个应用成功后,可以发现已经自动登录到另外一个应用了。

分享到:
评论
2 楼 wo17796452 2011-08-19  
[b][/b][i][/i][u][/u]
引用

    [*]
[img][/img][url][/url][flash=200,200][/flash]
1 楼 wo17796452 2011-08-19  
<input type="button" value="test" />

相关推荐

Global site tag (gtag.js) - Google Analytics