- We design and build extraordinary applications for companies looking to make the next great idea a reality.
- learn more
SMash - Something Useful from the OpenAjax Alliance?

In the announcement that the OpenAjax Alliance had released OpenAjax Hub 1.0, and would start to work toward 1.1, there was one thing that caught my interest: the news that 1.1 would support secure mashups. Given that proxies and JSONP are both pretty open to abuse by unscrupulous service providers, this was certainly welcome news? So, what exactly does this secure mashup support look like?
The nascent SVN repository at Sourceforge wasn't much help -- mostly just a placeholder for future work. A little digging reveals that the OpenAjax technology will be based on a technique known as 'SMash', developed at IBM for performing secure mashups. I was able to locate a copy of a research paper on SMash (not sure if this is meant to be public, so grab a copy).
The nut paragraphs here are the following:
Our abstraction involves encapsulating content from different trust domains as components running in a browser. Components are wired together using channels. The channel abstraction and security policies associated with channels are implemented by an event hub that is part of the Trusted Computing Base (TCB) from the mashup provider’s perspective. The only inter-component communication in the browser is realized using these channels.
We realize the component abstraction using the HTML <iframe> element, which was designed as a container for loading sub-documents inside the main document. Some technical challenges that we address are (1) enabling parent to child document communication links when the parent and child are from different trust domains, (2) ensuring integrity and confidentiality of information on these links, and (3) guarding against component phishing, where an untrusted component in a mashup can change which component is loaded in another part of the mashup.
So we're back to using iframe's
to do client-server communication. Very pre-Ajax, but still, it allows
you to do secure mashups without modifying the browser. What are the
essentials of SMash?
- Each component is loaded into a separate
iframe. - Communication
between the messaging hub and the iframes takes place through
modification of the iframe's 'location', specifically the fragment,
i.e. the stuff after the '#' character. Changing that doesn't require a
reload. - Embedded in each component's iframe is another iframe
from the original, top-level mashup host. The component can modify the
fragment, and this iframe can access the JavaScript context of the
top-level window (i.e.window.parent.parent). So, now two-way communication is possible. - Fragment identifiers are picked up through polling in the targer iframe.
- The messaging hub controls which components can send what sorts of messages to other components.
There's
a lot more detail in the paper, along with some security consideration,
and alternative implementation options. Obviously there is a limit on
the size of URL's, so there must be a limit on the size of fragment
identifiers and thus a limit on the maximum size of messages that can
be sent.
It's all a long way to go for secure mashups in
unmodified browsers, but the alternative -- modification of some W3C
standards -- looks unlikely at this point. You'll definitely want a
framework for this.
Technorati Tags: ajax, openajax, secure mashups, smash
Topics: Ajax Widgets, Mashups, Security
Comments: 1 so far
Leave a comment
About Pathfinder
Recent
- Rails ThreatDown!
- Automated Deployments Rock
- Bandwidth profiling Flex projects and more with Charles
- iPhone SDK: UIViewController Testing & TDD
- Icons are evil; so are menus - unless you do them right
- The Truth About Designing For Security
- GWT, Gadgets and OpenSocial, Part 2
- Has Many has_many: A Refactoring Story
- The Hidden Power of Canvas
- Review of fixture_replacement2 plugin
Archives
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006


I think window.name is a much better approach than using iframes.
Comment by Justin Meyer, Saturday, August 9, 2008 @ 4:17 pm