improves the documentation
[src/app-framework-main.git] / doc / application-framework.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4   <meta charset="utf-8">
5   <meta name="generator" content="pandoc">
6   <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7   <meta name="author" content="José Bollo">
8   <meta name="author" content="Fulup Ar Foll">
9   <title>Application framework</title>
10   <style type="text/css">code{white-space: pre;}</style>
11   <!--[if lt IE 9]>
12     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
13   <![endif]-->
14   <link rel="stylesheet" href="doc.css">
15 </head>
16 <body>
17 <header>
18 <h1 class="title">Application framework</h1>
19 <h2 class="author">José Bollo</h2>
20 <h2 class="author">Fulup Ar Foll</h2>
21 <h3 class="date">30 mai 2016</h3>
22 </header>
23 <nav id="TOC">
24 <ul>
25 <li><a href="#application-framework">Application framework</a><ul>
26 <li><a href="#foreword">Foreword</a></li>
27 <li><a href="#overview">Overview</a></li>
28 <li><a href="#comparison-to-other-frameworks">Comparison to other frameworks</a><ul>
29 <li><a href="#tizen-framework">Tizen framework</a></li>
30 <li><a href="#xdg-app">xdg-app</a></li>
31 <li><a href="#ostro">ostro</a></li>
32 </ul></li>
33 </ul></li>
34 <li><a href="#organization-of-directory-of-applications">organization of directory of applications</a><ul>
35 <li><a href="#identity-of-installed-files">Identity of installed files</a></li>
36 <li><a href="#labeling-the-directories-of-applications">labeling the directories of applications</a></li>
37 </ul></li>
38 <li><a href="#organization-of-data">organization of data</a></li>
39 <li><a href="#setting-smack-rules-for-the-application">Setting Smack rules for the application</a></li>
40 <li><a href="#what-user-can-run-an-application">What user can run an application?</a></li>
41 </ul>
42 </nav>
43 <h1 id="application-framework">Application framework</h1>
44 <pre><code>version: 1
45 Date:    30 mai 2016
46 Author:  José Bollo</code></pre>
47 <p>TABLE-OF-CONTENT-HERE</p>
48 <h2 id="foreword">Foreword</h2>
49 <p>This document describes application framework fundamentals. FCF (Fully Conform to Specification) implementation is still under development. It may happen that current implementation somehow diverges with specifications.</p>
50 <h2 id="overview">Overview</h2>
51 <p>The application framework on top of the security framework provides components to install and uninstall applications as well as to run them in a secured environment.</p>
52 <p>The goal of the framework is to manage applications and hide security details to applications.</p>
53 <p>For the reasons explained in introduction, it was choose not to reuse Tizen application framework directly, but to rework a new framework inspired from Tizen.</p>
54 <p>fundamentals remain identical: the applications are distributed in a digitally signed container that should match widget specifications normalized by the W3C. This is described by the technical recommendations <a href="http://www.w3.org/TR/widgets" title="Packaged Web Apps">widgets</a> and <a href="http://www.w3.org/TR/widgets-digsig" title="XML Digital Signatures for Widgets">widgets-digsig</a> of the W3 consortium.</p>
55 <p>As today this model allows the distribution of HTML, QML and binary applications but it could be extended to any other class of applications.</p>
56 <p>The management of widget package signatures. Current model is only an initial step, it might be extended in the future to include new feature (ie: incremental delivery).</p>
57 <h2 id="comparison-to-other-frameworks">Comparison to other frameworks</h2>
58 <h3 id="tizen-framework">Tizen framework</h3>
59 <h3 id="xdg-app">xdg-app</h3>
60 <h3 id="ostro">ostro</h3>
61 <h1 id="organization-of-directory-of-applications">organization of directory of applications</h1>
62 <p>The main path for applications are: APPDIR/PKGID/VER.</p>
63 <p>Where:</p>
64 <ul>
65 <li>APPDIR is as defined above</li>
66 <li>PKGID is a directory whose name is the package identifier</li>
67 <li>VER is the version of the package MAJOR.MINOR</li>
68 </ul>
69 <p>The advantage of such an organization is to allow several versions to live together. This is required for multiple reasons (ie: roll back) and to comply with developers habits.</p>
70 <h2 id="identity-of-installed-files">Identity of installed files</h2>
71 <p>All the files are installed as user &quot;userapp&quot; and group &quot;userapp&quot;. All files have rw(x) for user and r-(x) for group and others.</p>
72 <p>This allows any user to read files.</p>
73 <h2 id="labeling-the-directories-of-applications">labeling the directories of applications</h2>
74 <h1 id="organization-of-data">organization of data</h1>
75 <p>The data of a user are contain within its directory and are labeled using the application labels</p>
76 <h1 id="setting-smack-rules-for-the-application">Setting Smack rules for the application</h1>
77 <p>For Tizen, the following rules are set by the security manager for each application.</p>
78 <pre><code>System ~APP~             rwx
79 System ~PKG~             rwxat
80 System ~PKG~::RO         rwxat
81 ~APP~  System            wx
82 ~APP~  System::Shared    rxl
83 ~APP~  System::Run       rwxat
84 ~APP~  System::Log       rwxa
85 ~APP~  _                 l
86 User   ~APP~             rwx
87 User   ~PKG~             rwxat
88 User   ~PKG~::RO         rwxat
89 ~APP~  User              wx
90 ~APP~  User::Home        rxl
91 ~APP~  User::App::Shared rwxat
92 ~APP~  ~PKG~             rwxat
93 ~APP~  ~PKG~::RO         rxl</code></pre>
94 <p>Here, <sub>PKG</sub> is the identifier of the package and <sub>APP</sub> is the identifier of the application.</p>
95 <h1 id="what-user-can-run-an-application">What user can run an application?</h1>
96 <p>Not all user are able to run all applications. How to manage that?</p>
97 </body>
98 </html>