2016-10-04 248 views
0

我可以從WebSphere Application Server 8.0.x導出LTPA密鑰文件,然後將文件導入到Liberty Profile Server並使用SSO功能? (16.0.0.3)在WAS和Liberty之間導出和導入SSO密鑰文件

我試過了,它似乎不工作。我得到一個登錄屏幕而不是自動登錄。

以下配置在server.xml中完成:

... 
<ltpa keysFileName="${server.output.dir}/ltpakeyexport.keys" keysPassword="ltpatest" expiration="400" /> 
<webAppSecurity ssoCookieName="ltpav2" ssoDomainNames="myintranet.net"/> 

<basicRegistry id="basic" ignoreCaseForAuthentication="true" realm="realmNameFromWAS"> 
... 

回答

0

LTPA密鑰從WebSphere Application Server控制檯導出。全局安全> LTPA - >跨單點登錄

提供密碼和文件名以導出LTPA密鑰。

這些LTPA密鑰可以在導出時使用上面指定的相同密碼在Liberty Profile Server上使用。

如果您嘗試在WebSphere Application Server和Liberty概要文件之間使用單點登錄(SSO),則還需要確保兩者上的用戶註冊表(LDAP)的「領域名稱」相同。可以在ldapRegistry定義中指定realm =「MyRealm」,以便在Liberty概要文件中指定領域名稱。

+0

是的,我嘗試建立一個SSO WAS和自由曲線之間。目前,我配置了一個' '和' \t '。但由於某種原因,它不起作用。我在第二臺WAS服務器上使用了相同的密鑰文件來完成SSO。 – Karsten

+0

我也想說,通過輸入credentals(我想避免)登錄到自由webapp後,我有2個cookie在以下瀏覽器請求中稱爲「ltpav2」。一個來自WAS,一個來自Liberty。 – Karsten

0

嗯,我能夠啓用跟蹤追查下來的問題:

<logging traceSpecification="com.ibm.ws.security.*=all:com.ibm.ws.webcontainer.security.*=all"/> 

我發現下面的exeption:

com.ibm.ws.security.registry.EntryNotFoundException: uid=KARSTEN,type=Person,scope=LTPA does not exist 
at com.ibm.ws.security.registry.basic.internal.BasicRegistry.getUserSecurityName(BasicRegistry.java:506) 

因此,用戶不能自動驗證,因爲用戶ID「 uid = KARSTEN,type = Person,scope = LTPA「不存在。這是真的,只有用戶「KARSTEN」確實存在。似乎有一個正則表達式匹配的問題,因爲所使用的模式

java.util.regex.Matcher[pattern=([^:]+):(\QMyRealm\E)/(.*) region=0,49 lastmatch=user:MyRealm/uid=KARSTEN,type=Person,scope=LTPA] 

不僅匹配用戶ID,但整個字符串,包括「類型=人」等

當我創建該用戶的基本註冊:

<basicRegistry id="basic" ... > 
... 
<user name="uid=KARSTEN,type=Person,scope=LTPA" password="test" /> 
... 
</basicregistry> 

一切都像預期的一樣工作!

似乎是WLP中的錯誤(或者我們的WebSphere 8.0.x SSO基礎結構爲用戶提供了非標準標識符)。

((在com.ibm.ws.security.AccessIdUtil.setSecurityService()指定的碼:38〜))