The permissions

Permissions name

Permissions are simple strings called name of the permission or simply the permission. The string used could be any distinct string but we are using a naming scheme for it.

The permission names are URN of the form:

    urn:NID:permission:<api>:<level>:<hierarchical-name>

where the NID (the Namespace IDentifier) depends on the associated namespace.

The currently used NIDs are:

  • AGL: dedicated to AGL
  • redpesk: dedicated to redpesk

The permission names are made of NSS (the Namespace Specific String) starting with “permission:” and followed by colon separated fields.

The 2 first fields are <api> and <level> and the remaining fields are grouped to form the <hierarchical-name>.

    <api> ::= [ <pname> ]

    <level> ::= 1*<lower>

    <hierarchical-name> ::= <pname> 0*(":" <pname>)

    <pname> ::= 1*<pchars>

    <pchars> ::= <upper> | <lower> | <number> | <extra>

    <extra> ::= "-" | "." | "_" | "@"

By doing so, there is no need for the framework to keep installed permissions in a database.

The field <api> can be made of any valid character for NSS except the characters colon (:) and star (*). This field designates the api providing the permission. This scheme is used to deduce binding requirements from permission requirements. The field <api> can be the empty string when the permission is defined by the system or for an api itself.

The field <level> is made only of letters in lower case. The field <level> can only take the predefined values:

  • system
  • platform
  • partner
  • tiers
  • owner
  • public

The field <hierarchical-name> is made of <pname> separated by colons.

Example of permissions

Here is a list of some possible permissions.

  • urn:redpesk:permission::platform:no-oom

    Set OOMScoreAdjust=-500 to keep the out-of-memory killer away.

  • urn:redpesk:permission::partner:real-time

    Set IOSchedulingClass=realtime to give the process realtime scheduling.

    Conversely, not having this permission sets RestrictRealtime=on to forbid realtime features.

  • urn:redpesk:permission::public:display

    Adds the group “display” to the list of supplementary groups of the process.

  • urn:redpesk:permission::public:syscall:clock

    Without this permission SystemCallFilter=~@clock is set to forbid call to clock.

  • urn:redpesk:permission::public:no-htdocs

    The http directory served is not “htdocs” but “.”

  • urn:redpesk:permission::public:applications:read

    Allows to read data of installed applications (and to access icons).

  • urn:redpesk:permission::partner:service:no-ws

    Forbids a service to provide its API through websocket.

  • urn:redpesk:permission::partner:service:no-dbus

    Forbids a service to provide its API through D-Bus.

  • urn:redpesk:permission::system:run-by-default

    Starts automatically the application. Example: home-screen.

  • urn:redpesk:permission::partner:scope-platform

    Install the service at the scope of the platform.

  • urn:redpesk:permission::partner:tty

    Adds the group “tty” to the list of supplementary groups of the process.

  • urn:redpesk:permission::partner:dialout

    Adds the group “dialout” to the list of supplementary groups of the process.

  • urn:redpesk:permission::partner:video

    Adds the group “video” to the list of supplementary groups of the process.

  • urn:redpesk:permission::system:capability:keep-all

    Keeps all capabilities for the service. Note that implementing that permission is not mandatory or can be adapted for the given system.

  • urn:redpesk:permission:afm:system:widget

    Permission of the application framework

  • urn:redpesk:permission:afm:system:widget:detail

    Permission of the application framework

  • urn:redpesk:permission:afm:system:widget:start

    Permission of the application framework

  • urn:redpesk:permission:afm:system:widget:view-all

    Permission of the application framework

  • urn:redpesk:permission:afm:system:runner

    Permission of the application framework

  • urn:redpesk:permission:afm:system:runner:state

    Permission of the application framework

  • urn:redpesk:permission:afm:system:runner:kill

    Permission of the application framework

  • urn:redpesk:permission:afm:system:set-uid

    Permission of the application framework

  • urn:redpesk:permission:afm:system:widget:install

    Permission of the application framework

  • urn:redpesk:permission:afm:system:widget:uninstall

    Permission of the application framework