3b62cb764b5a29b2833ad23d9c4bdb92bdab9f2e
[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:    15 March 2016
12 Author:  José Bollo
13 </code></pre>
14
15 <a name="Foreword"></a>
16 <h2>Foreword</h2>
17
18 <p>This document describes what we intend to do. It may happen that our
19 current implementation and the content of this document differ.</p>
20
21 <p>In case of differences, it is assumed that this document is right
22 and the implementation is wrong.</p>
23
24 <a name="Overview"></a>
25 <h2>Overview</h2>
26
27 <p>The application framework on top of the security framework
28 provides the components to install and uninstall applications
29 and to run it in a secured environment.</p>
30
31 <p>The goal is to manage applications and to hide the details of
32 the security framework to the applications.</p>
33
34 <p>For the reasons explained in introduction, we did not used the
35 application framework of Tizen as is but used an adaptation of it.</p>
36
37 <p>The basis is kept identical: the applications are distributed
38 in a digitally signed container that must match the specifications
39 of widgets (web applications). This is described by the technical
40 recomendations <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>
41
42 <p>This model allows the distribution of HTML, QML and binary applications.</p>
43
44 <p>The management of signatures of the widget packages
45 This basis is not meant as being rigid and it can be extended in the
46 futur to include for example incremental delivery.</p>
47
48 <a name="Comparison.to.other.frameworks"></a>
49 <h2>Comparison to other frameworks</h2>
50
51 <a name="Tizen.framework"></a>
52 <h3>Tizen framework</h3>
53
54 <a name="xdg-app"></a>
55 <h3>xdg-app</h3>
56
57 <a name="ostro"></a>
58 <h3>ostro</h3>
59
60 <a name="Organisation.of.directory.of.applications"></a>
61 <h1>Organisation of directory of applications</h1>
62
63 <p>The main path for applivcations are: APPDIR/PKGID/VER.</p>
64
65 <p>Where:</p>
66
67 <ul>
68 <li>APPDIR is as defined above</li>
69 <li>PKGID is a directory whose name is the package identifier</li>
70 <li>VER is the version of the package MAJOR.MINOR</li>
71 </ul>
72
73
74 <p>This organisation has the advantage to allow several versions to leave together.
75 This is needed for some good reasons (rolling back) and also for less good reasons (user habits).</p>
76
77 <a name="Identity.of.installed.files"></a>
78 <h2>Identity of installed files</h2>
79
80 <p>All the files are installed as the user &ldquo;userapp&rdquo; and group &ldquo;userapp&rdquo;.
81 All files have rw(x) for user and r-(x) for group and others.</p>
82
83 <p>This allows any user to read the files.</p>
84
85 <a name="Labelling.the.directories.of.applications"></a>
86 <h2>Labelling the directories of applications</h2>
87
88 <a name="Organisation.of.data"></a>
89 <h1>Organisation of data</h1>
90
91 <p>The data of a user are in its directory and are labelled using the labels of the application</p>
92
93 <a name="Setting.Smack.rules.for.the.application"></a>
94 <h1>Setting Smack rules for the application</h1>
95
96 <p>For Tizen, the following rules are set by the security manager for each application.</p>
97
98 <pre><code>System ~APP~             rwx
99 System ~PKG~             rwxat
100 System ~PKG~::RO         rwxat
101 ~APP~  System            wx
102 ~APP~  System::Shared    rxl
103 ~APP~  System::Run       rwxat
104 ~APP~  System::Log       rwxa
105 ~APP~  _                 l
106 User   ~APP~             rwx
107 User   ~PKG~             rwxat
108 User   ~PKG~::RO         rwxat
109 ~APP~  User              wx
110 ~APP~  User::Home        rxl
111 ~APP~  User::App::Shared rwxat
112 ~APP~  ~PKG~             rwxat
113 ~APP~  ~PKG~::RO         rxl
114 </code></pre>
115
116 <p>Here, ~PKG~ is the identifier of the package and ~APP~ is the identifier of the application.</p>
117
118 <a name="What.user.can.run.an.application."></a>
119 <h1>What user can run an application?</h1>
120
121 <p>Not all user are able to run all applications.
122 How to manage that?</p>
123 </body>
124 </html>