Fortinet Document Library

Version:

Version:


Table of Contents

Copy Link

About the connector

Amazon S3 is a cloud computing web service offered by Amazon Web Services. Amazon S3 provides object storage through web services interfaces.

This document provides information about the AWS S3 connector, which facilitates automated interactions with AWS S3 using FortiSOAR™ playbooks. Add the AWS S3 connector as a step in FortiSOAR™ playbooks and perform automated operations, such as retrieving a list of all available S3 buckets and updating an existing S3 bucket.

Version information

Connector Version: 2.0.0

FortiSOAR™ Version Tested on: 4.12.1-253

Authored By: Fortinet

Certified: Yes

Release Notes for version 2.0.0

Following enhancements have been made to the AWS S3 connector in version 2.0.0:

  • Added the following operations:
    • Download File 
    • Upload File into Bucket
    • Delete Tag
    • Delete Bucket
    • Delete Bucket Object
  • The AWS S3 connector has been released as a certified connector.

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

For the detailed procedure to install a connector, click here

Prerequisites to configuring the connector

  • You must have the URL of AWS S3 server to which you will connect and perform automated operations and credentials to access that server.
  • 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 AWS S3 connector row, and in the Configure tab enter the required configuration details.

Parameter Description
Region AWS region of your account to access the AWS services.
Access Key User's AWS Access Key ID to access AWS services.
Secret Key User's AWS Secret key to access AWS services.
Verify SSL Specifies whether the SSL certificate for the server is to be verified or not.
By default, this option is set as True.

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 onward:

Function Description Annotation and Category
Create New Bucket Creates a new S3 Bucket in AWS based on the bucket name you have specified. create_bucket
Investigation
List Buckets Retrieves a list of all available S3 buckets from AWS. list_buckets
Miscellaneous
List Objects Retrieves an inventory of objects in a specific bucket from AWS S3 based on the bucket name and other input parameters you have specified. list_objects
Miscellaneous
Get Object Retrieves details of a specific object and optionally download associated metadata of the file from a specific bucket from AWS S3 based on the bucket name, object key, and other input parameters you have specified. get_object_details
Miscellaneous
Modify Bucket Modifies an existing S3 bucket on AWS based on the bucket name and other input parameters you have specified. modify_bucket
Miscellaneous
Modify Object Modifies an existing object in AWS S3 based on the bucket name, object key, and other input parameters you have specified. modify_object
Miscellaneous
Download File Downloads a S3 object or file from AWS S3 and adds the object or file in the FortiSOAR™ "Attachment"  module. download_file
Miscellaneous
Upload File into Bucket Uploads a file from the FortiSOAR™ "Attachment"  module to AWS S3 bucket. upload_file
Miscellaneous
Delete Tag Deletes tags from the specified bucket and/or object on AWS S3. delete_tag
Remediation
Delete Bucket Deletes the specified bucket from AWS S3.
Important: All objects (including all object versions and Delete Markers) in the bucket must be deleted before the bucket itself can be deleted.
delete_bucket
Remediation
Delete Bucket Object Deletes an specific object from a specific AWS S3 bucket. delete_object
Remediation

operation: Create New Bucket

Input parameters

Parameter Description
Bucket Name Name of the new bucket that you want to create in AWS S3.
ACL Permission

(Optional) Canned ACL permissions that you want to apply to the bucket that you are creating in AWS S3.

You can choose from the following options: Private, Public Read, Public Read Write, Authenticated Read.

Output

The output contains the following populated JSON schema:
{
     "ResponseMetadata": {
         "RequestId": "",
         "HostId": "",
         "HTTPHeaders": {
             "date": "",
             "location": "",
             "content-length": "",
             "server": "",
             "x-amz-id-2": "",
             "x-amz-request-id": ""
         },
         "HTTPStatusCode": "",
         "RetryAttempts": ""
     },
     "Location": ""
}

     "Location": "",
}

operation: List Buckets

Input parameters

None.

Output

The output contains the following populated JSON schema:
{
     "Buckets": [
         {
             "Name": "",
             "CreationDate": ""
         }
     ],
     "ResponseMetadata": {
         "HTTPHeaders": {
             "date": "",
             "content-type": "",
             "server": "",
             "transfer-encoding": "",
             "x-amz-id-2": "",
             "x-amz-request-id": ""
         },
         "HostId": "",
         "RequestId": "",
         "HTTPStatusCode": "",
         "RetryAttempts": ""
     },
     "Owner": {
         "ID": ""
     }
}

