KVGroups
Bravura Security Fabric uses Key-Value Groups (KVGroups) as a way to structure and communicate data. KVGroups are used extensively for inter-process communication. Plugins, for example, read a KVGroup on standard input, process the information, and write a KVGroup on standard output.
You use KVGroups to write configuration files and scripts for connectors (Lotus Notes, LDAP, IBM OS/400, IBM DB2/UDB), utility programs (idtrack), and the Bravura Security Fabric GUI.
Read the following sections to learn how to write and interpret KVGroups.
See also
There are many PSLang functions to support the reading, creation, and manipulation of KVGroups. See the PSLang Reference Manual (pslang.pdf) for more information.
Unicode characters in configuration files and PSLang scripts
There are some connectors, utilities, and plugins that support the new KVGroup 2.0 format. This includes the Lotus Domino Server connector, Lotus Notes ID Files connector, Unix Listener, and the Database Service. PSLang files and configuration files (in KVGroup 2.0 format) support Unicode characters.
When saving information in a text file where Unicode characters are included, the file must include the byte-order mark at the beginning of the file. Text editors such as notepad hide this from the user and pose no problems when you modify and save configuration files.
Bravura Security Fabric consumes the byte-order mark and interprets the rest of the information as defined by the byte-order mark. If no byte-order mark is present, Bravura Security Fabric will read the information as a UTF-8 format. ASCII is a subset of the UTF-8 format; hence no conversion from ASCII is required. If information is generated in utf-16 or utf-32, the byte-order mark is required for Bravura Security Fabric to interpret the information correctly.
KVGroup syntax
A KVGroup has a key, a name, and its contents. It contains a set of key-value pairs, as well as a set of “inner” KVGroups. There is no limit to the level of nested KVGroups.
Write a KVGroup as follows:
"<key>" "<name>" = {
<contents>
...
} You write a key-value pair as follows:
"<key>" = "<value>"
Note
The word "key" has a dual use. A group has a key and the items contained within a group (pairs and inner groups) also have keys.
The following example illustrates how a KVGroup can contain multiple groups and key-value pairs:
"capitals" "world capitals grouped by continent" = {
"NA" "North America" = {
"USA" = "Washington"
"Canada" = "Ottawa"
}
"Eur" "Europe" = {
"Britain" = "London"
}
} KVGroup libraries
KVGroup helper libraries for Python and Perl are available.
Python and Perl libraries are installed in the \<instance>\lib\ directory. The files within \<instance>\lib\ work with the 32-bit version of the interpreters. The files within \<instance>\lib\\x64 work with the 64-bit version of the interpreters.
The hid_kvgroup Python module can be imported to provide a KVG class that can be used to read/write KVGroups.
For example:
KVGroups. For example:
import hid_kvgroup
testkvg = hid_kvgroup.kvg()
testkvg.setKey("thekey")
testkvg.getKey()The hid_kvgroup_perl package can be imported to read/write KVGroups. For example:
require hid_kvgroup_perl; my $testkvg = hid_kvgroup_perl::kvg->new; $testkvg->setKey(’thekey’); print $testkvg->getKey();