成功验证后,Aperero CAS客户端抛出连接拒绝错误

时间:2018-09-22 08:23:44

标签: cas jasig wildfly-11

我们已经在wildfly-11.0中安装了cas-5.2.6(通过cas-overlay并使用underwow设置构建)

cas服务器运行正常。

我从git下载了示例cas-sample-java-webapp源,以使用cas客户端测试Java webapp。 我已将此cas-sample-java-webapp.war部署在同一容器(wildfly-11)下

https://github.com/cas-projects/cas-sample-java-webapp.git

登录后,日志中出现以下错误。 为org.aprero启用了调试级别,但无法找到错误的根本原因

13:39:40,642 DEBUG [io.undertow.request.security] (default task-28) Authentication result was ATTEMPTED for HttpServerExchange{ GET /cas-sample-java-webapp/ request {accept=[text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8], accept-language=[en-US,en;q=0.9,ta;q=0.8], cache-control=[max-age=0], accept-encoding=[gzip, deflate, br], user-agent=[Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36], cookie=[JSESSIONID=13oQuTaQgHWod0527IYd_0dNxwfRb1GG2oMyAHEW.tvraghavan-pc, __utma=196943337.376407328.1537549210.1537549210.1537549210.1, __utmz=196943337.1537549210.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)], referer=[https://login.microsoftonline.com/522b3803-a001-4675-b3b5-1d727d43585a/saml2], upgrade-insecure-requests=[1], Host=[tvraghavan-pc:8443]} response {X-Powered-By=[Undertow/1], Server=[WildFly/11]}}
13:39:40,643 DEBUG [io.undertow.session] (default task-28) Created session with id 0QSN-rQ6ezCzBu280XhMSas9ipyv68ROFyvN35i7 for exchange HttpServerExchange{ GET /cas-sample-java-webapp/ request {accept=[text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8], accept-language=[en-US,en;q=0.9,ta;q=0.8], cache-control=[max-age=0], accept-encoding=[gzip, deflate, br], user-agent=[Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36], cookie=[JSESSIONID=13oQuTaQgHWod0527IYd_0dNxwfRb1GG2oMyAHEW.tvraghavan-pc, __utma=196943337.376407328.1537549210.1537549210.1537549210.1, __utmz=196943337.1537549210.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)], referer=[https://login.microsoftonline.com/522b3803-a001-4675-b3b5-1d727d43585a/saml2], upgrade-insecure-requests=[1], Host=[tvraghavan-pc:8443]} response {X-Powered-By=[Undertow/1], Server=[WildFly/11]}}


13:39:41,668 ERROR [io.undertow.request] (default task-28) UT005023: Exception handling request to /cas-sample-java-webapp/: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
        at org.jasig.cas.client.util.CommonUtils.getResponseFromServer(CommonUtils.java:443)
        at org.jasig.cas.client.validation.AbstractCasProtocolUrlBasedTicketValidator.retrieveResponseFromServer(AbstractCasProtocolUrlBasedTicketValidator.java:41)
        at org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:193)

随附cas-sample-java-webapp大战的web.xml

<filter>
    <filter-name>CAS Single Sign Out Filter</filter-name>
    <filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class>
    <init-param>
        <param-name>casServerUrlPrefix</param-name>
        <param-value>https://tvraghavan-PC:8443/cas</param-value>
    </init-param>
</filter>

<listener>
    <listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>
</listener>

<filter>
    <filter-name>CAS Authentication Filter</filter-name>
    <!--<filter-class>org.jasig.cas.client.authentication.Saml11AuthenticationFilter</filter-class>-->
    <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
    <init-param>
        <param-name>casServerLoginUrl</param-name>
        <param-value>https://tvraghavan-PC:8443/cas/login</param-value>
    </init-param>
    <init-param>
        <param-name>serverName</param-name>
        <param-value>https://tvraghavan-PC:8443</param-value>
    </init-param>
</filter>
<filter>
    <filter-name>CAS Validation Filter</filter-name>
    <!--<filter-class>org.jasig.cas.client.validation.Saml11TicketValidationFilter</filter-class>-->
    <filter-class>org.jasig.cas.client.validation.Cas30ProxyReceivingTicketValidationFilter</filter-class>
    <init-param>
        <param-name>casServerUrlPrefix</param-name>
        <param-value>https://tvraghavan-PC:8443/cas</param-value>
    </init-param>
    <init-param>
        <param-name>serverName</param-name>
        <param-value>https://tvraghavan-PC:8443</param-value>
    </init-param>
    <init-param>
        <param-name>redirectAfterValidation</param-name>
        <param-value>true</param-value>
    </init-param>
    <init-param>
        <param-name>useSession</param-name>
        <param-value>true</param-value>
    </init-param>
    <init-param>
        <param-name>authn_method</param-name>
        <param-value>mfa-duo</param-value>
    </init-param>
</filter>

注意: 相同的战争在tomcat-9.0.x中工作正常

0 个答案:

没有答案