Remove proposal statement.
[src/app-framework-main.git] / docs / 5.1-application-framework.md
1
2 Application framework
3 =====================
4
5 Foreword
6 --------
7
8 This document describes application framework fundamentals. 
9 FCS (Fully Conform to Specification) implementation is still under development.
10 It may happen that current implementation somehow diverges with specifications.
11
12 Overview
13 --------
14
15 The application framework on top of the security framework
16 provides components to install and uninstall applications
17 as well as to run them in a secured environment.
18
19 The goal of the framework is to manage applications and hide security details
20 to applications.
21
22 For the reasons explained in introduction, it was choose not to reuse Tizen
23 application framework directly, but to rework a new framework inspired from Tizen.
24
25 fundamentals remain identical: the applications are distributed
26 in a digitally signed container that should match widget specifications
27 normalized by the W3C. This is described by the technical
28 recommendations [widgets] and [widgets-digsig] of the W3 consortium.
29
30 As today this model allows the distribution of HTML, QML and binary applications
31 but it could be extended to any other class of applications.
32
33 The management of widget package signatures.
34 Current model is only an initial step, it might be extended in the
35 future to include new feature (ie: incremental delivery).
36
37
38 Comparison to other frameworks
39 ------------------------------
40
41  - Tizen framework
42
43  - xdg-app
44
45  - ostro
46
47 ### Organization of directory of applications ###
48
49 The main path for applications are: APPDIR/PKGID/VER.
50
51 Where:
52
53  - APPDIR is as defined above
54  - PKGID is a directory whose name is the package identifier
55  - VER is the version of the package MAJOR.MINOR
56
57 The advantage of such an organization is to allow several versions to live together.
58 This is required for multiple reasons (ie: roll back) and to comply with developers habits.
59
60 #### Identity of installed files ####
61
62 All the files are installed as user "userapp" and group "userapp".
63 All files have rw(x) for user and r-(x) for group and others.
64
65 This allows any user to read files.
66
67
68 #### Labeling the directories of applications ####
69
70
71 ### Organization of data ###
72
73 The data of a user are contain within its directory and are labeled using the application labels
74
75 ### Setting Smack rules for the application ###
76
77 For Tizen, the following rules are set by the security manager for each application.
78
79     System ~APP~             rwx
80     System ~PKG~             rwxat
81     System ~PKG~::RO         rwxat
82     ~APP~  System            wx
83     ~APP~  System::Shared    rxl
84     ~APP~  System::Run       rwxat
85     ~APP~  System::Log       rwxa
86     ~APP~  _                 l
87     User   ~APP~             rwx
88     User   ~PKG~             rwxat
89     User   ~PKG~::RO         rwxat
90     ~APP~  User              wx
91     ~APP~  User::Home        rxl
92     ~APP~  User::App::Shared rwxat
93     ~APP~  ~PKG~             rwxat
94     ~APP~  ~PKG~::RO         rxl
95
96 Here, ~PKG~ is the identifier of the package and ~APP~ is the identifier of the application.
97
98 ### What user can run an application? ###
99
100 Not all user are able to run all applications.
101 How to manage that?
102
103 [meta-intel]:       https://github.com/01org/meta-intel-iot-security                "A collection of layers providing security technologies"
104 [widgets]:          http://www.w3.org/TR/widgets                                    "Packaged Web Apps"
105 [widgets-digsig]:   http://www.w3.org/TR/widgets-digsig                             "XML Digital Signatures for Widgets"
106 [libxml2]:          http://xmlsoft.org/html/index.html                              "libxml2"
107 [openssl]:          https://www.openssl.org                                         "OpenSSL"
108 [xmlsec]:           https://www.aleksey.com/xmlsec                                  "XMLSec"
109 [json-c]:           https://github.com/json-c/json-c                                "JSON-c"
110 [d-bus]:            http://www.freedesktop.org/wiki/Software/dbus                   "D-Bus"
111 [libzip]:           http://www.nih.at/libzip                                        "libzip"
112 [cmake]:            https://cmake.org                                               "CMake"
113 [security-manager]: https://wiki.tizen.org/wiki/Security/Tizen_3.X_Security_Manager "Security-Manager"
114 [app-manifest]:     http://www.w3.org/TR/appmanifest                                "Web App Manifest"
115 [tizen-security]:   https://wiki.tizen.org/wiki/Security                            "Tizen security home page"
116 [tizen-secu-3]:     https://wiki.tizen.org/wiki/Security/Tizen_3.X_Overview         "Tizen 3 security overview"
117
118