一. 獨立安裝Crowd,步驟1-步驟13的內容
二. 設置Confluence使用Crowd進行認證。步驟14-18的內容
三. 設置JIRA使用Crowd進行認證,並使用Confluence的組織機構數據,步驟19-步驟22的內容
步驟:
一.獨立安裝Crowd,步驟1-步驟12的內容
解壓縮atlassian-crowd-x.x.x.zip;
2、在內嵌的Tomcat的apache-tomcat\lib目錄下放所需的數據庫驅動,本文采用mysql;
3、啟動crowd,運行解壓后目錄中的start_crowd.bat,完成啟動后,打開http://127.0.0.1:8095/crowd/console/;
4、 此時,發現需要申請碼。記下Server-ID,進行申請碼的申請。
5、配置數據庫,在mysql中新建crowd的用戶和表空間,輸入
- create user crowd identified by 'crowd';
- grant all privileges on *.* to 'crowd'@'%' identified by 'crowd' with grant option;
- grant all privileges on *.* to 'crowd'@'localhost' identified by 'crowd' with grant option;
- flush privileges;
6、破解
7、填寫申請碼、按照默認項一路Next,設置Crowd server名稱,Crowd上面有Home、Application、Principal、Group、Role、Session、Directory、Options、System Information、Backup & Restore等菜單。
8、配置Directory,在Directory下選擇Add Directory,選擇Internal類型,名稱填confluence。
9、配置Uses:根據需要添加用戶信息,設置Director為Crowd Server。並設置每個user的對應group。如需從已有的Jira或Conflucne中導入user,可選擇import users進行導入,具體如下:選擇Import Users,選擇Atlassian Importer,配置Product,Directory,並將數據庫參數填全,開始導入。
10、配置Groups:在Groups菜單下面選擇Add Group,增加以下組,與confluence和jira的組名對應
confluence-administrators
confluence-users
jira-administrators
jira-developers
jira-users
將用戶配置到相應組中。
11、 配置application:
在Application下選擇add application,分別增加confluence應用程序,設置Password(這里要記下,因為后面配置時還需要用),配置Directories為之前設置的Crowd server。配置Groups為confluence-administrators,confluence-users
再次選擇add application增加jira,配置Groups為jira-administrators,jira-developers,jira-users
允許該Application中的Directory組均可登錄該Applcation
在“View Application – confluence”
在Directories項里,選中Allow all to Authenticate為true,確認后選擇update
可以在Config Test中,測試登錄。
12、作完上述工作,Crowd的配置基本結束。
二. 設置Confluence使用Crowd進行認證。步驟13-17
13. 因采用的Confluence版本較新,其中已包含了crowd集成所需的jar包,采用管理員身份登陸confluence,配置
14. 編輯confluence/WEB-INF/classes/crowd.properties
application.name confluence 設置的confluence訪問帳號
application.password confluence 設置的confluence訪問密碼
application.login.url http://localhost:8095/crowd/console/
crowd.server.url http://localhost:8095/crowd/services/
crowd.base.url http://localhost:8095/crowd/
session.isauthenticated session.isauthenticated
session.tokenkey session.tokenkey
session.validationinterval 2
session.lastvalidation session.lastvalidation
15.編輯CONFLUENCE/confluence/WEB-INF/classes/seraph-config.xml
將如下配置進行注釋:
<!-- <authenticator class="com.atlassian.confluence.user.ConfluenceAuthenticator"/> -->
取消如下注釋:
<authenticator class="com.atlassian.confluence.user.ConfluenceCrowdSSOAuthenticator"/>
16.【可選】在Confluence系統管理>站點配置>安全隱私中打開Confluence的外部用戶管理(External User Management),這樣用戶或管理員就不能在Confluence編輯用戶信息了。也可以不做此項。
17.通過以上步驟,已經將Confluence轉移為使用Crowd進行認證了。可以重啟Confluence服務后,訪問進行測試一下。提示:需要通過在Confluence后台重建索引才能瀏覽到人員目錄。
三. 設置JIRA使用Crowd進行認證,並使用Confluence的組織機構數據,步驟14-步驟13的內容。
下面是如何將JIRA配置成為使用Crowd服務以及Confluence的用戶信息。
18. 在jira中,使用管理員身份進入后,進入管理員頁面下的用戶管理-User Directories,點擊Add Directory,選擇Atlassian Crowd,輸入Server Name,ServerURL為http://localhost:8095/crowd,Application Name為jira,password為之前設置的password。完成后Test Settings,並保存。
調整Directory Name順序將Crowd Server 移到首位。
19. 類似步驟14。之前已經設置好了jira的所需group和app,在這里,只需配置訪問方式即可。
需要注意,本版本jira中JIRA/atlassian-jira/WEB-INF/classes/crowd.properties需要從confluence拷貝過來,修改相應app參數后即可使用。
20.類似步驟15,編輯JIRA/atlassian-jira/WEB-INF/classes/seraph-config.xml,使之成為:
取消此行的注釋:
<authenticator class="com.atlassian.jira.security.login.SSOSeraphAuthenticator"/>
將此行注釋:
<!-- <authenticator class="com.atlassian.jira.security.login.JiraSeraphAuthenticator"/> -->
21. 至此,所有單點登錄配置已完成。重啟jira服務器。可以試驗下單點登錄了,在同一個Session會話窗口中,登錄其中一個應用成功后,可以發現已經自動登錄到另外一個應用了。
