|
SubsetRelationships
Relationships of Cajita, Valija, and various versions of JavaScript
Caja TodayJavaScript and Caja are jointly in transition. The language in the middle of the digram below is Cajita, the Caja kernel language. Cajita is a genuine object-capability language we discovered in a subset of JavaScript. As an object capability language, Cajita omits all of JavaScript's mutable static state. In other words, all global implicitly accessible objects, like Object.prototype, are immutable. Cajita strengthens JavaScript's one encapsulation mechanism -- lexical variable capture by closures -- into a true security boundary. To make defensive programming practical, Cajita omits various accident prone features of JavaScript, such as the magical this keyword. The following diagram explains the current relationships between Cajita and JavaScript.
Besides the normal object-capability constraints, Cajita was shaped by the need to simultaneously support all four of the depicted relationships, as well as is practical today.
Among secure JavaScript variants, ADsafe, Jacaranda, and dojox secure are all designed for a similar degree of support for NiceNeighbor and SimpleSubset. Rather than translate to ES3R, they instead take a verification-only approach, which has various engineering benefits such as zero runtime overhead. However, for ES3R, verification requires blacklisting rather than whitelisting, which is harder to secure. Note that Jacaranda does define a set of static rules for permitting safe limited use of this. A future Cajita may adopt these rules. Facebook's FBJS2 and Microsoft's WebSandbox have no intermediate object-capability language, but rather, emulate JavaScript directly in JavaScript, i.e., conventional sandboxing. This supports isolation of potentially offensive code, but provides no direct support for secure cooperation or the writing of defensive access abstractions. Caja TomorrowCurrently, each of the above relationships are fragile or imperfect in various ways documented on each of these respective pages. On browsers that implement the next version of JavaScript, ES5, these relationships will be strengthened, as explained in this section.
The Secure EcmaScript working group of the EcmaScript committee seeks to define a simple secure subset of future JavaScript, to be known as "Secure EcmaScript" or SES. Based on lessons from Cajita and these other systems, we propose that SES and future EcmaScript be co-designed to improve all four relationships between them. In this section, we explain first how Cajita will coexist better with ES5. We then explain some deficiencies in those relationships suggesting further improvements in future EcmaScripts and in Cajita as a proposal for Secure EcmaScript.
|
Sign in to add a comment