operation: List Objects

Input parameters

Parameter Description
Bucket Name Name of the bucket whose objects you want to retrieve from AWS S3.
Starting Key (Optional) Specify the starting key for retrieving the objects from AWS S3, i.e., if you specify the starting key, then only objects with keys after the specified key will be fetched.
Page Size (Optional) Number of objects to be fetched from AWS S3 in a single page.

Output

The output contains the following populated JSON schema:
{
     "IsTruncated": "",
     "KeyCount": "",
     "EncodingType": "",
     "StartAfter": "",
     "Prefix": "",
     "Name": "",
     "ResponseMetadata": {
         "RequestId": "",
         "HostId": "",
         "HTTPHeaders": {
             "date": "",
             "content-type": "",
             "server": "",
             "transfer-encoding": "",
             "x-amz-id-2": "",
             "x-amz-request-id": "",
             "x-amz-bucket-region": ""
         },
         "HTTPStatusCode": "",
         "RetryAttempts": ""
     },
     "MaxKeys": ""
}

operation: Get Object

Input parameters

Parameter Description
Bucket Name Name of the bucket whose object details you want to retrieve from AWS S3.
Object Key Key of the object whose object details you want to retrieve from AWS S3.

Output

The output contains the following populated JSON schema:

     "response": { 
         "acl": { 
             "ResponseMetadata": { 
                 "RequestId": "", 
                 "HostId": "", 
                 "HTTPStatusCode": "", 
                 "RetryAttempts": "", 
                 "HTTPHeaders": {} 
             }, 
             "Grants": [], 
             "Owner": { 
                 "ID": "" 
             } 
         }, 
         "tags": { 
             "TagSet": [], 
             "ResponseMetadata": { 
                 "RequestId": "", 
                 "HostId": "", 
                 "HTTPStatusCode": "", 
                 "RetryAttempts": "", 
                 "HTTPHeaders": {} 
             } 
         } 
     }, 
     "error": "" 
}

operation: Modify Bucket

Input parameters

Parameter Description
Bucket Name Name of the bucket that you want to modify in AWS S3.
Tags (Optional) Tags that you want to add to the specified bucket.
You can add multiple tags using the semicolon separator. For example, key1:value1;key2:value2...
Encryption (Optional) Select the default encryption scheme for items in this bucket. You can choose from the following options: None, AES256, or KMS.
Grants (Optional) Specify the JSON object that contains users, and permissions to be granted to them.
For example, [{"Grantee": {"ID": "2909146a9af35041b07ec330373208c3819e024e7f7074b60be9a36ba8884d5d", "Type": "CanonicalUser"}, "Permission": "FULL_CONTROL"}]

Output

The output contains the following populated JSON schema:

     "grants": { 
         "result": "", 
         "error": "" 
     }, 
     "encryption": { 
         "result": "", 
         "error": "" 
     }, 
     "tags": { 
         "result": "", 
         "error": "" 
     } 
}

operation: Modify Object

Input parameters

Parameter Description
Bucket Name Name of the bucket that contains the object that you want to modify in AWS S3.
Object Key Key of the object that you want to modify in AWS S3.
Tags (Optional) Tags that you want to add to the specified object.
You can add multiple tags using the semicolon separator. For example, key1:value1;key2:value2...
Grants (Optional) Specify the JSON object that contains users, and permissions to be granted to them.
For example, [{"Grantee": {"ID": "2909146a9af35041b07ec330373208c3819e024e7f7074b60be9a36ba8884d5d", "Type": "CanonicalUser"}, "Permission": "FULL_CONTROL"}]

Output

The output contains the following populated JSON schema:

     "result": {}, 
     "error": "" 
}

operation: Download File

Input parameters

Parameter Description
Download Option Select the option, either From Bucket or From URL, from where you want to download the file or object from AWS S3.
If you select the From Bucket option, then you must specify the following parameters:
  • Bucket Name: Name of the bucket from which you want to download the object from AWS S3.
  • Object Key: Key of the object that you want to download from AWS S3.
