Buxton

From Tizen Wiki
Jump to: navigation, search

Buxton

Buxton

Buxton offers the latest in secure and performant configuration management. It features a layered approach to configuration storage,
with each layer containing an arbitrary number of groups, each of which may contain key-value pairs.


Mandatory Access Control (MAC) is implemented at the group level and at the key-value level.

Currently, buxton uses Smack to enforce MAC.

 Buxton provides a number of useful features, including:
- A Layer-based system providing user isolation (read more in Buxton::Layers)
- Smack-aware security enforcement (read more in Buxton::Security)
- Access via command-line (buxtonctl), or programmatically via the C API (see below).

VConf Conversion Guide

For a guide offering insight and recommendations in converting a Tizen vconf-based app over to Buxton,
the attached PDF guide may be useful to you.

https://wiki.tizen.org/w/images/0/07/Buxton_guide.pdf

Architecture

Layers, Groups and Keys

Layers

Layers: What are they and what do they enable?

Layers are a means of separating sets of keys, allowing a sys-admin or OEM to easily assign system-wide
defaults for given values, or allow each user of a system to select their own default settings. From a broader
perspective, layers are also divided into System and User layers.

The default tizen.conf file specifies 4 layers, but this can be modified as desired:

  "Name": Type         - Description
---------------------------------------
"base": System layer - The Operating System configuration layer
"isp" : System layer - ISP specific settings
"temp": System layer - A termporary layer for scratch settings and data
"user": User layer - Per-user settings

Groups

What are they and what do they enable?

Groups are collections of Keys. All keys within a group share the same Smack label,
allowing for easy modification of access control for a group of keys

Keys

Keys and Key names
A Buxton Key is the atomic unit for data storage in Buxton, consisting of a

   Key Name : Key Value : Key Type

A Key Name can be any string

A Key Value can be any valid value given the limitations of the Key Type

 A Key Type can be any of the following:
   STRING, /**<Represents type of a string value */
   INT32, /**<Represents type of an int32_t value */
   UINT32, /**<Represents type of an uint32_t value */
   INT64, /**<Represents type of a int64_t value */
   UINT64, /**<Represents type of a uint64_t value */
   FLOAT, /**<Represents type of a float value */
   DOUBLE, /**<Represents type of a double value */
   BOOLEAN, /**<Represents type of a boolean value */

Programmatically, a Buxton key can be created with the following:

    key = buxton_key_create("hello", "test", "base", INT32);

C API

API

API functions

  Client connections
      buxton_open(3) — Open a buxton client connection
      buxton_close(3) — Close a buxton client connection
  BuxtonKey utility functions
      buxton_key_create(3) — Create a client-side key (BuxtonKey)
      buxton_key_free(3) — Free a BuxtonKey
      buxton_key_get_type(3) — Get the type member of a BuxtonKey
      buxton_key_get_layer(3) — Get the layer member of a BuxtonKey
      buxton_key_get_group(3) — Get a group member of a BuxtonKey
      buxton_key_get_name(3) — Get a name member of a BuxtonKey
  Group storage and manipulation
      buxton_create_group(3) — Create a group within a layer
      buxton_remove_group(3) — Remove a group within a layer
      buxton_set_label(3) — Set the Smack label for a group
  Key storage and manipulation
      buxton_set_value(3) — Set the value for a key
      buxton_get_value(3) — Get the value of a key
      buxton_unset_value(3) — Unset the value for a key
      buxton_set_label(3) — Set the Smack label for a key
  Notifications
      buxton_register_notification(3) — Register for a key notification
      buxton_unregister_notification(3) — Unregister for a key notification
      buxton_handle_response(3) — Notification response helper
  Callbacks
      buxton_response_status(3) — Get the status for a BuxtonResponse in a callback
      buxton_response_key(3) — Fetch the BuxtonKey within a callback
      buxton_response_type(3) — Fetch the response type within a callback
      buxton_response_value(3) — Fetch the response value within a callback
  Configuration
      buxton_set_conf_file(3) — Set the path to the Buxton configuration file


Sample Buxton Usage

Click for Sample Usage


Resources