SQLite Configuration Settings

The SQLite configuration settings contain:

You must specify the SQLite configuration settings in the XML Configuration file.

Security Settings

Security information for the database can be set in an XML file called the configuration file, which is given as an input to the SDB creator tool. The security information includes policies, and the capability types of the policies. Policies are used to define the applications that can access and modify the SQLite database.

Policy

The policy types specified by the type attribute are listed in the following table:

Policy TypeDescriptionUsage

Default security policy

Indicates that this policy defines the default database access policy. If an operation is attempted, for which no policy has been specified, the default policy will be used.

<policy type="default">

Schema security policy

Indicates that this policy defines those applications that can update the database schema.

<policy type="schema">

Read security policy

Indicates that this policy defines those applications that can read from the database.

<policy type="read">

Write security policy

Indicates that this policy defines those applications that can write to the database.

<policy type="write">

Each policy can have up to three options to define the policy type. The following table lists the various options that can be used to define the policy type:

ValueDescriptionExample

Always fail

Operations categorized with this security policy always fail the security check.

<policy type="default" always="fail"/>

Always pass

Operations categorized with this security policy always pass the security check.

<policy type="read" always="pass"/>

Up to seven capabilities

Operations categorized with this security policy can have up to seven capabilities.

For information about the various capabilities, refer to Capability.

<policy type = “schema”>
      <capability type="TrustedUI"/>
      <capability type="PowerMgmt"/>
      <capability type="TCB"/>
      <capability type="DRM"/>
      <capability type="ProtServ "/>
      <capability type="SwEvent"/>
      <capability type="MultimediaDD"/>
 </policy>

Secure ID (SID) and up to three capabilities

Operations categorized with this security policy can have up to three capabilities and the application's Secure ID.

<policy SID="FFFF" type="write">
      <capability type="TrustedUI"/>
      <capability type="PowerMgmt"/>
      <capability type="TCB"/>
 </policy>

Vendor ID (VID) and up to three capabilities.

Operations categorized with this security policy can have up to three capabilities and the application's Vendor ID.

<policy VID="AAAA" type="write">
      <capability type="TrustedUI"/>
      <capability type="PowerMgmt"/>
      <capability type="DRM"/>
 </policy>

Capability

The following are the set of capability types that can be assigned to a given policy:

ValueDescription

TCB

Grants write access to executables, and shared read-only resources.

CommDD

Grants direct access to all communication equipment device drivers.

PowerMgmt

Grants the right to end any process in the system, to switch-off unused peripherals, to switch the machine into standby state, wake it up again, or power it down completely.

MultimediaDD

Grants access to critical multimedia functions, such as direct access to associated device drivers, high priority access to multimedia APIs, and for pre-empting lower priority users.

ReadDeviceData

Grants read access to network operator, phone manufacturer and device confidential settings or data.

WriteDeviceData

Grants write access to settings that control the behaviour of the device.

DRM

Grants access to the protected content.

TrustedUI

Grants the right to create a trusted UI session, and to display dialogs in a secure UI environment.

ProtServ

Grants the right to a server to register with a protected name.

DiskAdmin

Grants access to disk administration operations that affect more than one file or one directory (or overall file-system integrity or behaviour, and so on).

NetworkControl

Grants the right to modify or access network protocol controls.

AllFiles

Grants read access to the entire file system. Grants write access to the private directories of other processes.

SwEvent

Grants the right to generate software key and pen events, and to capture any of them regardless of the status of the application.

NetworkServices

Grants access to the remote services irrespective of their physical location. In most cases, location of the remote services is unknown to the phone user, and such services may cost the phone user.

LocalServices

Grants access to remote services in the close vicinity of the phone. The location of the remote service is well known to the phone user.

ReadUserData

Grants the phone user read access to confidential data.

WriteUserData

Grants write access to user data. This capability supports the management of the integrity of user data.

Location

Grants access to the location of the device.

SurroundingsDD

Grants access to logical device drivers that provide input information about the surroundings of the device.

UserEnvironment

Grants access to live confidential information about the user and the immediate environment. This capability protects privacy.

None

No capability specified.

Database Configuration Settings

Page size

Page size is the database page size in bytes. The syntax for this configuration setting is:

<configuration name="page_size" value="4096"/>

The page_size is set before the database file gets created. The page size must be a power of two greater than or equal to 512, and less than or equal to 4096. The default value is 1024.

Encoding

The two possible types of encoding are: UTF_8 and UTF_16.

The syntax for setting this configuration is:

<configuration name="encoding" value="UTF_16"/> or
           <configuration name="encoding" value="UTF_8"/>

The default value is UTF_16.