Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 714125 Details for
Bug 920367
ClusteredSingleSignOn ClassCastException with non-distributable apps
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
test for BZ920367
BZ-920367-test.patch (text/plain), 7.56 KB, created by
dereed
on 2013-03-21 22:15:54 UTC
(
hide
)
Description:
test for BZ920367
Filename:
MIME Type:
Creator:
dereed
Created:
2013-03-21 22:15:54 UTC
Size:
7.56 KB
patch
obsolete
>diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/integration/web/sso/SSOTestBase.java b/testsuite/shared/src/main/java/org/jboss/as/test/integration/web/sso/SSOTestBase.java >index bd63920..371773f 100644 >--- a/testsuite/shared/src/main/java/org/jboss/as/test/integration/web/sso/SSOTestBase.java >+++ b/testsuite/shared/src/main/java/org/jboss/as/test/integration/web/sso/SSOTestBase.java >@@ -80,6 +80,7 @@ public abstract class SSOTestBase { > public static void executeFormAuthSingleSignOnTest(URL serverA, URL serverB, Logger log) throws Exception { > URL warA1 = new URL (serverA, "/war1/"); > URL warB2 = new URL (serverB, "/war2/"); >+ URL warA4 = new URL (serverA, "/war4/"); > > // Start by accessing the secured index.html of war1 > DefaultHttpClient httpclient = new DefaultHttpClient(); >@@ -100,9 +101,12 @@ public abstract class SSOTestBase { > log.debug("Prepare /war2/index.html get"); > checkAccessAllowed(httpclient, warB2 + "index.html"); > >+ // Access a non-distributable war >+ checkAccessAllowed(httpclient, warA4 + "index.html"); >+ > // Access a secured servlet that calls a secured ejb in war2 to test > // propagation of the SSO identity to the ejb container. >- checkAccessAllowed(httpclient, warB2 + "EJBServlet"); >+ //checkAccessAllowed(httpclient, warB2 + "EJBServlet"); > > // Now try logging out of war2 > executeLogout(httpclient, warB2); >@@ -116,6 +120,8 @@ public abstract class SSOTestBase { > // Try accessing war2 again > checkAccessDenied(httpclient, warB2 + "index.html"); > >+ // Try accessing war4 again >+ checkAccessDenied(httpclient, warA4 + "index.html"); > } > > public static void executeNoAuthSingleSignOnTest(URL serverA, URL serverB, Logger log) throws Exception { >@@ -144,13 +150,13 @@ public abstract class SSOTestBase { > > // Access a secured servlet that calls a secured ejb in war2 to test > // propagation of the SSO identity to the ejb container. >- checkAccessAllowed(httpclient, warB2 + "EJBServlet"); >+ //checkAccessAllowed(httpclient, warB2 + "EJBServlet"); > > // Do the same test on war6 to test SSO auth replication with no auth > // configured war > checkAccessAllowed(httpclient, warB6 + "index.html"); > >- checkAccessAllowed(httpclient, warB2 + "EJBServlet"); >+ //checkAccessAllowed(httpclient, warB2 + "EJBServlet"); > > } > >@@ -299,10 +305,15 @@ public abstract class SSOTestBase { > WebArchive war1 = createSsoWar("sso-form-auth1.war"); > WebArchive war2 = createSsoWar("sso-form-auth2.war"); > WebArchive war3 = createSsoWar("sso-with-no-auth.war"); >+ WebArchive war4 = createSsoWar("sso-form-auth-nodistributable.war"); > > // Remove jboss-web.xml so the war will not have an authenticator > war3.delete(war3.get("WEB-INF/jboss-web.xml").getPath()); > >+ // Use web.xml without <distributable/> >+ war4.delete(war4.get("WEB-INF/web.xml").getPath()); >+ war4.setWebXML(tccl.getResource(resourcesLocation + "web-form-auth-nodistributable.xml")); >+ > JavaArchive webEjbs = ShrinkWrap.create(JavaArchive.class, "jbosstest-web-ejbs.jar"); > webEjbs.addAsManifestResource(tccl.getResource(resourcesLocation + "ejb-jar.xml"), "ejb-jar.xml"); > webEjbs.addAsManifestResource(tccl.getResource(resourcesLocation + "jboss.xml"), "jboss.xml"); >@@ -314,6 +325,7 @@ public abstract class SSOTestBase { > ear.addAsModule(war1); > ear.addAsModule(war2); > ear.addAsModule(war3); >+ ear.addAsModule(war4); > ear.addAsModule(webEjbs); > > return ear; >diff --git a/testsuite/shared/src/main/resources/org/jboss/as/test/integration/web/sso/resources/application.xml b/testsuite/shared/src/main/resources/org/jboss/as/test/integration/web/sso/resources/application.xml >index ffc1648..4b35c59 100755 >--- a/testsuite/shared/src/main/resources/org/jboss/as/test/integration/web/sso/resources/application.xml >+++ b/testsuite/shared/src/main/resources/org/jboss/as/test/integration/web/sso/resources/application.xml >@@ -16,6 +16,12 @@ > </module> > <module> > <web> >+ <web-uri>sso-form-auth-nodistributable.war</web-uri> >+ <context-root>/war4</context-root> >+ </web> >+ </module> >+ <module> >+ <web> > <web-uri>sso-with-no-auth.war</web-uri> > <context-root>/war6</context-root> > </web> >@@ -23,4 +29,4 @@ > <module> > <ejb>jbosstest-web-ejbs.jar</ejb> > </module> >-</application> >\ No newline at end of file >+</application> >diff --git a/testsuite/shared/src/main/resources/org/jboss/as/test/integration/web/sso/resources/web-form-auth-nodistributable.xml b/testsuite/shared/src/main/resources/org/jboss/as/test/integration/web/sso/resources/web-form-auth-nodistributable.xml >new file mode 100644 >index 0000000..d6d6316 >--- /dev/null >+++ b/testsuite/shared/src/main/resources/org/jboss/as/test/integration/web/sso/resources/web-form-auth-nodistributable.xml >@@ -0,0 +1,59 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> >+<web-app> >+ <description>WebApp Integration Tests</description> >+ <servlet> >+ <servlet-name>LogoutServlet</servlet-name> >+ <servlet-class>org.jboss.as.test.integration.web.sso.LogoutServlet</servlet-class> >+ </servlet> >+ <servlet> >+ <servlet-name>EJBServlet</servlet-name> >+ <servlet-class>org.jboss.as.test.integration.web.sso.EJBServlet</servlet-class> >+ </servlet> >+ <servlet-mapping> >+ <servlet-name>LogoutServlet</servlet-name> >+ <url-pattern>/Logout</url-pattern> >+ </servlet-mapping> >+ <servlet-mapping> >+ <servlet-name>EJBServlet</servlet-name> >+ <url-pattern>/EJBServlet</url-pattern> >+ </servlet-mapping> >+ <session-config> >+ <session-timeout>1</session-timeout> >+ </session-config> >+ <security-constraint> >+ <web-resource-collection> >+ <web-resource-name>Restricted</web-resource-name> >+ <description>Single SignOn Tests</description> >+ <url-pattern>/*</url-pattern> >+ </web-resource-collection> >+ <auth-constraint> >+ <description>Only authenticated users can access secure content</description> >+ <role-name>Users</role-name> >+ </auth-constraint> >+ </security-constraint> >+ <login-config> >+ <auth-method>FORM</auth-method> >+ <form-login-config> >+ <form-login-page>/login.html</form-login-page> >+ <form-error-page>/error.html</form-error-page> >+ </form-login-config> >+ </login-config> >+ <security-role> >+ <role-name>Users</role-name> >+ </security-role> >+ <ejb-ref> >+ <ejb-ref-name>ejb/OptimizedEJB</ejb-ref-name> >+ <ejb-ref-type>Session</ejb-ref-type> >+ <home>org.jboss.as.test.integration.web.sso.interfaces.StatelessSessionHome</home> >+ <remote>org.jboss.as.test.integration.web.sso.interfaces.StatelessSession</remote> >+ <ejb-link>jbosstest-web-ejbs.jar#SecuredEJB</ejb-link> >+ </ejb-ref> >+ <ejb-local-ref> >+ <ejb-ref-name>ejb/local/OptimizedEJB</ejb-ref-name> >+ <ejb-ref-type>Session</ejb-ref-type> >+ <local-home>org.jboss.as.test.integration.web.sso.interfaces.StatelessSessionLocalHome</local-home> >+ <local>org.jboss.as.test.integration.web.sso.interfaces.StatelessSessionLocal</local> >+ <ejb-link>jbosstest-web-ejbs.jar#SecuredEJB</ejb-link> >+ </ejb-local-ref> >+</web-app>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 920367
: 714125