Fortinet black logo

Samba v1.0.0

1.0.0
Copy Link
Copy Doc ID c4aafa23-6056-41e7-a96f-b28a07da3a6f:1

About the connector

SAMBA is the standard Windows interoperability suite of programs for Linux and Unix.

This document provides information about the SAMBA connector, which facilitates automated interactions, with a SAMBA server using FortiSOAR™ playbooks. Add the SAMBA connector as a step in FortiSOAR™ playbooks and perform automated operations, such as file transfer or authentication over SMB protocol or retrieving a list of files and folder for a specific location from the SAMBA server.

Version information

Connector Version: 1.0.0

FortiSOAR™ Version Tested on: 4.12.1-253

Authored By: Fortinet

Certified: Yes

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-samba

For the detailed procedure to install a connector, click here

Prerequisites to configuring the connector

  • You must have the hostname of SAMBA server to which you will connect and perform automated operations and credentials (username-password pair) to access that server.
  • You must also know the hostname of the client machine and the name of the SAMBA share folder in which you want to perform automated operations.
  • 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, click the SAMBA connector row, and in the Configuration tab enter the required configuration details.

Parameter Description
Server Name Hostname of the SAMBA server to which you will connect and perform automated operations.
Server IP IP address of the SAMBA server to which you will connect and perform automated operations.
Username Username to access the SAMBA server to which you will connect and perform automated operations.
Password Password to access the SAMBA server to which you will connect and perform automated operations.
Client Name Hostname of client machine.
Samba Share Name of the SAMBA share folder in which you want to perform 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 and onwards:

Function Description Annotation and Category
Upload file Uploads file on the remote SAMBA server based on the attachment ID, directory path, and other input parameters that you have specified. upload_file
Investigation
Create Directory Creates a directory on the remote SAMBA server based on the directory path you have specified. create_directory
Investigation
Download File Downloads a file from the remote SAMBA server based on the directory path and filename you have specified. download_file
Investigation
Remove Directory Removes a directory from the remote SAMBA server based on the directory path you have specified. delete_directory
Investigation
Get Directory Content Retrieves a list of files and folders for a specific location from SAMBA server based on the directory path you have specified. get_directory_content
Investigation

operation: Upload file

Input parameters

Parameter Description
Attachment ID Attachment ID of file that you want to upload on the remote SAMBA server.
Directory Path Path of directory on the remote SAMBA server in which you want to upload the specified file.
Action (Optional) Action to be performed in case the file already exists on the remote SAMBA server. You can choose from the following actions: Make Copy of Existing File or Replace Existing File.

Output

The output contains the following populated JSON schema:
{
"result": ""
}

Following image displays a sample output of successful uploading of the A.txt file to the test/directory on the remote SAMBA server:

operation: Create Directory

Input parameters

Parameter Description
Directory Path Path of the directory path that you want to create on the SAMBA share.

Output

The output contains the following populated JSON schema:
{
"result": ""
}

Following image displays a sample output of successful creation of the test/directory directory on the samba share smbtest:

operation: Download File

Input parameters

Parameter Description
File Directory Path Directory path of the file on the SAMBA share that you want to download.
File Name Name of the file that you want to download from SAMBA share.

Output

The output contains the following populated JSON schema:
{
"modifyUser": {
"@settings": "",
"modifyUser": "",
"modifyDate": "",
"@id": "",
"createDate": "",
"id": "",
"userType": "",
"createUser": "",
"userId": "",
"avatar": "",
"name": "",
"@type": ""
},
"@type": "",
"modifyDate": "",
"@id": "",
"id": "",
"type": "",
"createDate": "",
"@context": "",
"createUser": {
"@settings": "",
"modifyUser": "",
"modifyDate": "",
"@id": "",
"createDate": "",
"id": "",
"userType": "",
"createUser": "",
"userId": "",
"avatar": "",
"name": "",
"@type": ""
},
"description": "",
"name": "",
"file": {
"filename": "",
"mimeType": "",
"@type": "",
"@id": "",
"owners": [],
"@context": "",
"file": {
"@type": ""
},
"metadata": "",
"uploadDate": "",
"size": ""
}
}

operation: Remove Directory

Input parameters

Parameter Description
Directory Path Path of the directory that you want to remove. The path specified must be relative to the SAMBA share.

Output

The output contains the following populated JSON schema:
{
"result": ""
}

Following image displays a sample output of successful deletion of the test/directory directory from the samba share:

operation: Get Directory Content

Input parameters

Parameter Description
Directory Name Name of the directory whose list of files and folders you want to retrieve from the SAMBA server.

Output

The output contains the following populated JSON schema:
{
"result": []
}

Following image displays a sample output of the list of files and folders that are present on the samba share:

Included playbooks

