The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Capability Filtering

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Capability Filtering Posted: Mar 18, 2004 4:03 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Capability Filtering
Feed Title: Avi Bryant
Feed URL: http://smallthought.com/avi/?feed=rss2
Feed Description: HREF Considered Harmful
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Avi Bryant

Advertisement
Ian Prince points out an interesting real-life example of Seaside "session hijacking" (or, if you like, accidental capability transfer). Clearly I'll have to address this in the next release of Seaside.

My inclination is to do this with a "filter", which is how authentication and some kinds of expiration work already. In Seaside 2.5, the implementation of filters has changed quite a bit. During the request processing phase, the request fields get passed down the component tree, with each component extracting the fields that apply to it (that have data for its form elements, for example) and then passing the rest along to its children. The idea is that you wrap a special invisible component around any sensitive parts of the page - in Ian's blog, this might be the sidebar with admin links. These special components perform extra checks before allowing their child components to see the request. A BasicAuthentication filter, for instance, would check to make sure that the appropriate username and password were contained in the request before passing it along, rendering any links or forms in the wrapped component useless if you're not logged in. During the rendering phase, it would perform the same check, and could show a "not authenticated" message in place of the component it is protecting. A hijacking filter would check for a cookie or an IP that it had previously recorded. This allows much finer grained control than a global "disallow hijacked sessions" flag. Of course, if you do want it to apply globally, you just wrap your root component and forget about it.

Note that this is considerably more detail than most framework users would ever care about; for an example of a higher level filter interface, see the usage of #isolate: in this post. I would expect to add something similar like #protect: for hijacking.

Read: Capability Filtering

Topic: Wow - MS' HR dept is blogging Previous Topic   Next Topic Topic: PM and Engineering Tensions

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use