Security:Strawman Model: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1: Line 1:
Types:
Types:
<pre>
<pre>
Principal = (System, Origin, Null)   // disjoint type union
Principal = (System, Origin, Null)     // disjoint type union
System    = {system}                 // system principal singleton
System    = {system}                   // system principal singleton
Origin    = {origin1, ... originN}   // set of N origin principals
Origin    = {origin1, ... originN}     // set of N origin principals
Null      = {null}                   // null principal singleton
Null      = {null}                     // null principal singleton
Stack    = array [Principal]          // array of Principal
Object    = record {parent:Object}      // record with parent field
Window    = record {url:String,
                    principal:Principal,
                    opener:Window,
                    document:Object}
</pre>
</pre>


Line 25: Line 31:


For all p in P, (p ^ null) == null.
For all p in P, (p ^ null) == null.
Let principal(x) = (x is Window) ? x.principal : (x is Object) ? principal(x.parent) : origin(x)
Let open(u) = new Window(u, principal(u), window)
Confirmed users, Bureaucrats and Sysops emeriti
419

edits