The Sample - SAMBA - 1.0.0 playbook collection comes bundled with the SAMBA connector. These playbooks contain steps using which you can perform all supported actions. You can see bundled playbooks in the Automation > Playbooks section in FortiSOAR™ after importing the SAMBA connector.

  • Create Directory
  • Download File
  • Get Directory Content
  • Remove Directory
  • Upload File

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.

Previous
Next

About the connector

SAMBA is the standard Windows interoperability suite of programs for Linux and Unix.

This document provides information about the SAMBA connector, which facilitates automated interactions, with a SAMBA server using FortiSOAR™ playbooks. Add the SAMBA connector as a step in FortiSOAR™ playbooks and perform automated operations, such as file transfer or authentication over SMB protocol or retrieving a list of files and folder for a specific location from the SAMBA server.

Version information

Connector Version: 1.0.0

FortiSOAR™ Version Tested on: 4.12.1-253

Authored By: Fortinet

Certified: Yes

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-samba

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, click the SAMBA connector row, and in the Configuration tab enter the required configuration details.

Parameter Description
Server Name Hostname of the SAMBA server to which you will connect and perform automated operations.
Server IP IP address of the SAMBA server to which you will connect and perform automated operations.
Username Username to access the SAMBA server to which you will connect and perform automated operations.
Password Password to access the SAMBA server to which you will connect and perform automated operations.
Client Name Hostname of client machine.
Samba Share Name of the SAMBA share folder in which you want to perform 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 and onwards:

Function Description Annotation and Category
Upload file Uploads file on the remote SAMBA server based on the attachment ID, directory path, and other input parameters that you have specified. upload_file
Investigation
Create Directory Creates a directory on the remote SAMBA server based on the directory path you have specified. create_directory
Investigation
Download File Downloads a file from the remote SAMBA server based on the directory path and filename you have specified. download_file
Investigation
Remove Directory Removes a directory from the remote SAMBA server based on the directory path you have specified. delete_directory
Investigation
Get Directory Content Retrieves a list of files and folders for a specific location from SAMBA server based on the directory path you have specified. get_directory_content
Investigation

operation: Upload file

Input parameters

Parameter Description
Attachment ID Attachment ID of file that you want to upload on the remote SAMBA server.
Directory Path Path of directory on the remote SAMBA server in which you want to upload the specified file.
Action (Optional) Action to be performed in case the file already exists on the remote SAMBA server. You can choose from the following actions: Make Copy of Existing File or Replace Existing File.

Output

The output contains the following populated JSON schema:
{
"result": ""
}

Following image displays a sample output of successful uploading of the A.txt file to the test/directory on the remote SAMBA server:

operation: Create Directory

Input parameters

Parameter Description
Directory Path Path of the directory path that you want to create on the SAMBA share.

Output

The output contains the following populated JSON schema:
{
"result": ""
}

Following image displays a sample output of successful creation of the test/directory directory on the samba share smbtest:

operation: Download File

Input parameters

Parameter Description
File Directory Path Directory path of the file on the SAMBA share that you want to download.
File Name Name of the file that you want to download from SAMBA share.

Output

The output contains the following populated JSON schema:
{
"modifyUser": {
"@settings": "",
"modifyUser": "",
"modifyDate": "",
"@id": "",
"createDate": "",
"id": "",
"userType": "",
"createUser": "",
"userId": "",
"avatar": "",
"name": "",
"@type": ""
},
"@type": "",
"modifyDate": "",
"@id": "",
"id": "",
"type": "",
"createDate": "",
"@context": "",
"createUser": {
"@settings": "",
"modifyUser": "",
"modifyDate": "",
"@id": "",
"createDate": "",
"id": "",
"userType": "",
"createUser": "",
"userId": "",
"avatar": "",
"name": "",
"@type": ""
},
"description": "",
"name": "",
"file": {
"filename": "",
"mimeType": "",
"@type": "",
"@id": "",
"owners": [],
"@context": "",
"file": {
"@type": ""
},
"metadata": "",
"uploadDate": "",
"size": ""
}
}

operation: Remove Directory

Input parameters

Parameter Description
Directory Path Path of the directory that you want to remove. The path specified must be relative to the SAMBA share.

Output

The output contains the following populated JSON schema:
{
"result": ""
}

Following image displays a sample output of successful deletion of the test/directory directory from the samba share:

operation: Get Directory Content

Input parameters

Parameter Description
Directory Name Name of the directory whose list of files and folders you want to retrieve from the SAMBA server.

Output

The output contains the following populated JSON schema:
{
"result": []
}

Following image displays a sample output of the list of files and folders that are present on the samba share:

Included playbooks

The Sample - SAMBA - 1.0.0 playbook collection comes bundled with the SAMBA connector. These playbooks contain steps using which you can perform all supported actions. You can see bundled playbooks in the Automation > Playbooks section in FortiSOAR™ after importing the SAMBA 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.

Previous
Next