OpenAjax Hub 1.1 & SMash (Secure Mashups)
Jon Ferraiolo and Sumeer Bhola
IBM
March 19, 2008
OpenAjax Hub 1.1 & SMash (Secure Mashups) Jon Ferraiolo and - - PowerPoint PPT Presentation
OpenAjax Hub 1.1 & SMash (Secure Mashups) Jon Ferraiolo and Sumeer Bhola IBM March 19, 2008 Agenda Mash Up Recap Introducing OpenAjax Alliance OpenAjax Hub1.0 OpenAjax Hub 1.1 (and SMash) OpenAjax Hub 1.1 and SMash (Secure
March 19, 2008
OpenAjax Hub 1.1 and SMash (Secure Mashups) 2
Web 2.0 Content Ecosystem
“web apps” creation by LOBs & subject matter experts
can be combined in different ways to meet ad hoc business
services
assets & services
internet & intranet
4
Airport Location/Status Data (Colored Icons) Airport Data Alert/Warning (NOTAM) Data Operator Queries
Runway Data
Weather Data (Overlay)
Airport Detail Yahoo Map
4
Airport Location/Status Data (Colored Icons) Airport Data Alert/Warning (NOTAM) Data Operator Queries
Runway Data
Weather Data (Overlay)
Airport Detail Yahoo Map
OpenAjax Hub 1.1 and SMash (Secure Mashups) 3
OpenAjax Hub 1.1 and SMash (Secure Mashups) 4
OpenAjax Hub 1.1 and SMash (Secure Mashups) 5
OpenAjax Hub 1.1 and SMash (Secure Mashups) 7
OpenAjax Hub 1.1 and SMash (Secure Mashups) 8
OpenAjax Hub 1.1 and SMash (Secure Mashups) 9
OpenAjax Hub 1.0 Example
This is a mockup of a Web application that uses UI controls from multiple Ajax toolkits.
Assume multiple Ajax toolkits:
The visual controls need to react to new server data and to each
appropriately.
OpenAjax Hub 1.1 and SMash (Secure Mashups) 10
<html> <head> ... <script type="text/javascript" src="OpenAjax.js"/> <script type="text/javascript" src="UTILS.js"/> <script type="text/javascript" src="CALENDAR.js"/> <script type="text/javascript" src="CHARTS.js"/> <script type="text/javascript" src="DATAGRID.js"/> <script type="text/javascript"> ... function MyCalendarCallback(...) { OpenAjax.hub.publish("myapp.newdate", newdate); } ... function NewDateCallback(eventname, publisherData, subscriberData) { ...update the given visualization widget... } OpenAjax.hub.subscribe("myapp.newdate", NewDateCallback); ... </script> </head> ...
OpenAjax Hub 1.1 and SMash (Secure Mashups) 14
OpenAjax Hub 1.1 and SMash (Secure Mashups) 15
OpenAjax Hub 1.1 and SMash (Secure Mashups) 25
OpenAjax Hub 1.1 and SMash (Secure Mashups) 16
OpenAjax Hub 1.1 and SMash (Secure Mashups) 20
messaging
OpenAjax Hub 1.1 and SMash (Secure Mashups) 17
Web browser
URL : http://example.com/mashup_builder/my_mashup1 Widget-C Widget-E Widget-A
Communicates in the background with one
servers Company server (trusted) Communicates in the background with a public web server
Message passing between the widgets
Public server (untrusted) Communicates in the background with a public web server Public server
What if one of the widgets is malicious?
(untrusted)
OpenAjax Hub 1.1 and SMash (Secure Mashups) 17
Web browser
URL : http://example.com/mashup_builder/my_mashup1 Widget-C Widget-E Widget-A
Communicates in the background with one
servers Company server (trusted) Communicates in the background with a public web server
Message passing between the widgets
Public server (untrusted) Communicates in the background with a public web server Public server
What if one of the widgets is malicious?
(untrusted)
OpenAjax Hub 1.1 and SMash (Secure Mashups) 22
fragment ids for parent-child frame communication
OpenAjax Hub 1.1 and SMash (Secure Mashups) 21
OpenAjax Hub 1.1 and SMash (Secure Mashups) 26
Hub 1.1 Code HTML5 postMessage provider (future) smash provider
API SPI
Gadget/Widget Support (OpenAjax or …)
inline provider
Hub 1.1
OpenAjax Hub 1.1 and SMash (Secure Mashups) 28
Web browser
URL: http://example.com/mashup_builder/my_mashup1
Mashup container
OpenAjax Hub 1.1 and SMash (Secure Mashups) 28
Web browser
URL: http://example.com/mashup_builder/my_mashup1
Mashup container
Initialize and create a “Managed Hub”
1
OpenAjax Hub 1.1 and SMash (Secure Mashups) 28
Web browser
URL: http://example.com/mashup_builder/my_mashup1
Mashup container
Hub 1.1 (Managed Hub) inline provider smash provider Security manager
Initialize and create a “Managed Hub”
1
OpenAjax Hub 1.1 and SMash (Secure Mashups) 28
Web browser
URL: http://example.com/mashup_builder/my_mashup1
Mashup container
Hub 1.1 (Managed Hub) inline provider smash provider Security manager
Initialize and create a “Managed Hub” Load the widgets used in the mashup
1 2
OpenAjax Hub 1.1 and SMash (Secure Mashups) 28
Web browser
URL: http://example.com/mashup_builder/my_mashup1
Widget-C Widget-E Widget-A Mashup container
Hub 1.1 smash provider Hub 1.1 (Managed Hub) inline provider smash provider Security manager
Initialize and create a “Managed Hub” Load the widgets used in the mashup
Hub 1.1 inline provider Hub 1.1 smash provider
1 2
OpenAjax Hub 1.1 and SMash (Secure Mashups) 28
Web browser
URL: http://example.com/mashup_builder/my_mashup1
Widget-C Widget-E Widget-A Mashup container
Hub 1.1 smash provider Hub 1.1 (Managed Hub) inline provider smash provider Security manager
Subscribe to a topic and register a callback function using connHandle.subscribe() Initialize and create a “Managed Hub” Load the widgets used in the mashup
Hub 1.1 inline provider Hub 1.1 smash provider
1 2 3
OpenAjax Hub 1.1 and SMash (Secure Mashups) 28
Web browser
URL: http://example.com/mashup_builder/my_mashup1
Widget-C Widget-E Widget-A Mashup container
Hub 1.1 smash provider Hub 1.1 (Managed Hub) inline provider smash provider Security manager
Broadcast an event using connHandle.publish() Subscribe to a topic and register a callback function using connHandle.subscribe() Initialize and create a “Managed Hub” Load the widgets used in the mashup
Hub 1.1 inline provider Hub 1.1 smash provider
1 2 3 4
OpenAjax Hub 1.1 and SMash (Secure Mashups) 28
Web browser
URL: http://example.com/mashup_builder/my_mashup1
Widget-C Widget-E Widget-A Mashup container
Hub 1.1 smash provider Hub 1.1 (Managed Hub) inline provider smash provider Security manager
Broadcast an event using connHandle.publish() Subscribe to a topic and register a callback function using connHandle.subscribe() Initialize and create a “Managed Hub” Load the widgets used in the mashup
Hub 1.1 inline provider Hub 1.1 smash provider
1 2 3 4 5 6
OpenAjax Hub 1.1 and SMash (Secure Mashups) 28
Web browser
URL: http://example.com/mashup_builder/my_mashup1
Widget-C Widget-E Widget-A Mashup container
Hub 1.1 smash provider Hub 1.1 (Managed Hub) inline provider smash provider Security manager
Broadcast an event using connHandle.publish() Subscribe to a topic and register a callback function using connHandle.subscribe() Initialize and create a “Managed Hub” Load the widgets used in the mashup
Hub 1.1 inline provider Hub 1.1 smash provider
1 2 3 4 5 6 8 9 7
OpenAjax Hub 1.1 and SMash (Secure Mashups) 28
Web browser
URL: http://example.com/mashup_builder/my_mashup1
Widget-C Widget-E Widget-A Mashup container
Hub 1.1 smash provider Hub 1.1 (Managed Hub) inline provider smash provider Security manager
Broadcast an event using connHandle.publish() Invoke the callback function Subscribe to a topic and register a callback function using connHandle.subscribe() Initialize and create a “Managed Hub” Load the widgets used in the mashup
Hub 1.1 inline provider Hub 1.1 smash provider
1 2 3 4 5 6 8 9 7 10 11 12
OpenAjax Hub 1.1 and SMash (Secure Mashups) 29
/* Create a new hub-instance, and get 'connection handle' */ managedHub = OpenAjax.hub.createManagedHub(pubPolicyCallback, subPolicyCallback); /* Bind Widget-A to the managedHub hub-instance */ managedHub.bind("Widget-A"); /* Setup widget-A to use smash provider */ smash.prepareForLoad({clientName:"Widget-A", uri:"http:// widgeta.foo.com"}); /* Load widget in its own iframe */ ... /* publish */ managedHub.publish("topic2", {label1:["v1, "v2"]}); /* subscribe */ subscriptionHandle = managedHub.subscribe("topic3", successCallback, eventCallback);
OpenAjax Hub 1.1 and SMash (Secure Mashups) 30
function pubPolicyCallback(topic, data, pubClientName, subClientName) { /* Make decision based on topic, and publisher, subscriber identity */ return true; } function subPolicyCallback(topic, subClientName) { /* Make decision based on topic and subscriber identity */ return true; } function successCallback(success, subscriptionHandle) { if (success) { ... } } function eventCallback(subscriptionHandle, topic, data) { …
OpenAjax Hub 1.1 and SMash (Secure Mashups) 31
OpenAjax Hub 1.1 and SMash (Secure Mashups) 32
client)
frame
cryptographically secure)
OpenAjax Hub 1.1 and SMash (Secure Mashups) 33
OpenAjax Hub 1.1 and SMash (Secure Mashups) 34
OpenAjax Hub 1.1 and SMash (Secure Mashups) 35
OpenAjax Hub 1.1 and SMash (Secure Mashups) 36
OpenAjax Hub 1.1 and SMash (Secure Mashups) 37
http://www.foo.com/index.html
http://a01.foo.com/component1.html
Web site layout: ./index.html ./component1.html ./component2.html ./tunnel.html /etc/hosts changes
127.0.0.1 mashup.foo.com 127.0.0.1 a01.foo.com 127.0.0.1 a02.foo.com 127.0.0.1 a03.foo.com 127.0.0.1 a04.foo.com etc.
http://www.foo.com/tunnel.html http://a02.foo.com/component2.html http://www.foo.com/tunnel.html
Mashup application (index.html):
OpenAjax Hub 1.1 and SMash (Secure Mashups) 38