[
https://issues.jboss.org/browse/WFLY-4185?page=com.atlassian.jira.plugin....
]
Pedro Igor commented on WFLY-4185:
----------------------------------
[~swd847],
It is working. I've updated the test case as well.
What about the difference of behavior between EAP and WildFly ? Now WildFly seems to be
doing the right thing, while in EAP I still need to define the ServletContextListener in
web.xml to get things working.
Thanks.
Using annotated servlet listeners from modules
----------------------------------------------
Key: WFLY-4185
URL:
https://issues.jboss.org/browse/WFLY-4185
Project: WildFly
Issue Type: Bug
Components: EE
Affects Versions: 9.0.0.Alpha1
Reporter: Pedro Igor
Assignee: Stuart Douglas
PicketLink provides support for Http Security. Basically, it consists of an API to define
security policies to the paths or resources of an application and a security filter
(servlet filter) that is responsible to enforce those policies for every single request.
The security filter is installed from a specific ServletContextListener
(org.picketlink.http.internal.PicketLinkServletContextListener) that checks if the
application has defined any security policy in order to decide if the filter must be
installed or not.
PicketLink also defines a ServletRequestListener
(org.picketlink.http.internal.HttpServletRequestListener) that is used to produce a
decorated HttpServletRequest instance. This decorated instance provides full integration
between PL and the HttpServletRequest security methods plus some other goodies for PL
users such as URL rewriting, etc.
Both listeners (servletcontext and request) are CDI beans with injection points and/or
producer methods.
When using PL from modules, the producer method of
org.picketlink.http.internal.HttpServletRequestListener#produce is not being recognized.
And that makes impossible to use PL from modules.
The same code works if you use PL jars inside the deployment.
Another interesting behavior is that EAP and WildFly are behaving differently. In EAP
(latest build), the ServletContextListener is only recognized as a CDI bean if you define
it in the web.xml. While in WildFly this is not necessary.
Also, in EAP the producer method of HttpServletRequestListener is properly recognized and
everything works fine.
I've created a branch [1] to test this issue. The test case is
{code}org.wildfly.test.integration.security.picketlink.core.http.ServletListenerFromModuleTestCase{code}.
[1]
https://github.com/pedroigor/wildfly/tree/WFLY-4185
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)