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 available S3 buckets and updating an existing S3 bucket.

Version information

Connector Version: 1.0.0

Authored By: Fortinet.

Certified: No

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 and click Configure to configure the following parameters:

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. create_bucket
Investigation
List Buckets Retrieves a list of all available S3 buckets. list_buckets
Miscellaneous
List Objects Retrieves an inventory of objects in a specific bucket. list_objects
Miscellaneous
Get Object Retrieves details of an object and optionally download associated contents. get_object_details
Miscellaneous
Modify Bucket Makes changes to an existing S3 Buckets. modify_bucket
Miscellaneous
Modify Object Makes changes to an existing Object. modify_object
Miscellaneous

operation: Create New Bucket

Input parameters

Parameter Description
Bucket Name Bucket name to create the new bucket.

Output

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

operation: List Buckets

Input parameters

None.

Output

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

operation: List Objects

Input parameters

Parameter Description
Bucket Name Name of the bucket to get the contents.
Starting Key When this parameter is used, only objects with keys after this parameter will be fetched.
Page Size A parameter to limit the number of objects to be fetched.
Fetch Next Page To pull the next page result sets.

Output

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

operation: Get Object

Input parameters

Parameter Description
Bucket Name Name of the bucket containing the object.
Object Key Key of the object to retrieve.
Get File Contents Download the contents of the object

Output

The output contains the following populated JSON schema:
{
     "response": {
         "acl": {
             "Owner": {
                 "ID": ""
             },
             "ResponseMetadata": {
                 "HostId": "",
                 "RetryAttempts": "",
                 "RequestId": "",
                 "HTTPStatusCode": "",
                 "HTTPHeaders": {}
             },
             "Grants": []
         },
         "tags": {
             "ResponseMetadata": {
                 "HostId": "",
                 "RetryAttempts": "",
                 "RequestId": "",
                 "HTTPStatusCode": "",
                 "HTTPHeaders": {}
             },
             "TagSet": []
         }
     },
     "error": "",
     "error_message": ""
}

operation: Modify Bucket

Input parameters

Parameter Description
Bucket Name Name of the bucket to be created.
Tags Tags to be added to the bucket, semicolon delimited. e.g. key1:value1;key2:value2...
Encryption Select the default encryption scheme for items in this bucket.
Grants JSON object containing users and permissions to be granted to them.
Refer to http://boto3.readthedocs.io/en/latest/reference/services/s3.html#S3.Client.put_bucket_acl for field names and formatting. This field corresponds to the 'Grants' field of the AccessControlPolicy parameter.
Owner Changes the bucket owner to the user with this AWS canonical ID.

Output

The output contains the following populated JSON schema:
{
     "encryption": {
         "result": "",
         "error": "",
         "error_message": {}
     },
     "grants": {
         "result": "",
         "error": "",
         "error_message": {}
     },
     "tags": {
         "result": "",
         "error": "",
         "error_message": {}
     }
}

operation: Modify Object

Input parameters

Parameter Description
Bucket Name Bucket name in which the target Object is contained.
Object Key Object key to retrieve.
Tags Tags to be added to the Object, semicolon delimited. e.g. key1:value1;key2:value2...
Grants JSON object containing users and permissions to be granted to them.
Refer to http://boto3.readthedocs.io/en/latest/reference/services/s3.html#S3.Client.put_bucket_acl for field names and formatting. This field corresponds to the 'Grants' field of the AccessControlPolicy parameter.
Owner ID Changes the Object owner to the user with this AWS canonical ID.

Output

The output contains the following populated JSON schema:
{
     "response": {},
     "error": "",
     "error_message": ""
}

Included playbooks

The Sample - AWS S3 - 1.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
  • Get Object
  • List Buckets
  • List Objects
  • Modify Bucket
  • Modify Object

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 available S3 buckets and updating an existing S3 bucket.

Version information

Connector Version: 1.0.0

Authored By: Fortinet.

Certified: No

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 and click Configure to configure the following parameters:

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. create_bucket
Investigation
List Buckets Retrieves a list of all available S3 buckets. list_buckets
Miscellaneous
List Objects Retrieves an inventory of objects in a specific bucket. list_objects
Miscellaneous
Get Object Retrieves details of an object and optionally download associated contents. get_object_details
Miscellaneous
Modify Bucket Makes changes to an existing S3 Buckets. modify_bucket
Miscellaneous
Modify Object Makes changes to an existing Object. modify_object
Miscellaneous

operation: Create New Bucket

Input parameters

Parameter Description
Bucket Name Bucket name to create the new bucket.

Output

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

operation: List Buckets

Input parameters

None.

Output

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

operation: List Objects

Input parameters

Parameter Description
Bucket Name Name of the bucket to get the contents.
Starting Key When this parameter is used, only objects with keys after this parameter will be fetched.
Page Size A parameter to limit the number of objects to be fetched.
Fetch Next Page To pull the next page result sets.

Output

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

operation: Get Object

Input parameters

Parameter Description
Bucket Name Name of the bucket containing the object.
Object Key Key of the object to retrieve.
Get File Contents Download the contents of the object

Output

The output contains the following populated JSON schema:
{
     "response": {
         "acl": {
             "Owner": {
                 "ID": ""
             },
             "ResponseMetadata": {
                 "HostId": "",
                 "RetryAttempts": "",
                 "RequestId": "",
                 "HTTPStatusCode": "",
                 "HTTPHeaders": {}
             },
             "Grants": []
         },
         "tags": {
             "ResponseMetadata": {
                 "HostId": "",
                 "RetryAttempts": "",
                 "RequestId": "",
                 "HTTPStatusCode": "",
                 "HTTPHeaders": {}
             },
             "TagSet": []
         }
     },
     "error": "",
     "error_message": ""
}

operation: Modify Bucket

Input parameters

Parameter Description
Bucket Name Name of the bucket to be created.
Tags Tags to be added to the bucket, semicolon delimited. e.g. key1:value1;key2:value2...
Encryption Select the default encryption scheme for items in this bucket.
Grants JSON object containing users and permissions to be granted to them.
Refer to http://boto3.readthedocs.io/en/latest/reference/services/s3.html#S3.Client.put_bucket_acl for field names and formatting. This field corresponds to the 'Grants' field of the AccessControlPolicy parameter.
Owner Changes the bucket owner to the user with this AWS canonical ID.

Output

The output contains the following populated JSON schema:
{
     "encryption": {
         "result": "",
         "error": "",
         "error_message": {}
     },
     "grants": {
         "result": "",
         "error": "",
         "error_message": {}
     },
     "tags": {
         "result": "",
         "error": "",
         "error_message": {}
     }
}

operation: Modify Object

Input parameters

Parameter Description
Bucket Name Bucket name in which the target Object is contained.
Object Key Object key to retrieve.
Tags Tags to be added to the Object, semicolon delimited. e.g. key1:value1;key2:value2...
Grants JSON object containing users and permissions to be granted to them.
Refer to http://boto3.readthedocs.io/en/latest/reference/services/s3.html#S3.Client.put_bucket_acl for field names and formatting. This field corresponds to the 'Grants' field of the AccessControlPolicy parameter.
Owner ID Changes the Object owner to the user with this AWS canonical ID.

Output

The output contains the following populated JSON schema:
{
     "response": {},
     "error": "",
     "error_message": ""
}

Included playbooks

The Sample - AWS S3 - 1.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.