If you select the From URL option, then you must specify the following parameters:
  • Download File URL: URL of the file that you want to download from AWS S3.
  • Filename for Attachment: (Optional) Specify a filename with which you want to save the file in the  FortiSOAR™ "Attachment"  module. This filename will override the default filename.

Output

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

operation: Upload File into Bucket

Input parameters

Parameter Description
Bucket Name Name of the AWS S3  bucket into which you want to upload the file from the  FortiSOAR™ "Attachment"  module.
File ID(IRI) ID or IRI value of the file that you want to upload to the specified AWS S3 bucket.
In the playbook, the file ID or IRI is used to access the file from the FortiSOAR™ "Attachment" module.
Key for Object Unique key for new uploaded object.
Note: This key is use for access this file.

Output

The output contains the following populated JSON schema:



     "result": {}, 
     "error": "" 
}

operation: Delete Tag

Input parameters

Parameter Description
Select Select Bucket or Object or both from which you want to delete tags on AWS S3.    
If you select Bucket then you must specify these additional parameters:
  • Bucket Name: Name of the AWS S3 bucket from which you want to delete the specified tag.
  • Tags: Tags that you want to delete from the specified bucket on AWS S3.
    You can add multiple tags using the semicolon separator. For example, key1:value1;key2:value2...
If you select Object then you must specify these additional parameters:
  • Bucket Name: Name of the AWS S3 bucket that contains the target object.
  • Object Key: Key of the object from which you want to delete the specified tags.
  • Tags: Tags that you want to delete from the specified bucket on AWS S3.
    You can add multiple tags using the semicolon separator. For example, key1:value1;key2:value2...

Output

The output contains a non-dictionary value.

operation: Delete Bucket

Input parameters

Parameter Description
Bucket Name Name of the bucket that you want to delete from AWS S3.

Output

The output contains the following populated JSON schema:

     "result": {}, 
     "error": "" 
}

operation: Delete Bucket Object

Input parameters

Parameter Description
Bucket Name Name of the bucket that contains the object that you want to delete from AWS S3.
Object Key Key of the object that you want to delete from AWS S3.

Output

The output contains the following populated JSON schema:

     "result": {}, 
     "error": "" 
}

Included playbooks

The Sample - AWS S3 - 2.0.0 playbook collection comes bundled with the AWS S3 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 AWS S3 connector.

  • Create New Bucket
  • Delete Bucket
  • Delete Bucket Object
  • Delete Tag
  • Download File
  • Get Object
  • List Buckets
  • List Objects
  • Modify Bucket
  • Modify Object
  • Upload File into Bucket

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

Amazon S3 is a cloud computing web service offered by Amazon Web Services. Amazon S3 provides object storage through web services interfaces.

This document provides information about the AWS S3 connector, which facilitates automated interactions with AWS S3 using FortiSOAR™ playbooks. Add the AWS S3 connector as a step in FortiSOAR™ playbooks and perform automated operations, such as retrieving a list of all available S3 buckets and updating an existing S3 bucket.

Version information

Connector Version: 2.0.0

FortiSOAR™ Version Tested on: 4.12.1-253

Authored By: Fortinet

Certified: Yes

Release Notes for version 2.0.0

Following enhancements have been made to the AWS S3 connector in version 2.0.0:

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

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 AWS S3 connector row, and in the Configure tab enter the required configuration details.

Parameter Description
Region AWS region of your account to access the AWS services.
Access Key User's AWS Access Key ID to access AWS services.
Secret Key User's AWS Secret key to access AWS services.
Verify SSL Specifies whether the SSL certificate for the server is to be verified or not.
By default, this option is set as True.

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 onward:

