[ 
https://issues.apache.org/jira/browse/SHIRO-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13207810#comment-13207810
 ] 

Kersten Lorenz commented on SHIRO-160:
--------------------------------------

Hi Dave,

thanks for your answer. I will try to implement such a session manager...

We've now a working system with Granite DS, but without the "Tide" feature 
enabled. I'll investigate that further.


The only problem is still an exception that occurs on logout: endLogout() in 
AbstractSecurityService
The creation of an GraniteDistributedData object fails.


Here is the complete log: 

[#|2012-02-14T16:43:31.680+0100|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=105;_ThreadName=Thread-

1;|1905707844 [http-thread-pool-9090(4)] DEBUG 
org.granite.clustering.GraniteDistributedDataFactory  - Could not create 
instance of: class org.granite.clustering.SessionGraniteDistributedData
java.lang.NullPointerException: HTTP session cannot be null
        at 
org.granite.clustering.SessionGraniteDistributedData.<init>(SessionGraniteDistributedData.java:66)
        at 
org.granite.clustering.SessionGraniteDistributedData.<init>(SessionGraniteDistributedData.java:61)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at 
org.granite.clustering.GraniteDistributedDataFactory.getInstance(GraniteDistributedDataFactory.java:35)
        at 
org.granite.messaging.service.security.AbstractSecurityService.endLogout(AbstractSecurityService.java:167)
        at 
com.exaxis.shiroflex.graniteds.GraniteDSSecurityService.logout(GraniteDSSecurityService.java:102)
        at 
org.granite.messaging.amf.process.AMF3MessageProcessor.processCommandMessage(AMF3MessageProcessor.java:96)
        at 
org.granite.messaging.amf.process.AMF3MessageProcessor.process(AMF3MessageProcessor.java:61)
        at 
org.granite.messaging.amf.process.AMF0MessageProcessor.process(AMF0MessageProcessor.java:78)
        at 
org.granite.messaging.webapp.AMFMessageServlet.doPost(AMFMessageServlet.java:59)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
        at 
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
        at 
org.granite.messaging.webapp.AMFMessageFilter.doFilter(AMFMessageFilter.java:117)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
        at 
org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
        at 
org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
        at 
org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at 
org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at 
org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:380)
        at 
org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
        at 
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at 
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
        at 
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
        at 
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
        at 
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
        at 
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
        at 
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
        at 
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
        at 
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
        at 
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
        at 
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
        at 
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
        at 
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
        at 
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
        at 
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
        at java.lang.Thread.run(Thread.java:619)
|#]

Is this a bug on GraniteDS or an incomplete logout operation? Perhaps one must 
not call the endLogout() method in GraniteDSSecurityService?

                
> Flex integration with Shiro
> ---------------------------
>
>                 Key: SHIRO-160
>                 URL: https://issues.apache.org/jira/browse/SHIRO-160
>             Project: Shiro
>          Issue Type: New Feature
>          Components: Authentication (log-in), Authorization (access control) 
>    Affects Versions: Incubation
>            Reporter: david e. berry
>              Labels: Flex
>         Attachments: amf package layout.png, blazeds-war-1.0-SNAPSHOT.war, 
> graniteds-war-1.0-SNAPSHOT.war, shiroflex-1.2.0.tgz, 
> shiroflex-war-1.0-SNAPSHOT.war, shiroflex.tgz, shiroflex.tgz
>
>
> Commiters,
> I have created the following classes that I used to integrate Shiro with Flex 
> AMF. I would like to contribute them to the shiro. Please let me know if 
> there is interest and the procedure for doing so. I have included the class 
> names with a brief description of what they do. They are currently outside of 
> the Shiro code base that I checked out, but I could combine them if 
> interested.
> Best Regards,
> Dave 
> /* Authentication and Authorization need to let AMF Ping, Login, Logout 
> messages pass through
> without processing. They call FlexMessageHelper to introspect the binary 
> message to see if it is allowed to pass. 
> If not, normal Authentication, and Authorization takes place.
> */  
> public class FlexAuthenticationFilter extends AuthenticationFilter;
> public class FlexPermissionsAuthorizationFilter extends 
> PermissionsAuthorizationFilter;
> public class FlexRolesAuthorizationFilter extends RolesAuthorizationFilter;
> /*Helper methods for introspecting the contents of the amf message. It is 
> conceivable that a security handler
> might need to introspect the contents of a request. It would be nice if Shiro 
> wrapped the request automatically so that anyone can read the contents without
> causing an end of stream error for a filter down the line. 
> Message helper deserializes the AMF message and checks to see if it is a 
> PING, LOGON, or LOGOUT request. 
> */ 
> public class FlexHttpServletRequestWrapper extends HttpServletRequestWrapper;
> public class FlexMessageHelper;
> /* Custom Flex Login command that calls Subject.login returns a Principal 
> back to Flex.
> */
> public class FlexLoginCommand implements LoginCommand;
> public class FlexPrincipal implements Principal;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to