我正在尝试在域模式下为自定义JBoss Portal设置SSO复制。我在domain.xml中进行了以下更改:
我的服务器组属于ha-profile,我补充说:
<system-properties> <property name="exo.profiles" value="cluster"/>
<property name="gatein.jcr.config.type" value="cluster"/>
<property name="gatein.jcr.index.changefilterclass" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.LocalIndexChangesFilter"/>
到domain.xml中的ha配置文件
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="true">
<alias name="localhost"/>
<alias name="example.com"/>
<sso cache-container="web" cache-name="sso"/>
</virtual-server>
</subsystem>
我在复制主体时遇到问题,当我尝试从用户那里获取信息时,我得到了一个NPE。这是日志的片段。
########### log in @ server1 ########### 11:27:41,430 TRACE [org.jboss.as.web.sso] (ajp-/x.x.x.1:8009-4) Registering sso id 'qY0hc42eF1DFFXqtDHzJLse9' for user 'user@domain.com' with auth type 'FORM'
11:27:41,432 TRACE [org.jboss.as.clustering.web.sso.infinispan.SSOClusterManager] (ajp-/x.x.x.1:8009-4) Registering SSO qY0hc42eF1DFFXqtDHzJLse9 in clustered cache
########### shutdown @ server1 ########### 11:28:14,794 INFO [org.apache.coyote.http11] (MSC service thread 1-4) JBWEB003075: Coyote HTTP/1.1 pausing on: http-/x.x.x.1:8080
########### sso update @ server2 ###########
11:27:41,447 TRACE [org.jboss.as.clustering.web.sso.infinispan.SSOClusterManager] (OOB-18,shared=udp) received a credentials modified message for SSO qY0hc42eF1DFFXqtDHzJLse9
11:27:41,462 TRACE [org.jboss.as.clustering.web.sso.infinispan.SSOClusterManager] (OOB-18,shared=udp) received a session modified message for SSO qY0hc42eF1DFFXqtDHzJLse9
11:28:15,577 TRACE [org.jboss.as.clustering.web.sso.infinispan.SSOClusterManager] (OOB-20,shared=udp) received a session modified message for SSO qY0hc42eF1DFFXqtDHzJLse9
########### log in @ server2 ########### 11:28:15,578 TRACE [org.jboss.as.web.sso] (OOB-20,shared=udp) Notified that SSO qY0hc42eF1DFFXqtDHzJLse9 is empty
11:28:35,530 TRACE [org.jboss.as.web.sso] (ajp-/x.x.x.2:8009-4) Checking for cached principal for qY0hc42eF1DFFXqtDHzJLse9
11:28:35,532 TRACE [org.jboss.as.web.sso] (ajp-/x.x.x.2:8009-4) Found cached principal 'NULL' with auth type 'FORM'
发生故障转移后刷新页面时出错:
11:28:44,054 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[customapp].[jsp]] (ajp-/x.x.x.2:8009-4) JBWEB000236: Servlet.service() for servlet jsp threw exception: java.lang.NullPointerException at org.apache.jsp.WEB_002dINF.jsp.banners.customappbanner_jsp._jspService(customappbanner_jsp.java:148)
由&#34; else&#34;生成这个片段的一部分:
<% if(request.getUserPrincipal() == null) {%>
<a href="/portal/login" id="sign-in" class="header-link" rel="nofollow">Login</a>
<% } else { %>
<ul class="header-link">
<li class="hidden-xs"><i class="icons user"></i><%= request.getUserPrincipal().getName().toString() %></li>
任何提示都将不胜感激。 此外,可分发标记存在于web.xml中。
感谢。
答案 0 :(得分:0)
仅供参考,这是会话复制的SAML / SSO Valve问题。目前Portal / EAP不支持此功能。