This repository contains four Python scripts for managing Trend Micro Deep Security connector passwords. These scripts allow you to:
- Retrieve a list of connector IDs (for AD Sync, vSphere, and NSX Manager) from Deep Security Manager.
- Change the password for each connector type.
Note: These scripts are provided as examples and are untested. Please review and test them in a safe environment before applying them in production.
-
Python 3.x
-
Deep Security Python SDK: Install via pip:
pip install deepsecurity
-
Trend Micro Deep Security Manager with API access.
Each script requires:
- Your Deep Security Manager’s API base URL (e.g.,
https://your-dsm-url:443/api
) - A valid Deep Security API key to authenticate API requests
Script: ListConnectorIDs.py
This script retrieves the connector IDs for AD Sync, vSphere, and NSX Manager connectors. Use it to gather the IDs needed for the password change scripts.
The output will display connector IDs organized by type, like so:
AD Sync Connector IDs:
ID: 1, Name: AD_Sync_Connector_1
vSphere Connector IDs:
ID: 5, Name: vSphere_Connector_1
NSX Manager Connector IDs:
ID: 8, Name: NSX_Manager_1
- Update
YOUR_API_KEY_HERE
with your Deep Security API key. - Run the script:
python ListConnectorIDs.py
Script: ADSyncConnectorPW.py
This script updates the password for a specific AD Sync connector in Deep Security Manager.
- Retrieve the connector ID using
ListConnectorIDs.py
. - Update
YOUR_API_KEY_HERE
with your API key and replaceconnector_id_ldap
with the correct connector ID. - Set the new password in
NEW_PASSWORD_HERE
. - Run the script:
python ADSyncConnectorPW.py
Script: VSphereConnectorPW.py
This script changes the password for a specific vSphere connector.
- Retrieve the connector ID using
ListConnectorIDs.py
. - Update
YOUR_API_KEY_HERE
with your API key and replaceconnector_id_vsphere
with the correct connector ID. - Set the new password in
NEW_PASSWORD_HERE
. - Run the script:
python VSphereConnectorPW.py
Script: NSXConnectorPW.py
This script changes the password for a specific NSX Manager connector.
- Retrieve the connector ID using
ListConnectorIDs.py
. - Update
YOUR_API_KEY_HERE
with your API key and replacensx_manager_id
with the correct connector ID. - Set the new password in
NEW_PASSWORD_HERE
. - Run the script:
python NSXConnectorPW.py
- Untested Scripts: These scripts are untested; validate them in a development environment before using them in production.
- API Key Security: Ensure your API key is kept secure and do not hard-code sensitive information in production scripts.
For more information on Trend Micro Deep Security API usage, refer to the official Deep Security API documentation.