FirefoxOS/New security model/Packaging: Difference between revisions

Jump to navigation Jump to search
package example (by SublimeText.Mediawiker)
(added background (by SublimeText.Mediawiker))
(package example (by SublimeText.Mediawiker))
Line 36: Line 36:


== Privileged Packages  ==
== Privileged Packages  ==
Page is denoted as part of a privileged app by setting two packages headers:
  manifest: /someapp.webmanifest
  manifest-signature: MRjdkly.... (Base64 JWS Signature)


Modifiying the above example, we get something like:


--gc0pJq0M:08jU534c0p
Content-Location: /someapp.webmanifest
Content-Type: application/manifest
manifest-signature: MRjdkly.... (Base64 JWS Signature)
<html>
  <head>
    <script src="scripts/app.js"></script>
    ...
  </head>
  ...
</html>
--gc0pJq0M:08jU534c0p
Content-Location: /index.html
Content-Type: text/html
<html>
  <head>
    <script src="scripts/app.js"></script>
    ...
  </head>
  ...
</html>
--gc0pJq0M:08jU534c0p
Content-Location: /index.html
Content-Type: text/html
<html>
  <head>
    <script src="scripts/app.js"></script>
    ...
  </head>
  ...
</html>
--gc0pJq0M:08jU534c0p
Content-Location: /scripts/app.js
Content-Type: text/javascript
module Math from '/scripts/helpers/math.js';
...
--gc0pJq0M:08jU534c0p
Content-Location: /scripts/helpers/math.js
Content-Type: text/javascript
export function sum(nums) { ... }
...
--gc0pJq0M:08jU534c0p--


Page is denoted as part of a privileged app by setting two headers:
  manifest: https://example.com/app/someapp.webmanifest
  manifest-signature: MRjdkly.... (Base64 JWS Signature)


The normal loading process is:  
The normal loading process is:  
canmove, Confirmed users
1,220

edits

Navigation menu