0

我在 Apache Tomcat 上安装了 CAS 服务器(v3.5.2),在 JBOSS 上安装了 2 个客户端。除非单点注销,否则一切正常。

我认为我所做的一切都很好,但仍然存在这个问题。

我的配置服务器端:在 WEB-INF\deployerConfigContext.xml 中:

<bean class="org.jasig.cas.services.RegexRegisteredService">
    <property name="id" value="1" />
    <property name="name" value="HTTP and IMAP on localhost:8080/firstCasClient" />
    <property name="description" value="Allows HTTP(S) and IMAP(S) protocols on localhost:8080/firstCasClient" />
    <property name="serviceId" value="^(https?|imaps?)://([A-Za-z0-9_-]+\.)*localhost:8080/firstCasClient/*" />
    <property name="ssoEnabled" value="true" />
    <property name="enabled" value="true" />
    <property name="evaluationOrder" value="0" />
</bean>

<bean class="org.jasig.cas.services.RegexRegisteredService">
    <property name="id" value="2" />
    <property name="name" value="HTTP and IMAP on localhost:8080/secondCasClient" />
    <property name="description" value="Allows HTTP(S) and IMAP(S) protocols on localhost:8080/secondCasClient" />
    <property name="serviceId" value="^(https?|imaps?)://([A-Za-z0-9_-]+\.)*localhost:8080/secondCasClient/*" />
    <property name="ssoEnabled" value="true" />
    <property name="enabled" value="true" />
    <property name="evaluationOrder" value="1" />
</bean>

客户端中的配置:在 web.xml 中:

<!-- CAS SINGLE SIGN OUT -->
<filter>
    <filter-name>CAS Single Sign Out Filter</filter-name>
    <filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class>
    <init-param>
    <!-- because of use of Saml11TicketValidationFilter -->
        <param-name>artifactParameterName</param-name>
        <param-value>SAMLart</param-value>
    </init-param>
</filter>
<filter-mapping>
    <filter-name>CAS Single Sign Out Filter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
</filter-mapping>
<listener>
    <listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>
</listener>

<!-- other filters -->
<filter>
    <filter-name>CAS Authentication Filter</filter-name>
    <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
    <init-param>
        <param-name>casServerLoginUrl</param-name>
        <param-value>http://localhost:8888/cas-server-webapp-3.5.2/login</param-value>
    </init-param>
    <init-param>
        <param-name>service</param-name>
        <param-value>http://localhost:8080/firstCasClient</param-value>
    </init-param>
</filter>
<filter>
    <filter-name>CAS Validation Filter</filter-name>
    <filter-class>org.jasig.cas.client.validation.Saml11TicketValidationFilter</filter-class>
    <init-param>
        <param-name>casServerUrlPrefix</param-name>
        <param-value>http://localhost:8888/cas-server-webapp-3.5.2</param-value>
    </init-param>
    <init-param>
        <param-name>service</param-name>
        <param-value>http://localhost:8080/firstCasClient</param-value>
    </init-param>
</filter>
<filter>
    <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
    <filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class>
</filter>
<filter>
    <filter-name>CAS Assertion Thread Local Filter</filter-name>
    <filter-class>org.jasig.cas.client.util.AssertionThreadLocalFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>CAS Authentication Filter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
</filter-mapping>
<filter-mapping>
    <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
</filter-mapping>
<filter-mapping>
    <filter-name>CAS Validation Filter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
</filter-mapping>
<filter-mapping>
    <filter-name>CAS Assertion Thread Local Filter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
</filter-mapping>

我希望有人能找出问题所在,谢谢

4

1 回答 1

1

确保在您的 argumentExtractorsConfiguration.xml 文件中,casArgumentExtractor bean 的 disableSingleSignOut 属性设置为 false。如果您看到以下内容:

<bean id="casArgumentExtractor"
      class="org.jasig.cas.web.support.CasArgumentExtractor"
      p:httpClient-ref="noRedirectHttpClient"  
      p:disableSingleSignOut="${slo.callbacks.disabled:false}" />

查看您的 cas.properties 并确保 slo.callbacks.disabled 未设置为 true。该${slo.callbacks.disabled:false}方法查找该属性,如果未找到,则默认为 false。

于 2013-07-30T15:31:02.667 回答