Function Description Annotation and Category
Create New Bucket Creates a new S3 Bucket in AWS based on the bucket name you have specified. create_bucket
Investigation
List Buckets Retrieves a list of all available S3 buckets from AWS. list_buckets
Miscellaneous
List Objects Retrieves an inventory of objects in a specific bucket from AWS S3 based on the bucket name and other input parameters you have specified. list_objects
Miscellaneous
Get Object Retrieves details of a specific object and optionally download associated metadata of the file from a specific bucket from AWS S3 based on the bucket name, object key, and other input parameters you have specified. get_object_details
Miscellaneous
Modify Bucket Modifies an existing S3 bucket on AWS based on the bucket name and other input parameters you have specified. modify_bucket
Miscellaneous
Modify Object Modifies an existing object in AWS S3 based on the bucket name, object key, and other input parameters you have specified. modify_object
Miscellaneous
Download File Downloads a S3 object or file from AWS S3 and adds the object or file in the FortiSOAR™ "Attachment"  module. download_file
Miscellaneous
Upload File into Bucket Uploads a file from the FortiSOAR™ "Attachment"  module to AWS S3 bucket. upload_file
Miscellaneous
Delete Tag Deletes tags from the specified bucket and/or object on AWS S3. delete_tag
Remediation
Delete Bucket Deletes the specified bucket from AWS S3.
Important: All objects (including all object versions and Delete Markers) in the bucket must be deleted before the bucket itself can be deleted.
delete_bucket
Remediation
Delete Bucket Object Deletes an specific object from a specific AWS S3 bucket. delete_object
Remediation

operation: Create New Bucket

Input parameters

Parameter Description
Bucket Name Name of the new bucket that you want to create in AWS S3.
ACL Permission

(Optional) Canned ACL permissions that you want to apply to the bucket that you are creating in AWS S3.

You can choose from the following options: Private, Public Read, Public Read Write, Authenticated Read.

Output

The output contains the following populated JSON schema:
{
     "ResponseMetadata": {
         "RequestId": "",
         "HostId": "",
         "HTTPHeaders": {
             "date": "",
             "location": "",
             "content-length": "",
             "server": "",
             "x-amz-id-2": "",
             "x-amz-request-id": ""
         },
         "HTTPStatusCode": "",
         "RetryAttempts": ""
     },
     "Location": ""
}

     "Location": "",
}

operation: List Buckets

Input parameters

None.

Output

The output contains the following populated JSON schema:
{
     "Buckets": [
         {
             "Name": "",
             "CreationDate": ""
         }
     ],
     "ResponseMetadata": {
         "HTTPHeaders": {
             "date": "",
             "content-type": "",
             "server": "",
             "transfer-encoding": "",
             "x-amz-id-2": "",
             "x-amz-request-id": ""
         },
         "HostId": "",
         "RequestId": "",
         "HTTPStatusCode": "",
         "RetryAttempts": ""
     },
     "Owner": {
         "ID": ""
     }
}

operation: List Objects

Input parameters

Parameter Description
Bucket Name Name of the bucket whose objects you want to retrieve from AWS S3.
Starting Key (Optional) Specify the starting key for retrieving the objects from AWS S3, i.e., if you specify the starting key, then only objects with keys after the specified key will be fetched.
Page Size (Optional) Number of objects to be fetched from AWS S3 in a single page.

Output

The output contains the following populated JSON schema:
{
     "IsTruncated": "",
     "KeyCount": "",
     "EncodingType": "",
     "StartAfter": "",
     "Prefix": "",
     "Name": "",
     "ResponseMetadata": {
         "RequestId": "",
         "HostId": "",
         "HTTPHeaders": {
             "date": "",
             "content-type": "",
             "server": "",
             "transfer-encoding": "",
             "x-amz-id-2": "",
             "x-amz-request-id": "",
             "x-amz-bucket-region": ""
         },
         "HTTPStatusCode": "",
         "RetryAttempts": ""
     },
     "MaxKeys": ""
}

operation: Get Object

Input parameters

Parameter Description
Bucket Name Name of the bucket whose object details you want to retrieve from AWS S3.
Object Key Key of the object whose object details you want to retrieve from AWS S3.

Output

The output contains the following populated JSON schema:

     "response": { 
         "acl": { 
             "ResponseMetadata": { 
                 "RequestId": "", 
                 "HostId": "", 
                 "HTTPStatusCode": "", 
                 "RetryAttempts": "", 
                 "HTTPHeaders": {} 
             }, 
             "Grants": [], 
             "Owner": { 
                 "ID": "" 
             } 
         }, 
         "tags": { 
             "TagSet": [], 
             "ResponseMetadata": { 
                 "RequestId": "", 
                 "HostId": "", 
                 "HTTPStatusCode": "", 
                 "RetryAttempts": "", 
                 "HTTPHeaders": {} 
             } 
         } 
     }, 
     "error": "" 
}

operation: Modify Bucket

Input parameters

