path: root/doc
diff options
authorDaniel Wagner <>2013-05-31 07:13:38 (GMT)
committerPatrik Flykt <>2013-05-31 11:50:51 (GMT)
commitdf1a4cb94989da8ba5fe8bb29e1e1d7d0ad5fd52 (patch)
treec771d9901a5c58afd6fa3bcebf2221ca2ac48dde /doc
parent7eca790d67e3138b5196b26c4fe916c93e2b2513 (diff)
doc: Document session policy file format
Diffstat (limited to 'doc')
1 files changed, 83 insertions, 0 deletions
diff --git a/doc/session-policy-format.txt b/doc/session-policy-format.txt
new file mode 100644
index 0000000..ecfbce0
--- /dev/null
+++ b/doc/session-policy-format.txt
@@ -0,0 +1,83 @@
+ConnMan policy file format
+The session policy pluging allows to configure/provision a session.
+ConnMan will be looking for policy files in STORAGEDIR/session_policy_local
+which by default points to /var/lib/connman. Policy file names must
+not include other characters than letters or numbers and must have
+a .policy suffix. Policy files are text files.
+It is possible to add, remove or update a policy file during run-time.
+The corresponding sessions will be updated accordingly.
+Policy group [policy_*]
+Each policy group must start with as [policy_*] tag. '*' has no
+semantic meaning but should consist just out of characters.
+Required fields:
+Exactly one and only one of the required fields need to be present
+per policy group.
+- uid: This policy group will be applied to any session
+ with given user ID.
+- gid: This policy group will be applied to any session
+ with given group ID.
+- selinux: This policy group will be applied to any session
+ with given SELinux context.
+Allowed fields:
+- AllowedBearers: see session-api.txt
+ The policy AllowedBearers overrules the settings done via
+ D-Bus. For example the policy AllowedBearers is 'ethernet' then
+ the D-Bus API will only accept an empty string or 'ethernet'.
+- ConnectionType: see session-api.txt
+ The policy ConnectionType overrules the settings done via
+ D-Bus.
+- Priority: A boolean which tells ConnMan to preferred the session
+ over other Sessions. This priority value is more for application
+ that want to push themselves up in the asychronization notification
+ queue once a bearer becomes online.
+ This actual priority order also depends on the allowed bearers and
+ other factors. This is setting is just a little indicator of one
+ application being notified before another one.
+- RoamingPolicy: The allowed roaming behavior.
+ Valid policies are "national", "international", "default", "always"
+ and "forbidden".
+ "national" allows roaming within a country. "international" allows
+ roaming in a country and between countries.
+ "default" is used to tell the session to use the global roaming
+ setting.
+ "always" will overwrite the default "forbidden" value which is
+ useful for emergency application.
+ Default value is "forbidden".
+- EmergencyCall: A boolean which tells ConnMan whenever the
+ Connect() method is called for this session, all other
+ session are disconnected.
+ Note only services matching the AllowedBearers rule will be
+ considered.
+example@example:[~]$ cat /var/lib/connman/session_policy_local/auser.policy
+uid = auser
+AllowedBearers = wifi cellular
+RoamingPolicy = forbidden