Prepare the Integration with systemd
[src/app-framework-main.git] / docs / permissions.md
1 The permissions
2 ===============
3
4
5 Permission's names
6 ------------------
7
8 The proposal here is to specify a naming scheme for permissions
9 that allows the system to be as stateless as possible. The current
10 current specification includes in the naming of permissions either
11 the name of the bound binding when existing and the level of the
12 permission itself. Doing this, there is no real need for the
13 framework to keep updated a database of installed permissions.
14
15 The permission names are [URN][URN] of the form:
16
17   urn:AGL:permission:<binding>:<level>:<hierarchical-name>
18
19 where "AGL" is the NID (the namespace identifier) dedicated to
20 AGL (note: a RFC should be produced to standardize this name space).
21
22 The permission names are made of NSS (the namespace specific string)
23 starting with "permission:" and followed by colon separated
24 fields. The 2 first fields are <binding> and <level> and the remaining
25 fields are gouped to form the <hierarchical-name>.
26
27         <binding> ::= [ <pname> ]
28         
29         <pname> ::= 1*<pchars>
30         
31         <pchars> ::= <upper> | <lower> | <number> | <extra>
32         
33         <extra> ::= "-" | "." | "_" | "@"
34
35 The field <binding> can be made of any valid character for NSS except
36 the characters colon and star (:*). This field designate the binding
37 providing the permission. It is use to deduce binding requirements
38 from permission requirements. The field <binding> can be the empty
39 string when the permission is defined by the AGL system itself.
40 The field <binding> if starting with the character "@" represents
41 a transversal permission not bound to any binding.
42
43         <level> ::= 1*<lower>
44
45 The field <level> is made only of letters in lower case.
46 The field <level> can only take some predefined values:
47 "system", "platform", "partner", "tiers", "owner", "public".
48
49         <hierarchical-name> ::= <pname> 0*(":" <pname>)
50
51 The field <hierarchical-name> is made <pname> separated by
52 colons. The names at left are hierarchically grouping the
53 names at right. This hierarchical behaviour is intended to
54 be used to request permissions using hierarchical grouping.
55
56 Permission's level
57 ------------------
58
59
60 [URN]: https://tools.ietf.org/rfc/rfc2141.txt "RFC 2141: URN Syntax"
61