Parameter Description
Bucket Name Name of the bucket that you want to modify in AWS S3.
Tags (Optional) Tags that you want to add to the specified bucket.
You can add multiple tags using the semicolon separator. For example, key1:value1;key2:value2...
Encryption (Optional) Select the default encryption scheme for items in this bucket. You can choose from the following options: None, AES256, or KMS.
Grants (Optional) Specify the JSON object that contains users, and permissions to be granted to them.
For example, [{"Grantee": {"ID": "2909146a9af35041b07ec330373208c3819e024e7f7074b60be9a36ba8884d5d", "Type": "CanonicalUser"}, "Permission": "FULL_CONTROL"}]

Output

The output contains the following populated JSON schema:

     "grants": { 
         "result": "", 
         "error": "" 
     }, 
     "encryption": { 
         "result": "", 
         "error": "" 
     }, 
     "tags": { 
         "result": "", 
         "error": "" 
     } 
}

operation: Modify Object

Input parameters

Parameter Description
Bucket Name Name of the bucket that contains the object that you want to modify in AWS S3.
Object Key Key of the object that you want to modify in AWS S3.
Tags (Optional) Tags that you want to add to the specified object.
You can add multiple tags using the semicolon separator. For example, key1:value1;key2:value2...
Grants (Optional) Specify the JSON object that contains users, and permissions to be granted to them.
For example, [{"Grantee": {"ID": "2909146a9af35041b07ec330373208c3819e024e7f7074b60be9a36ba8884d5d", "Type": "CanonicalUser"}, "Permission": "FULL_CONTROL"}]

Output

The output contains the following populated JSON schema:

     "result": {}, 
     "error": "" 
}

operation: Download File

Input parameters

Parameter Description
Download Option Select the option, either From Bucket or From URL, from where you want to download the file or object from AWS S3.
If you select the From Bucket option, then you must specify the following parameters:
  • Bucket Name: Name of the bucket from which you want to download the object from AWS S3.
  • Object Key: Key of the object that you want to download from AWS S3.
If you select the From URL option, then you must specify the following parameters:
  • Download File URL: URL of the file that you want to download from AWS S3.
  • Filename for Attachment: (Optional) Specify a filename with which you want to save the file in the  FortiSOAR™ "Attachment"  module. This filename will override the default filename.

Output

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

operation: Upload File into Bucket

Input parameters

Parameter Description
Bucket Name Name of the AWS S3  bucket into which you want to upload the file from the  FortiSOAR™ "Attachment"  module.
File ID(IRI) ID or IRI value of the file that you want to upload to the specified AWS S3 bucket.
In the playbook, the file ID or IRI is used to access the file from the FortiSOAR™ "Attachment" module.
Key for Object Unique key for new uploaded object.
Note: This key is use for access this file.

Output

The output contains the following populated JSON schema:



     "result": {}, 
     "error": "" 
}

operation: Delete Tag

Input parameters

Parameter Description
Select Select Bucket or Object or both from which you want to delete tags on AWS S3.    
If you select Bucket then you must specify these additional parameters:
  • Bucket Name: Name of the AWS S3 bucket from which you want to delete the specified tag.
  • Tags: Tags that you want to delete from the specified bucket on AWS S3.
    You can add multiple tags using the semicolon separator. For example, key1:value1;key2:value2...
If you select Object then you must specify these additional parameters:
  • Bucket Name: Name of the AWS S3 bucket that contains the target object.
  • Object Key: Key of the object from which you want to delete the specified tags.
  • Tags: Tags that you want to delete from the specified bucket on AWS S3.
    You can add multiple tags using the semicolon separator. For example, key1:value1;key2:value2...

Output

The output contains a non-dictionary value.

operation: Delete Bucket

Input parameters

Parameter Description
Bucket Name Name of the bucket that you want to delete from AWS S3.

Output

The output contains the following populated JSON schema:

     "result": {}, 
     "error": "" 
}

operation: Delete Bucket Object

Input parameters

Parameter Description
Bucket Name Name of the bucket that contains the object that you want to delete from AWS S3.
Object Key Key of the object that you want to delete from AWS S3.

Output

The output contains the following populated JSON schema:

     "result": {}, 
     "error": "" 
}

Included playbooks

The Sample - AWS S3 - 2.0.0 playbook collection comes bundled with the AWS S3 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 AWS S3 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.