e909b772b6f515668e67a8ebe26ddbdeedbaf90a
[src/app-framework-main.git] / doc / application-framework.html
1 <html>
2 <head>
3   <link rel="stylesheet" type="text/css" href="doc.css">
4   <meta charset="UTF-8">
5 </head>
6 <body>
7 <a name="Application.framework"></a>
8 <h1>Application framework</h1>
9
10 <pre><code>version: 1
11 Date:    30 mai 2016
12 Author:  José Bollo
13 </code></pre>
14
15 <p><ul>
16  <li><a href="#Application.framework">Application framework</a>
17  <ul>
18   <li><a href="#Foreword">Foreword</a></li>
19   <li><a href="#Overview">Overview</a></li>
20   <li><a href="#Comparison.to.other.frameworks">Comparison to other frameworks</a>
21   <ul>
22    <li><a href="#Tizen.framework">Tizen framework</a></li>
23    <li><a href="#xdg-app">xdg-app</a></li>
24    <li><a href="#ostro">ostro</a>
25 </li>
26   </ul>
27   </li>
28  </ul>
29  </li>
30  <li><a href="#organization.of.directory.of.applications">organization of directory of applications</a>
31  <ul>
32   <li><a href="#Identity.of.installed.files">Identity of installed files</a></li>
33   <li><a href="#labeling.the.directories.of.applications">labeling the directories of applications</a></li>
34  </ul>
35  </li>
36  <li><a href="#organization.of.data">organization of data</a></li>
37  <li><a href="#Setting.Smack.rules.for.the.application">Setting Smack rules for the application</a></li>
38  <li><a href="#What.user.can.run.an.application.">What user can run an application?</a></li>
39 </ul></p>
40
41 <a name="Foreword"></a>
42 <h2>Foreword</h2>
43
44 <p>This document describes application framework fundamentals.
45 FCF (Fully Conform to Specification) implementation is still under development.
46 It may happen that current implementation somehow diverges with specifications.</p>
47
48 <a name="Overview"></a>
49 <h2>Overview</h2>
50
51 <p>The application framework on top of the security framework
52 provides components to install and uninstall applications
53 as well as to run them in a secured environment.</p>
54
55 <p>The goal of the framework is to manage applications and hide security details
56 to applications.</p>
57
58 <p>For the reasons explained in introduction, it was choose not to reuse Tizen
59 application framework directly, but to rework a new framework inspired from Tizen.</p>
60
61 <p>fundamentals remain identical: the applications are distributed
62 in a digitally signed container that should match widget specifications
63 normalized by the W3C. This is described by the technical
64 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>
65
66 <p>As today this model allows the distribution of HTML, QML and binary applications
67 but it could be extended to any other class of applications.</p>
68
69 <p>The management of widget package signatures.
70 Current model is only an initial step, it might be extended in the
71 future to include new feature (ie: incremental delivery).</p>
72
73 <a name="Comparison.to.other.frameworks"></a>
74 <h2>Comparison to other frameworks</h2>
75
76 <a name="Tizen.framework"></a>
77 <h3>Tizen framework</h3>
78
79 <a name="xdg-app"></a>
80 <h3>xdg-app</h3>
81
82 <a name="ostro"></a>
83 <h3>ostro</h3>
84
85 <a name="organization.of.directory.of.applications"></a>
86 <h1>organization of directory of applications</h1>
87
88 <p>The main path for applications are: APPDIR/PKGID/VER.</p>
89
90 <p>Where:</p>
91
92 <ul>
93 <li>APPDIR is as defined above</li>
94 <li>PKGID is a directory whose name is the package identifier</li>
95 <li>VER is the version of the package MAJOR.MINOR</li>
96 </ul>
97
98
99 <p>The advantage of such an organization is to allow several versions to live together.
100 This is required for multiple reasons (ie: roll back) and to comply with developers habits.</p>
101
102 <a name="Identity.of.installed.files"></a>
103 <h2>Identity of installed files</h2>
104
105 <p>All the files are installed as user &ldquo;userapp&rdquo; and group &ldquo;userapp&rdquo;.
106 All files have rw(x) for user and r-(x) for group and others.</p>
107
108 <p>This allows any user to read files.</p>
109
110 <a name="labeling.the.directories.of.applications"></a>
111 <h2>labeling the directories of applications</h2>
112
113 <a name="organization.of.data"></a>
114 <h1>organization of data</h1>
115
116 <p>The data of a user are contain within its directory and are labeled using the application labels</p>
117
118 <a name="Setting.Smack.rules.for.the.application"></a>
119 <h1>Setting Smack rules for the application</h1>
120
121 <p>For Tizen, the following rules are set by the security manager for each application.</p>
122
123 <pre><code>System ~APP~             rwx
124 System ~PKG~             rwxat
125 System ~PKG~::RO         rwxat
126 ~APP~  System            wx
127 ~APP~  System::Shared    rxl
128 ~APP~  System::Run       rwxat
129 ~APP~  System::Log       rwxa
130 ~APP~  _                 l
131 User   ~APP~             rwx
132 User   ~PKG~             rwxat
133 User   ~PKG~::RO         rwxat
134 ~APP~  User              wx
135 ~APP~  User::Home        rxl
136 ~APP~  User::App::Shared rwxat
137 ~APP~  ~PKG~             rwxat
138 ~APP~  ~PKG~::RO         rxl
139 </code></pre>
140
141 <p>Here, ~PKG~ is the identifier of the package and ~APP~ is the identifier of the application.</p>
142
143 <a name="What.user.can.run.an.application."></a>
144 <h1>What user can run an application?</h1>
145
146 <p>Not all user are able to run all applications.
147 How to manage that?</p>
148 </body>
149 </html>