2016-10-04 244 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〜))