MongoDB is an open-source document database that provides high performance, high availability, and automatic scaling. A record in MongoDB is a document, which is a data structure composed of field and value pairs. MongoDB documents are similar to JSON objects. The values of fields might include other documents, arrays, and arrays of documents.
This document provides information about the MongoDB connector, which facilitates automated interactions, with a MongoDB database using FortiSOAR™ playbooks. Add the MongoDB connector as a step in FortiSOAR™ playbooks and perform automated operations, such as inserting or updating documents, retrieving a list of all available collections from the MongoDB database, and querying the MongoDB database.
Connector Version: 1.0.0
Compatibility with FortiSOAR™ Versions: 4.10.3-161 and later
Compatibility with MongoDB Version: 3.6.5 and later
For the procedure to install a connector, click here.
For the procedure to configure a connector, click here.
In FortiSOAR™, on the Connectors page, select the MongoDB connector and click Configure to configure the following parameters:
Parameter | Description |
---|---|
Host | MongoDB server host details. Host details can be the host address, the hostname or IP address, or the Unix domain socket path of a single MongoDB or multiple MongoDB instances to connect to which you will connect and perform the automated operations. |
Database | MongoDB database to which you will connect and perform the automated operations and for which you will provide authentication details |
Username | Username that is used to access the MongoDB database to which you will connect and perform the automated operations. |
Password | Password that is used to access the MongoDB database to which you will connect and perform the automated operations. |
Port | Port number used for connecting to the MongoDB database. |
Auth Fields | Other authentication fields, if required to connect to the MongoDB database. For more details, see https://api.mongodb.com/python/current/examples/authentication.html. |
Verify SSL | Specifies whether the SSL certificate for the server is to be verified or not. By default, this option is set as True . |
The following automated operations can be included in playbooks and you can also use the annotations to access operations from FortiSOAR™ release 4.10.0 onwards:
Function | Description | Annotation and Category |
---|---|---|
Insert Documents | Adds data to the MongoDB database in MongoDB collection you have specified. | add_data Investigation |
Query Documents | Queries a MongoDB collection and retrieves data from the MongoDB database, based on the filter you have specified. | get_data Investigation |
Update Documents | Updates documents in the MongoDB collection you have specified, based on the filter you have specified. | update_data Investigation |
Delete Documents | Deletes all documents in the MongoDB collection you have specified, based on the filter you have specified. | delete_data Remediation |
Get Collections | Retrieves a list of all available collections from the MongoDB database. | list_tables Investigation |
Parameter | Description |
---|---|
Collection Name | Name of the collection in the MongoDB database in which you want to insert documents. |
Data | Data that you want to insert in the MongoDB database. |
The JSON output returns a Success
message if the data is successfully inserted in the MongoDB database or an Error
message containing the reason for failure.
Following image displays a sample output:
Parameter | Description |
---|---|
Collection Name | Name of the collection in the MongoDB database in which you want to query for documents. |
Filter | Filter criteria based on which you want to retrieve documents from the MongoDB database. |
The JSON output contains data retrieved from the MongoDB database based on the filter criteria you have specified.
Following image displays a sample output:
Parameter | Description |
---|---|
Collection Name | Name of the collection in the MongoDB database in which you want to update documents. |
Filter | Filter criteria to be applied to documents that you want to update in the MongoDB database. All documents that match the filter criteria that you have specified will be updated. |
Data to Update | Data that you want to update in the filtered documents. |
The JSON output returns a Success
message if the document(s) are successfully updated in the MongoDB database, based on the filter criteria you have specified, or an Error
message containing the reason for failure.
Following image displays a sample output:
Parameter | Description |
---|---|
Collection Name | Name of the collection in the MongoDB database from which you want to delete documents. |
Filter | Filter criteria to be applied to documents that you want to delete in the MongoDB database. All documents that match the filter criteria that you have specified will be deleted. |
The JSON output returns a Success
message if the document(s) are successfully deleted in the MongoDB database, based on the filter criteria you have specified, or an Error
message containing the reason for failure.
Following image displays a sample output:
None.
The JSON output contains a list of all available collections retrieved from the MongoDB database.
Following image displays a sample output:
The Sample - MongoDB - 1.0.0
playbook collection comes bundled with the MongoDB connector. This playbook contains steps using which you can perform all supported actions. You can see the bundled playbooks in the Automation > Playbooks section in FortiSOAR™ after importing the MongoDB connector.
Note: If you are planning to use any of the sample playbooks in your environment, ensure that you clone those playbooks and move them to a different collection since the sample playbook collection gets deleted during connector upgrade and delete.
MongoDB is an open-source document database that provides high performance, high availability, and automatic scaling. A record in MongoDB is a document, which is a data structure composed of field and value pairs. MongoDB documents are similar to JSON objects. The values of fields might include other documents, arrays, and arrays of documents.
This document provides information about the MongoDB connector, which facilitates automated interactions, with a MongoDB database using FortiSOAR™ playbooks. Add the MongoDB connector as a step in FortiSOAR™ playbooks and perform automated operations, such as inserting or updating documents, retrieving a list of all available collections from the MongoDB database, and querying the MongoDB database.
Connector Version: 1.0.0
Compatibility with FortiSOAR™ Versions: 4.10.3-161 and later
Compatibility with MongoDB Version: 3.6.5 and later
For the procedure to install a connector, click here.
For the procedure to configure a connector, click here.
In FortiSOAR™, on the Connectors page, select the MongoDB connector and click Configure to configure the following parameters:
Parameter | Description |
---|---|
Host | MongoDB server host details. Host details can be the host address, the hostname or IP address, or the Unix domain socket path of a single MongoDB or multiple MongoDB instances to connect to which you will connect and perform the automated operations. |
Database | MongoDB database to which you will connect and perform the automated operations and for which you will provide authentication details |
Username | Username that is used to access the MongoDB database to which you will connect and perform the automated operations. |
Password | Password that is used to access the MongoDB database to which you will connect and perform the automated operations. |
Port | Port number used for connecting to the MongoDB database. |
Auth Fields | Other authentication fields, if required to connect to the MongoDB database. For more details, see https://api.mongodb.com/python/current/examples/authentication.html. |
Verify SSL | Specifies whether the SSL certificate for the server is to be verified or not. By default, this option is set as True . |
The following automated operations can be included in playbooks and you can also use the annotations to access operations from FortiSOAR™ release 4.10.0 onwards:
Function | Description | Annotation and Category |
---|---|---|
Insert Documents | Adds data to the MongoDB database in MongoDB collection you have specified. | add_data Investigation |
Query Documents | Queries a MongoDB collection and retrieves data from the MongoDB database, based on the filter you have specified. | get_data Investigation |
Update Documents | Updates documents in the MongoDB collection you have specified, based on the filter you have specified. | update_data Investigation |
Delete Documents | Deletes all documents in the MongoDB collection you have specified, based on the filter you have specified. | delete_data Remediation |
Get Collections | Retrieves a list of all available collections from the MongoDB database. | list_tables Investigation |
Parameter | Description |
---|---|
Collection Name | Name of the collection in the MongoDB database in which you want to insert documents. |
Data | Data that you want to insert in the MongoDB database. |
The JSON output returns a Success
message if the data is successfully inserted in the MongoDB database or an Error
message containing the reason for failure.
Following image displays a sample output:
Parameter | Description |
---|---|
Collection Name | Name of the collection in the MongoDB database in which you want to query for documents. |
Filter | Filter criteria based on which you want to retrieve documents from the MongoDB database. |
The JSON output contains data retrieved from the MongoDB database based on the filter criteria you have specified.
Following image displays a sample output:
Parameter | Description |
---|---|
Collection Name | Name of the collection in the MongoDB database in which you want to update documents. |
Filter | Filter criteria to be applied to documents that you want to update in the MongoDB database. All documents that match the filter criteria that you have specified will be updated. |
Data to Update | Data that you want to update in the filtered documents. |
The JSON output returns a Success
message if the document(s) are successfully updated in the MongoDB database, based on the filter criteria you have specified, or an Error
message containing the reason for failure.
Following image displays a sample output:
Parameter | Description |
---|---|
Collection Name | Name of the collection in the MongoDB database from which you want to delete documents. |
Filter | Filter criteria to be applied to documents that you want to delete in the MongoDB database. All documents that match the filter criteria that you have specified will be deleted. |
The JSON output returns a Success
message if the document(s) are successfully deleted in the MongoDB database, based on the filter criteria you have specified, or an Error
message containing the reason for failure.
Following image displays a sample output:
None.
The JSON output contains a list of all available collections retrieved from the MongoDB database.
Following image displays a sample output:
The Sample - MongoDB - 1.0.0
playbook collection comes bundled with the MongoDB connector. This playbook contains steps using which you can perform all supported actions. You can see the bundled playbooks in the Automation > Playbooks section in FortiSOAR™ after importing the MongoDB connector.
Note: If you are planning to use any of the sample playbooks in your environment, ensure that you clone those playbooks and move them to a different collection since the sample playbook collection gets deleted during connector upgrade and delete.