在WAS和Liberty之间导出和导入SSO的密钥文件

时间:2016-10-04 14:13:53

标签: websphere-liberty ltpa

我可以从WebSphere Application Server 8.0.x导出LTPA密钥文件,然后将文件导入Liberty Profile Server并使用SSO功能吗? (16.0.0.3)

我试了一下,似乎没有用。我得到一个登录屏幕而不是自动登录。

以下配置在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">
...

2 个答案:

答案 0 :(得分:0)

可以从WebSphere Application Server控制台导出LTPA密钥。全球安全&gt; LTPA - &gt;跨单元单点登录

提供密码和文件名以导出LTPA密钥。

导出时,可以使用与上面指定的密码相同的密码在Liberty Profile Server上使用这些LTPA密钥。

如果您尝试在WebSphere Application Server和Liberty配置文件之间使用单点登录(SSO),则还需要确保两者上的用户注册表(LDAP)的“域名”相同。可以通过在ldapRegistry定义中指定realm =“MyRealm”在Liberty概要文件上指定领域名称。

答案 1 :(得分:0)

嗯,我能够通过启用跟踪来追踪问题:

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

我发现了以下例外:

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为&#34; uid = KARSTEN,type = Person,scope = LTPA&#34;不存在。这是真的,只有用户&#34; KARSTEN&#34;确实存在。似乎存在正则表达式匹配问题,因为使用的模式

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

不仅匹配用户ID,还包括整个字符串,包括&#34; type = Person&#34;等

当我在基本注册表中创建此用户时:

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

相关问题