Web applications JBoss中基于表单的身份验证成功,但抛出408错误页

Web applications JBoss中基于表单的身份验证成功,但抛出408错误页,web-applications,jboss,jboss7.x,Web Applications,Jboss,Jboss7.x,我正在尝试将java应用程序从JBoss 5.1迁移到JBoss 7.0。我能够部署应用程序,但如果我想登录(基于表单的身份验证),我会得到一个408(超时)错误页面。请从服务器.log查看此摘录: 10:06:52,997 TRACE [org.jboss.security.authentication.JBossCachedAuthenticationManager] (http--127.0.0.1-8080-5) End isValid, true 10:06:52,997 TRACE

我正在尝试将java应用程序从JBoss 5.1迁移到JBoss 7.0。我能够部署应用程序,但如果我想登录(基于表单的身份验证),我会得到一个408(超时)错误页面。请从服务器.log查看此摘录:

10:06:52,997 TRACE [org.jboss.security.authentication.JBossCachedAuthenticationManager] (http--127.0.0.1-8080-5) End isValid, true
10:06:52,997 TRACE [org.jboss.as.web.security.JBossWebRealm] (http--127.0.0.1-8080-5) User: tlubrpa1 is authenticated
10:06:52,997 DEBUG [org.apache.catalina.authenticator.FormAuthenticator] (http--127.0.0.1-8080-5) Authentication of 'tlubrpa1' was successful
10:06:52,998 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/SSIS2_1]] (http--127.0.0.1-8080-5) User took so long to log on the session expired
10:06:52,998 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] (http--127.0.0.1-8080-5)  Failed authenticate() test ??/SSIS2_1/View/Mainpage/j_security_check
10:06:53,511 DEBUG [org.apache.catalina.session.ManagerBase] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Start expire sessions StandardManager at 1311062813511 sessioncount 0
10:06:53,512 DEBUG [org.apache.catalina.session.ManagerBase] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) End expire sessions StandardManager processingTime 1 expired sessions: 0
10:06:54,181 TRACE [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Scanning directory C:\java\jboss-as-web-7.0.0.Final\standalone\deployments for deployment content changes
<subsystem xmlns="urn:jboss:domain:security:1.0">
        <security-domains>
            <security-domain name="SSIS2-domain">
                <authentication>
                    <login-module code="Database" flag="required">
                        <module-option name="dsJndiName" value="java:/SSIS2DSDev"/>
                        <module-option name="principalsQuery" value="SELECT password FROM users WHERE username=? AND active=1"/>
                        <module-option name="rolesQuery" value="SELECT USERROLE.rolename, 'Roles' FROM USERS INNER JOIN (USERROLE INNER JOIN MAPUSERUSERROLE ON USERROLE.roleid = MAPUSERUSERROLE.roleid) ON USERS.userid = MAPUSERUSERROLE.userid where USERS.username=?"/>
                        <module-option name="hashAlgorithm" value="MD5"/>
                        <module-option name="hashEncoding" value="base64"/>
                    </login-module>
                </authentication>
            </security-domain>
        </security-domains>
    </subsystem>
这是从standalone.xml中提取的相应摘录:

10:06:52,997 TRACE [org.jboss.security.authentication.JBossCachedAuthenticationManager] (http--127.0.0.1-8080-5) End isValid, true
10:06:52,997 TRACE [org.jboss.as.web.security.JBossWebRealm] (http--127.0.0.1-8080-5) User: tlubrpa1 is authenticated
10:06:52,997 DEBUG [org.apache.catalina.authenticator.FormAuthenticator] (http--127.0.0.1-8080-5) Authentication of 'tlubrpa1' was successful
10:06:52,998 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/SSIS2_1]] (http--127.0.0.1-8080-5) User took so long to log on the session expired
10:06:52,998 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] (http--127.0.0.1-8080-5)  Failed authenticate() test ??/SSIS2_1/View/Mainpage/j_security_check
10:06:53,511 DEBUG [org.apache.catalina.session.ManagerBase] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Start expire sessions StandardManager at 1311062813511 sessioncount 0
10:06:53,512 DEBUG [org.apache.catalina.session.ManagerBase] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) End expire sessions StandardManager processingTime 1 expired sessions: 0
10:06:54,181 TRACE [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Scanning directory C:\java\jboss-as-web-7.0.0.Final\standalone\deployments for deployment content changes
<subsystem xmlns="urn:jboss:domain:security:1.0">
        <security-domains>
            <security-domain name="SSIS2-domain">
                <authentication>
                    <login-module code="Database" flag="required">
                        <module-option name="dsJndiName" value="java:/SSIS2DSDev"/>
                        <module-option name="principalsQuery" value="SELECT password FROM users WHERE username=? AND active=1"/>
                        <module-option name="rolesQuery" value="SELECT USERROLE.rolename, 'Roles' FROM USERS INNER JOIN (USERROLE INNER JOIN MAPUSERUSERROLE ON USERROLE.roleid = MAPUSERUSERROLE.roleid) ON USERS.userid = MAPUSERUSERROLE.userid where USERS.username=?"/>
                        <module-option name="hashAlgorithm" value="MD5"/>
                        <module-option name="hashEncoding" value="base64"/>
                    </login-module>
                </authentication>
            </security-domain>
        </security-domains>
    </subsystem>

安全性方面的内容实际上与JBoss 5.1中的login-config.xml中的内容相同,正如您在上面看到的,它对用户进行身份验证


有人有想法吗?

我发现它实际上是一个bug。有一个变通办法。将其添加到元素后面的standalone.xml

<system-properties>
    <property name="org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR" value="false"/>
</system-properties>

当您直接转到login.jsf页面时,会发生此408超时错误。此页面必须理解为安全区域的拦截器

例如,对于下面编写的web.xml,您希望保护/secure/home页。您将被重定向到登录页面,您将不会看到408错误

<security-constraint>
<display-name>global access</display-name>
<web-resource-collection>
<web-resource-name>everyone</web-resource-name>
<url-pattern>/secure/*</url-pattern>
...
</security-constraint>
...

全球接入
每个人
/稳妥/*
...
...

嘿,伙计,我到底需要在standalone.xml中的什么位置添加它?