add documentation & ideas about config.xml
[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   <link rel="stylesheet" href="doc.css">
12   <!--[if lt IE 9]>
13     <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
14   <![endif]-->
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">24 juin 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 <h2 id="foreword">Foreword</h2>
45 <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>
46 <h2 id="overview">Overview</h2>
47 <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>
48 <p>The goal of the framework is to manage applications and hide security details to applications.</p>
49 <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>
50 <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>
51 <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>
52 <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>
53 <h2 id="comparison-to-other-frameworks">Comparison to other frameworks</h2>
54 <h3 id="tizen-framework">Tizen framework</h3>
55 <h3 id="xdg-app">xdg-app</h3>
56 <h3 id="ostro">ostro</h3>
57 <h1 id="organization-of-directory-of-applications">organization of directory of applications</h1>
58 <p>The main path for applications are: APPDIR/PKGID/VER.</p>
59 <p>Where:</p>
60 <ul>
61 <li>APPDIR is as defined above</li>
62 <li>PKGID is a directory whose name is the package identifier</li>
63 <li>VER is the version of the package MAJOR.MINOR</li>
64 </ul>
65 <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>
66 <h2 id="identity-of-installed-files">Identity of installed files</h2>
67 <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>
68 <p>This allows any user to read files.</p>
69 <h2 id="labeling-the-directories-of-applications">labeling the directories of applications</h2>
70 <h1 id="organization-of-data">organization of data</h1>
71 <p>The data of a user are contain within its directory and are labeled using the application labels</p>
72 <h1 id="setting-smack-rules-for-the-application">Setting Smack rules for the application</h1>
73 <p>For Tizen, the following rules are set by the security manager for each application.</p>
74 <pre><code>System ~APP~             rwx
75 System ~PKG~             rwxat
76 System ~PKG~::RO         rwxat
77 ~APP~  System            wx
78 ~APP~  System::Shared    rxl
79 ~APP~  System::Run       rwxat
80 ~APP~  System::Log       rwxa
81 ~APP~  _                 l
82 User   ~APP~             rwx
83 User   ~PKG~             rwxat
84 User   ~PKG~::RO         rwxat
85 ~APP~  User              wx
86 ~APP~  User::Home        rxl
87 ~APP~  User::App::Shared rwxat
88 ~APP~  ~PKG~             rwxat
89 ~APP~  ~PKG~::RO         rxl</code></pre>
90 <p>Here, <sub>PKG</sub> is the identifier of the package and <sub>APP</sub> is the identifier of the application.</p>
91 <h1 id="what-user-can-run-an-application">What user can run an application?</h1>
92 <p>Not all user are able to run all applications. How to manage that?</p>
93 </body>
94 </html>