[JBoss Web Development] - Failed authenticate() test in Web Application with Custom LoginModule
by Simon Martinelli
Simon Martinelli [https://community.jboss.org/people/simas_ch] created the discussion
"Failed authenticate() test in Web Application with Custom LoginModule"
To view the discussion, visit: https://community.jboss.org/message/775252#775252
--------------------------------------------------------------
Hi,
I have a Custom LoginModule that works fine with authentication in EJBs with Remote Communication in JBoss 6.
But it doesn't work when I use it in a web application.
I can see the following in the logfile:
08:54:18,206 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] @ Security checking request POST /proshop/admin/j_security_check 08:54:18,206 DEBUG [org.apache.catalina.authenticator.FormAuthenticator] @ Authenticating username 'mabe' 08:54:18,222 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/proshop].[FacesServlet]] @ Disabling the response for futher output 08:54:18,222 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/proshop].[FacesServlet]] @ The Response is vehiculed using a wrapper: org.apache.catalina.connector.Response 08:54:18,222 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] @ Failed authenticate() test ??/proshop/admin/j_security_check 08:54:18,242 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] @ Security checking request GET /proshop/javax.faces.resource/theme.css.jsf 08:54:18,242 DEBUG [org.apache.catalina.realm.RealmBase] @ Checking constraint 'SecurityConstraint[proshop]' against GET /javax.faces.resource/theme.css.jsf --> false 08:54:18,242 DEBUG [org.apache.catalina.realm.RealmBase] @ Checking constraint 'SecurityConstraint[proshop]' against GET /javax.faces.resource/theme.css.jsf --> false 08:54:18,242 DEBUG [org.apache.catalina.realm.RealmBase] @ Checking constraint 'SecurityConstraint[proshop]' against GET /javax.faces.resource/theme.css.jsf --> false 08:54:18,242 DEBUG [org.apache.catalina.realm.RealmBase] @ Checking constraint 'SecurityConstraint[proshop]' against GET /javax.faces.resource/theme.css.jsf --> false 08:54:18,242 DEBUG [org.apache.catalina.realm.RealmBase] @ No applicable constraint located 08:54:18,242 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] @ Not subject to any constraint
Whe I use the jmx-console Loginmodule it works. So it must be a problem with the custom LoginModule.
Ist there a way to have more trace output from the security mechanism in JBoss?
Thanks Simon
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/775252#775252]
Start a new discussion in JBoss Web Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months
[JBoss AS 7 Development] - Test failures with JDK7
by Frank Langelage
Frank Langelage [https://community.jboss.org/people/lafr] created the discussion
"Test failures with JDK7"
To view the discussion, visit: https://community.jboss.org/message/774564#774564
--------------------------------------------------------------
I tried to compile the current JBoss AS7 sources from github.com with Oracle JDK 1.7.0_09 on Solaris 10 SPARC.
But tests failed:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.jboss.as.clustering.web.infinispan.SessionMapEntryTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.286 sec
Running org.jboss.as.clustering.web.infinispan.SimpleExternalizerTestCase
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.045 sec
Running org.jboss.as.clustering.web.infinispan.FineSessionAttributeStorageTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.144 sec
Running org.jboss.as.clustering.web.infinispan.DistributedCacheManagerTest
Tests run: 22, Failures: 2, Errors: 1, Skipped: 0, Time elapsed: 2.028 sec <<< FAILURE!
Running org.jboss.as.clustering.web.infinispan.SessionAttributeStorageFactoryTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec
Running org.jboss.as.clustering.web.infinispan.CoarseSessionAttributeStorageTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.045 sec
Results :
Failed tests: getSessionDataNoOwner(org.jboss.as.clustering.web.infinispan.DistributedCacheManagerTest): expected same:<Mock for IncomingDistributableSessionData, hashCode: 11206542> was not:<null>
getMissingSessionDataNoOwner(org.jboss.as.clustering.web.infinispan.DistributedCacheManagerTest): expected same:<Mock for IncomingDistributableSessionData, hashCode: 12646526> was not:<null>
Tests in error:
removeSessionLocalNoOwner(org.jboss.as.clustering.web.infinispan.DistributedCacheManagerTest): (..)
Is this expected, meaning JDK 1.6 is mandatory for compilation?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/774564#774564]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months
[JBoss AS 7 Development] - Inter-module injection - the easy way (or even any way or alternative approaches)?
by tom-jb
tom-jb [https://community.jboss.org/people/tom-jb] created the discussion
"Inter-module injection - the easy way (or even any way or alternative approaches)?"
To view the discussion, visit: https://community.jboss.org/message/774712#774712
--------------------------------------------------------------
I am trying unsuccessfully to get Inter-module injection working. I expected that I could have a cdi-enabled war @Inject beans from a bean archive in the same container after haing added a dependency to the bean-archive-as-module in the war's jboss-deployment-structure.xml file
My ultimate goal is to enable a rapid development process for our team where developers working on the front end redeploy just a lean war that does not contain any backend services but has a module dependency on a "services" deployable (which is currently an ear but could be just a jar if need be). Devs doing front-end work would ideally just @Inject any local dependency located in the services deployable with minimal/zero per-service configuration fuss. The services deployable is a fairly time-consuming redeploy, and a frequent redeploy seems unneeded for developers just doing front-end work.
Normally, I might have liked to accomplish this goal by using an exploded ear, where the war is part of the ear, and the front end developer can just redeploy the war portion of the ear after making,say, a java file change, and only the war is redeployed, not the entire ear (which again is slow and seemingly unneeded). Other apps servers that I've worked with in the past offer this specific functionality, but it appears that AS7 does not (unless, hopefully, I'm wrong). On AS7 it seems only the entire ear can be redeployed, even if just the war needs redeployment.
So, I am looking for alternative approaches to accomplish the same goal, such as using a front-end war external to the services deployable that uses inter-module injection (as described http://docs.jboss.org/cdi/spec/1.0/html/injectionelresolution.html here under 5.1.4 in the CDI spec). However when I try this, I get "unsatisfied dependencies" errors. I think I'm satisfying the requirements for inter-module injection (though the 4th part is unclear to me - "the bean class is required to be accessible to classes in the module, according to the class accessibility requirements of the module architecture"). I have confirmed that my war (which has a reference in jboss-deployment-structure.xml to the ear module and to the ejb-jar subdeployment inside the ear) can do a jndi lookup for an example EJB using "java:global/my-ear.ear/my-ejb.jar/SomeService", but @Inject can not find the same bean. I'm confident that a have cdi enabled on both the war and on the ear (plus I've tried just a simple bean archive jar instead of my full-blown ear).
Any workarounds or alternative approaches would be most welcome.
Thanks all,
#Tom
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/774712#774712]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months