Skip to main content

XML Scripts

Integration with the XML-RPC Web Service uses a PSLang configuration file that includes a KVGroup for each operation and connection details.

Read this chapter to learn more about the functions and global variables used by agtxml . For complete details about KVGroups refer to the PSLang Reference Manual (pslang.pdf).

Script files

The agent reads a script file with a KVGroup that defines the functions. The agent refers to functions that you implement in the script and interacts with the Web Service for each agent operation. Your script must be located in the \<instance>\script\ directory on the Bravura Security Fabric server.

A sample script (agtxml.cfg) is located in the samples directory. If you cannot find the sample file, try re-running setup to modify your installation. Sample files are automatically installed with complete (typical) installations. You can select them in custom installations.

Caution

Any sample script should be modified to fit your environment and prevent security exploits.

Writing a script

Write scripts for the XML agent (agtxml) using a KVGroup. The KVGroup includes the following key-values and sub KVGroups.

  • serverUrl The URL that Services the XML requests.

  • serverType The server type that specifies the details on message construction and transmission.

  • global The sub KVGroup that defines encoding, responses, and namespaces used by the XML web server.

  • operations The sub KVGroup that includes all operations supported by the XML web Service that the agent can execute.

Global configuration

  • body A sub KVGroup that describes the XML body for all operations.

  • element A sub KVGroup that describes the XML elements for all operations.

  • namespaces A sub KVGroup that describes the namespaces of the XML messages.

  • response A sub KVGroup that describes the responses for all operations.

Operation configuration

In order for agtxml to perform an agent operation, you must configure the corresponding operation KVGroup in your script under the "operations" KVGroup. You write these sub KVGroups to provide interaction details between Bravura Security Fabric and the target.

Additionally, the login and logout operations are executed (if present in the script). The login is executed proceeding an operation call. The logout is execute succeeding an operation call.

An operation KVGroup includes the following key-values and sub KVGroups:

  • active boolean; if true, the operation is active and supported

  • contentType the mime type sent on the HTTP request

  • method the method specified for the HTTP request (POST is currently the only supported method)

  • trueval The value that represents true for "is" operations

  • successval The expected value to match with $issuccess in the response

  • request The sub KVGroup that maps to the XML request to the web Service

  • response The sub KVGroup that maps the XML response from the web Service

The "request" KVGroup describes the header and body of the XML message. Local variables or built-in variables can be used to substitute text with a session key or credentials, respectively.

The following built-in variables are available for replacement:

  • $adminid Administrator ID

  • $adminpw Administrator password

  • $sysid System account ID

  • $syspw System account password

  • $userid Profile ID

  • $fullname Full name of the profile

  • $acctid Account ID

  • $shortid Short ID of the account

  • $newpw New password of the user

  • $oldpw Old/Current password of the user

  • $moduleuid Account ID of the template account

  • $groupid Group ID of the managed group

  • $groupname Group description of the managed group

  • $session Session ID

The "response" KVGroup describes the parsing of the response from the XML Web Service.