980f634d8995dc5145535b9afcb51434f18514fa
[src/app-framework-main.git] / doc / afm-system-daemon.md
1
2 The afm-system-daemon
3 =====================
4
5     version: 1
6     Date:    14 March 2016
7     Author:  José Bollo
8
9
10 Organisation of directory of applications
11 =========================================
12
13 The main path for applivcations are: APPDIR/PKGID/VER.
14
15 Where:
16
17  - APPDIR is as defined above
18  - PKGID is a directory whose name is the package identifier
19  - VER is the version of the package MAJOR.MINOR
20
21 This organisation has the advantage to allow several versions to leave together.
22 This is needed for some good reasons (rolling back) and also for less good reasons (user habits).
23
24 Identity of installed files
25 ---------------------------
26
27 All the files are installed as the user "userapp" and group "userapp".
28 All files have rw(x) for user and r-(x) for group and others.
29
30 This allows any user to read the files.
31
32
33 Labelling the directories of applications
34 -----------------------------------------
35
36
37 Organisation of data
38 ====================
39
40 The data of a user are in its directory and are labelled using the labels of the application
41
42 Setting Smack rules for the application
43 =======================================
44
45 For Tizen, the following rules are set by the security manager for each application.
46
47     System ~APP~             rwx
48     System ~PKG~             rwxat
49     System ~PKG~::RO         rwxat
50     ~APP~  System            wx
51     ~APP~  System::Shared    rxl
52     ~APP~  System::Run       rwxat
53     ~APP~  System::Log       rwxa
54     ~APP~  _                 l
55     User   ~APP~             rwx
56     User   ~PKG~             rwxat
57     User   ~PKG~::RO         rwxat
58     ~APP~  User              wx
59     ~APP~  User::Home        rxl
60     ~APP~  User::App::Shared rwxat
61     ~APP~  ~PKG~             rwxat
62     ~APP~  ~PKG~::RO         rxl
63
64 Here, ~PKG~ is the identifier of the package and ~APP~ is the identifier of the application.
65
66 What user can run an application?
67 =================================
68
69 Not all user are able to run all applications.
70 How to manage that?
71
72
73
74
75 [meta-intel]:       https://github.com/01org/meta-intel-iot-security                "A collection of layers providing security technologies"
76 [widgets]:          http://www.w3.org/TR/widgets                                    "Packaged Web Apps"
77 [widgets-digsig]:   http://www.w3.org/TR/widgets-digsig                             "XML Digital Signatures for Widgets"
78 [libxml2]:          http://xmlsoft.org/html/index.html                              "libxml2"
79 [openssl]:          https://www.openssl.org                                         "OpenSSL"
80 [xmlsec]:           https://www.aleksey.com/xmlsec                                  "XMLSec"
81 [json-c]:           https://github.com/json-c/json-c                                "JSON-c"
82 [d-bus]:            http://www.freedesktop.org/wiki/Software/dbus                   "D-Bus"
83 [libzip]:           http://www.nih.at/libzip                                        "libzip"
84 [cmake]:            https://cmake.org                                               "CMake"
85 [security-manager]: https://wiki.tizen.org/wiki/Security/Tizen_3.X_Security_Manager "Security-Manager"
86 [app-manifest]:     http://www.w3.org/TR/appmanifest                                "Web App Manifest"
87 [tizen-security]:   https://wiki.tizen.org/wiki/Security                            "Tizen security home page"
88 [tizen-secu-3]:     https://wiki.tizen.org/wiki/Security/Tizen_3.X_Overview         "Tizen 3 security overview"
89
90
91