Skip to main content

[jsr356-experts] Summary: relationship of WebSocket Session/HttpSession/Identity/web logout

  • From: Danny Coward < >
  • To:
  • Cc: Greg Wilkins < >
  • Subject: [jsr356-experts] Summary: relationship of WebSocket Session/HttpSession/Identity/web logout
  • Date: Thu, 06 Dec 2012 16:56:34 -0800

OK, so in the spirit of trying to close out this discussion and find what is reasonable to require in the specification, what it looks like to me we are left with is this:-

1) The only association between websocket session and HttpSession is at opening handshake time. The API gives developers a convenient access to the HttpSession object at that point in time.
2) The user identity associated with the websocket Session is the user identity that was established at the opening handshake.
2) If the server decides that authorization for this websocket resource by this user identity has ended (it expired, or some logout mechanism was invoked) then the websocket implementation must immediately close the connection.

(from my read of the websocket spec, the most suitable close code for the latter is 1008).

Is there anything else that we need to specify ?

Thanks,

- Danny



On 11/28/12 11:49 PM, Greg Wilkins wrote:
" type="cite">
Unfortunately even form authentication does not have the same
lifecycle as HTTP Session.

Sure if the HTTPSession is invalidated then then a form Auth user is
logged out.  But a users authentication/authorization can be revoked
during the life of a HttpSession (eg their credit expires in some
central JAAS server).   For that reason Form auth will often store the
credentials in the session and revalidate them on every request.
Basic/Digest authentication revalidate on each request by their
nature.

I really don't think we want to get into that situation for websocket,
as it could be a considerable burden to validate credentials on every
message received before calling any handlers.   If we don't validate
on every message, then we are essentially saying that the identity
associated with every message is the identity as it was established
during the handshake - in which case I don't think we should be
associating with the HTTPsession (unless the application does so
explicitly).

Or maybe we do want to validate the identity on every message and just
warn users that constraint protected messages can be very expensive?

cheers




--
Danny Coward
Java EE
Oracle Corporation


[jsr356-experts] Summary: relationship of WebSocket Session/HttpSession/Identity/web logout

Danny Coward 12/07/2012

[jsr356-experts] Re: Summary: relationship of WebSocket Session/HttpSession/Identity/web logout

Mark Thomas 12/07/2012

[jsr356-experts] Re: [jsr356-users] Re: Summary: relationship of WebSocket Session/HttpSession/Identity/web logout

Danny Coward 12/07/2012

[jsr356-experts] Re: [jsr356-users] Re: Summary: relationship of WebSocket Session/HttpSession/Identity/web logout

Mark Thomas 12/08/2012

[jsr356-experts] Re: Summary: relationship of WebSocket Session/HttpSession/Identity/web logout

Danny Coward 12/11/2012

[jsr356-experts] Re: Summary: relationship of WebSocket Session/HttpSession/Identity/web logout

Mark Thomas 12/12/2012
 
 
Close
loading
Please Confirm
Close