Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

SXEPolicyManager Class Reference
[QtPkgManagementModule]

The SXEPolicyManager class provides a management interface for Qt Extended Safe Execution Environment policies More...

    #include <SXEPolicyManager>

Inherits QObject.

Public Functions

  • 29 public functions inherited from QObject

Public Slots

  • 1 public slot inherited from QObject

Static Public Members

  • 4 static public members inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 signal inherited from QObject
  • 1 public type inherited from QObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The SXEPolicyManager class provides a management interface for Qt Extended Safe Execution Environment policies

In order for Qtopia Safe Execution Environment (SXE) programs to function they must request services and other functionality from other components of Qtopia. However to provide a level of security for the SXE, requests must only be actioned for those programs which are authorised.

The SXEPolicy manager provides an interface to the Qt Extended system policy files which record which programs are authorised for what service requests.

In the context of SXE Policy, the word service request is intended to be more general than Qt Extended Services. Policy does cover these services, but it also is designed to work with any type of inter-process communication which maybe described by a string name.

In the context of SXE Policy, a program is a number of (at least one) binary executable files, and support files that are installed onto the storage media available to the Qt Extended device. Any binary installed with the program or executing on its behalf is identified by that program's unique Program Identity, a number between 1 and 255 inclusive. Program Identity 0 is reserved for the Qt Extended server.

SXE Policies provide a list of profile names for each Program Identity. Each profile name stands for a list of service request names. Some examples of service request names are:

  • openURL(QString url)
  • removeEvent(PimEvent)
  • mtabChanged()

The profile names are documented in the SXE Documentation but as an example the openURL(QString) request is in the web profile, and the removeEvent(PimEvent) request is in the admin profile; and the mtabChanged() request is in the comm profile.

Profiles serve as a level of indirection to lessen the impact of changes in the service names or structures.

To use the SXEPolicyManager class first obtain the Program Identity, then call findPolicy() to get a list of the profile names authorized for the program. In attempting to decide whether to action a request these profile names may be used in application program logic:

    QStringList profs = SXEPolicyManager::getInstance()->findPolicy( progId );
    if ( profs.contains( "web" ))
        processWebRequest();

To find if a particular service request name is allowed call findRequest() to see if a profile authorizes a particular request.

A program may be authorized under zero, one or more than one profile. A request will generally be only included in one profile, but there is nothing to prevent it being present in more than one.

See also QPackageRegistry.


Member Function Documentation

SXEPolicyManager::~SXEPolicyManager ()

Destruct a SXEPolicyManager.

QStringList SXEPolicyManager::findPolicy ( unsigned char progId )

Given the progId return a list of the profile names which that program is authorised to access. The information is read from the Qt Extended SXE policy file [qt_prefix]/etc/sxe.policy. A caching algorithm is used to lessen the number of file accesses required for recurring lookups. The cache is checked for freshness against this files last modify time, as the Qt Extended installer may have changed it since it was last accessed.

QString SXEPolicyManager::findRequest ( QString request, QStringList prof )

Given a request return the profile name containing that request. If the request exists in multiple profiles, this method will return a random profile name which contains that request. If the request is not found, a null string is returned.

If the list prof is non-empty, just those profiles are searched, and a profile name from amongst them returned if the request is found. If the prof list is empty (the default) all profiles are searched.

The meaning of not found (null string return) is defined by the caller. For a secure system not found equals deny.

Note that for a worst case, ie no prof is provided, and the messages request is not found this method will first check its internal cache and then scan the entire file on storage before determining the not found result. For this reason the profile lists should be carefully chosen so that common messages do not cause a worst case.

To avoid worst cases two synthetic profiles "allow" and "deny" should be used to white-list and black-list common service requests.

The search order is

item searchedconditions
cacheif in cache AND if either the prof is empty, OR prof contains the cached result (counting "deny" or "allow" as listed in prof)
profif non-empty
"deny"if exists
"allow"if exists
sxe.profile on diskalways on fall-thru

Note that a cache freshness check is not performed since the sxe.profiles file is not altered during run-time.

SXEPolicyManager * SXEPolicyManager::getInstance ()   [static]

Return an pointer to this processes SXEPolicyManager instance.

void SXEPolicyManager::policyCheck ( QTransportAuth::Data & d, const QString & req )   [slot]

This slot is for receiving signals from a QTransportAuth object alerting the presence of an incoming message for authentication against policy. The QTransportAuth should already have taken care of confirming the identity of message originator, and validity of the message transport.

Note that any number of authorisers can connect to this slot. If any one of them sets the permit Status bits to Deny, then the request will be denied regardless of other authorisers. In other words all must either provide Allow status (or leave the status unchanged) for the request to pass.

The QTransportAuth::Data item d is the connection data representing the source of the req.

void SXEPolicyManager::resetDateCheck ()   [slot]

Receive a time-out signal to reset the checkDate flag. This flag prevents the date check mechanism from DoS'ing the out-of-date code.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 64
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le Qt Labs au hasard

Logo

Construire l'avenir : (ré-)introduction aux composants de Qt Quick

Les Qt Labs sont les laboratoires des développeurs de Qt, où ils peuvent partager des impressions sur le framework, son utilisation, ce que pourrait être son futur. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web