Fortinet Document Library

Version:


Table of Contents

1.0.0
Copy Link

About the connector

SQLite is a relational database management system contained in the C programming library. SQLite is a popular choice for embedded database software for local/client storage in application software such as web browsers. It is arguably the most widely deployed database engine, as it is used today by several widespread browsers, operating systems, and embedded systems (such as mobile phones), among others. SQLite has bindings to many programming languages. SQLite uses an unusual type system for a SQL-compatible DBMS.

This document provides information about the SQLite connector, which facilitates automated interactions, with an SQLite database using FortiSOAR™ playbooks. Add the SQLite connector as a step in FortiSOAR™ playbooks and perform automated operations such as, executing a query on an SQLite database and retrieving a list of table names available in the SQLite database.

Version information

Connector Version: 1.0.0

FortiSOAR™ Version Tested on: 4.11.0-1161

Installing the connector

All connectors provided by FortiSOAR™ are delivered using a FortiSOAR™ repository. Therefore, you must set up your FortiSOAR™ repository and use the yum command to install connectors:

yum install cyops-connector-sqlite

For the detailed procedure to install a connector, click here.

 

Prerequisites to configuring the connector

  • You must have the SQLite database to which you will connect and perform automated operations installed on your local machine.
  • You must know the path of the SQLite database.
  • To access the FortiSOAR™ UI, ensure that port 443 is open through the firewall for the FortiSOAR™ instance.

Configuring the connector

For the procedure to configure a connector, click here.

 

Configuration parameters

In FortiSOAR™, on the Connectors page, select the SQLite connector and click Configure to configure the following parameters:

Parameter Description
Database Path Path of the SQLite database to which you will connect and perform the automated operations.

 

Actions supported by the connector

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
Run Query Executes a query on the SQLite database.
Use this function to perform all kinds of operations such as creating, updating, or deleting tables, or inserting items into an existing table.
run_query
Investigation
Get Table List Retrieves a list and details of tables that are available in the SQLite database. list_tables
Investigation
Get Columns Retrieves a list and details of all columns that are part of the table that you have specified from the SQLite database. list_columns
Investigation

 

operation: Run Query

Input parameters

Parameter Description
Query Query that you want to trigger on the SQLite database.
You can perform all kinds of operations here such as Create, Update, Delete, Insert, or Select.
For example, CREATE TABLE Student(Id Int, Name Varchar);
Commit to Database If you select this option, then the changes that occur due to the execution of the query you have specified are committed to the database.

 

Output

The JSON output contains the result of the query execution.

Following image displays a sample output:

Sample output of the Run Query operation

operation: Get Table List

Input parameters

None.

Output

The JSON output contains the list and details of the tables that are available in the SQLite database.

Following image displays a sample output:

Sample output of the Get Table List operation

operation: Get Columns

Input parameters

Parameter Description
Table Name Name of the table whose column details you want to retrieve from the SQLite database.

 

Output

The JSON output contains the list and details of the columns associated with the table name that you have specified, retrieved from the SQLite database.

Following image displays a sample output:

Sample output of the Get Columns operation

Included playbooks

The Sample - SQLite - 1.0.0 playbook collection comes bundled with the SQLite 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 SQLite connector.

  • Get Columns
  • Get Table List
  • Run Query

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.

 

About the connector

SQLite is a relational database management system contained in the C programming library. SQLite is a popular choice for embedded database software for local/client storage in application software such as web browsers. It is arguably the most widely deployed database engine, as it is used today by several widespread browsers, operating systems, and embedded systems (such as mobile phones), among others. SQLite has bindings to many programming languages. SQLite uses an unusual type system for a SQL-compatible DBMS.

This document provides information about the SQLite connector, which facilitates automated interactions, with an SQLite database using FortiSOAR™ playbooks. Add the SQLite connector as a step in FortiSOAR™ playbooks and perform automated operations such as, executing a query on an SQLite database and retrieving a list of table names available in the SQLite database.

Version information

Connector Version: 1.0.0

FortiSOAR™ Version Tested on: 4.11.0-1161

Installing the connector

All connectors provided by FortiSOAR™ are delivered using a FortiSOAR™ repository. Therefore, you must set up your FortiSOAR™ repository and use the yum command to install connectors:

yum install cyops-connector-sqlite

For the detailed procedure to install a connector, click here.

 

Prerequisites to configuring the connector

Configuring the connector

For the procedure to configure a connector, click here.

 

Configuration parameters

In FortiSOAR™, on the Connectors page, select the SQLite connector and click Configure to configure the following parameters:

Parameter Description
Database Path Path of the SQLite database to which you will connect and perform the automated operations.

 

Actions supported by the connector

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
Run Query Executes a query on the SQLite database.
Use this function to perform all kinds of operations such as creating, updating, or deleting tables, or inserting items into an existing table.
run_query
Investigation
Get Table List Retrieves a list and details of tables that are available in the SQLite database. list_tables
Investigation
Get Columns Retrieves a list and details of all columns that are part of the table that you have specified from the SQLite database. list_columns
Investigation

 

operation: Run Query

Input parameters

Parameter Description
Query Query that you want to trigger on the SQLite database.
You can perform all kinds of operations here such as Create, Update, Delete, Insert, or Select.
For example, CREATE TABLE Student(Id Int, Name Varchar);
Commit to Database If you select this option, then the changes that occur due to the execution of the query you have specified are committed to the database.

 

Output

The JSON output contains the result of the query execution.

Following image displays a sample output:

Sample output of the Run Query operation

operation: Get Table List

Input parameters

None.

Output

The JSON output contains the list and details of the tables that are available in the SQLite database.

Following image displays a sample output:

Sample output of the Get Table List operation

operation: Get Columns

Input parameters

Parameter Description
Table Name Name of the table whose column details you want to retrieve from the SQLite database.

 

Output

The JSON output contains the list and details of the columns associated with the table name that you have specified, retrieved from the SQLite database.

Following image displays a sample output:

Sample output of the Get Columns operation

Included playbooks

The Sample - SQLite - 1.0.0 playbook collection comes bundled with the SQLite 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 SQLite 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.