Added [in-progress] Developer Guides
[AGL/documentation.git] / docs / 2_Architecture_Guides / 2.2_Security_Blueprint / 5_Platform / 1.2.5.7_Users.md
1 ---
2 title: Users
3 ---
4
5 # Users
6
7 The user policy can group users by function within the car. For example, we can
8 consider a driver and his passengers. Each user is assigned to a single group to
9 simplify the management of space security.
10
11 ## Root Access
12
13 The main applications, those that provide the principal functionality of the
14 embedded device, should not execute with root identity or any capability.
15
16 If the main application is allowed to execute at any capability, then the entire
17 system is at the mercy of the said application's good behaviour. Problems arise
18 when an application is compromised and able to execute commands which could
19 consistently and persistently compromise the system by implanting rogue
20 applications.
21
22 It is suggested that the middleware and the UI should run in a context on a user
23 with no capability and all persistent resources should be maintained without any
24 capability.
25
26 One way to ensure this is by implementing a server-client paradigm. Services
27 provided by the system's drivers can be shared this way. The other advantage of
28 this approach is that multiple applications can share the same resources at the
29 same time.
30
31 <!-- section-config -->
32
33 Domain                | Object           | Recommendations
34 --------------------- | ---------------- | -----------------------------------------------------
35 Platform-Users-root-1 | Main application | Should not execute as root.
36 Platform-Users-root-2 | UI               | Should run in a context on a user with no capability.
37
38 <!-- end-section-config -->
39
40 Root access should not be allowed for the following utilities:
41
42 <!-- section-config -->
43
44 Domain                | `Utility` name | _State_
45 --------------------- | -------------- | -------------
46 Platform-Users-root-3 | `login`        | _Not allowed_
47 Platform-Users-root-4 | `su`           | _Not allowed_
48 Platform-Users-root-5 | `ssh`          | _Not allowed_
49 Platform-Users-root-6 | `scp`          | _Not allowed_
50 Platform-Users-root-7 | `sftp`         | _Not allowed_
51
52 <!-- end-section-config -->
53
54 Root access should not be allowed for the console device. The development
55 environment should allow users to login with pre-created user accounts.
56
57 Switching to elevated privileges shall be allowed in the development environment
58 via `sudo`.
59
60 --------------------------------------------------------------------------------
61
62 <!-- pagebreak -->
63
64 ## Capabilities
65
66 <!-- section-todo -->
67
68 Domain                        | Improvement
69 ----------------------------- | ------------------------
70 Platform-Users-Capabilities-1 | Kernel or Platform-user?
71 Platform-Users-Capabilities-2 | Add config note.
72
73 <!-- end-section-todo -->
74
75 The goal is to restrict functionality that will not be useful in **AGL**. They
76 are integrated into the **LSM**. Each privileged transaction is associated with
77 a capability. These capabilities are divided into three groups:
78
79 - e: Effective: This means the capability is “activated”.
80 - p: Permitted: This means the capability can be used/is allowed.
81 - i: Inherited: The capability is kept by child/subprocesses upon execve() for
82   example.