The preferences StorageProvider uses the same layout as the Equinox UserAdmin implementation.
The layout is quite straightforward: one root contains Preferences objects for all roles - users as well as groups. Groups only differ from users by having a members sub-node.
A user preference node has the role-name as name. It also has an type attribute that specifies the role type (user or group).
User properties and credentials are stored in two sub-nodes: each of those nodes has a attribute with the property name and value, a types sub-node contains an attribute with the property name and an boolean indicator for its type.
User Elmer from the example in chapter 107.3.2 of the OSGI companion spec would be stored like:
- <root node> - elmer - type = 1 - properties - types fullName = true - fullName = Elmer Fudd - credentials - types pwd = false - pwd = ...
- <root node> - alarmSystemControl ... type, properties and credentials as above ... - members - residents = false - administrators = true