DA: Add exception check for time logic
[platform/upstream/connman.git] / doc / session-policy-format.txt
1 ConnMan policy file format
2 **************************
3
4 The session policy plugin allows to configure/provision a session.
5 ConnMan will be looking for policy files in STORAGEDIR/session_policy_local
6 which by default points to /var/lib/connman. Policy file names must
7 not include other characters than letters or numbers and must have
8 a .policy suffix. Policy files are text files.
9
10 It is possible to add, remove or update a policy file during run-time.
11 The corresponding sessions will be updated accordingly.
12
13 Policy group [policy_*]
14 =======================
15
16 Each policy group must start with as [policy_*] tag. '*' has no
17 semantic meaning but should consist just out of characters.
18
19 Required fields:
20
21 Exactly one and only one of the required fields need to be present
22 per policy group.
23
24 - uid: This policy group will be applied to any session
25   with given user ID.
26
27 - gid: This policy group will be applied to any session
28   with given group ID.
29
30 - selinux: This policy group will be applied to any session
31   with given SELinux context.
32
33 Allowed fields:
34
35 - AllowedBearers: see session-api.txt
36   The policy AllowedBearers overrules the settings done via
37   D-Bus. For example the policy AllowedBearers is 'ethernet' then
38   the D-Bus API will only accept an empty string or 'ethernet'.
39
40 - ConnectionType: see session-api.txt
41   The policy ConnectionType overrules the settings done via
42   D-Bus.
43
44 - Priority: A boolean which tells ConnMan to prefer the session
45   over other Sessions. This priority value is more for applications
46   that want to push themselves up in the asychronization notification
47   queue once a bearer becomes online.
48
49   This actual priority order also depends on the allowed bearers and
50   other factors. This setting is just a little indicator for one
51   application being notified before another one.
52
53 - RoamingPolicy: The allowed roaming behavior.
54
55   Valid policies are "national", "international", "default", "always"
56   and "forbidden".
57
58   "national" allows roaming within a country.  "international" allows
59   roaming in a country and between countries.
60
61   "default" is used to tell the session to use the global roaming
62   setting.
63
64   "always" will overwrite the default "forbidden" value which is
65   useful for emergency application.
66
67   Default value is "forbidden".
68
69 - EmergencyCall: A boolean which tells ConnMan whenever the
70   Connect() method is called for this session, all other
71   session are disconnected.
72
73   Note only services matching the AllowedBearers rule will be
74   considered.
75
76 Example
77 =======
78
79 example@example:[~]$ cat /var/lib/connman/session_policy_local/auser.policy
80 [policy_auser]
81 uid = auser
82 AllowedBearers = wifi cellular
83 RoamingPolicy = forbidden