Skip to main content

Python Script (Ticket)

Connector name

pxpython

Connector type

Executable

Type (UI field value)

Python Script (Ticket)

Target system versions supported / tested

Use the pxpython program and its associated configuration file (pxpython.py) as the basis for a generic program to handle events on the Bravura Security Fabric server.

Connector status / support

Bravura Security-Verified

This connector has been tested and is fully supported by Bravura Security.

Installation / setup

Interface programs are installed in the interface directory.

Modify the sample pxpython.py script included in the samples directory, and copy it to the \<instance>\script\ directory.

Upgrade notes

Added the alternate pxpython connectors in Connector Pack 4.5.0.

For older versions of Bravura Security Fabric , there are also alternate versions of the pxpython connector located in the interface\alt directory that are compatible for specific Python versions.

The following sections show you how to configure the event actions interface for Bravura Security Fabric by:

  • Setting up requirements

  • Adding the ticket target system in Bravura Security Fabric

  • Writing a configuration file for event actions

See also

Script Systems > Python Script shows you how to target applications using a Python script to perform Bravura Security Fabric operations.

Preparation

Before targeting an application that uses the Python interface script:

  • Install required software.

  • Set up a target system administrator.

Installing required software

Ensure that the following are installed on all Bravura Security Fabric servers:

  • Python 3.11.2+

  • Any required Python modules

Note

Ensure that Python is installed for all users. Python installs in the context of the current user by default. You must choose to do a custom install, then select "all users" when the selection becomes available. This will allow the Bravura Security Fabric service user (psadmin) account to have appropriate access to the Python installation.

It is recommended to add Python to the system PATH. This may also be added by selecting the option for "Add Python 3.11 to PATH" during the Python installation.

Configuring a target system administrator

In some cases, Bravura Security Fabric uses a designated account (for example, psadmin) with a Python scripted application.

Ensure that the designated account can log into the application from the Bravura Security Fabric server, and that the account has the necessary privileges.

Ensure that you set and note the account’s password. You will be required to enter the login ID and password when you add the target system to Bravura Security Fabric .

Otherwise, when a designated account is not required, the administrator credentials can be left blank.

Targeting an application

Bravura Security Fabric provides the option of using the ticket target system name in event action fields in the Manage the system (PSA) module or Configure event (ITSM) module, rather than the program name. The security benefit is that all sensitive information (server address, admin credentials) is automatically passed to the program, rather than stored in the .py file in plain text.

For each application that uses a Python script to handle events, add a target system in Bravura Security Fabric (Manage the System > Resources > Target systems).

  • Type is Python Script (Ticket) .

  • Address lists Other settings to be passed to the Python script file. You must enter the settings in KVGroup format:

    {setting1=value;setting2=value;}

    For example:

    {hostname=pythonapp;}

    If the script does not require additional settings, set the address line to an empty KVGroup:

    {}

  • Administrator ID and Password is the login ID and password for the target system administrator you configured earlier. If the target system does not require administrative credentials, set the Administrator ID and Password to a non-empty value.

Once the target is added, you can use the target ID to configure event actions in the Manage the system (PSA) module or Configure event (ITSM) module.

Configuring event actions

Write a pxpython.py script file, using the Python scripting language, to configure event actions triggered by the pxpython program. Modify the sample script included in the samples directory, and copy it to the \<instance>\script\ 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.

When you configure an event, you enter the program name or the target ID you set up earlier.

In both cases, the program looks for the default script with the matching name.

You can write an alternative configuration file; for example when you have multiple targets of the same type. When you configure an event, you specify the file using the -cfg parameter; for example:

  • pxpython.exe -cfg myfile.py

    or

  • MYPYTHON -cfg myfile.py