Google drive connector helps list, add, remove, download, and upload files from Google Drive using your playbooks.
This document provides information about the Google Drive Connector, which facilitates automated interactions, with a Google Drive server using FortiSOAR™ playbooks. Add the Google Drive Connector as a step in FortiSOAR™ playbooks and perform automated operations with Google Drive.
Connector Version: 1.0.0
Authored By: Community
Certified: No
Your application needs to be both authenticated and authorized to access the Google Drive API. The REST APIs of Google Drive allow you to manage asynchronous service-to-service communication used in serverless and microservices architectures
The following configuration parameters are required to authenticate the Google Drive connector with the Google Drive API.
The following configuration parameter is required to authorize the Google Drive connector with the Google Drive API.
You can get the authentication token to access the Google Drive APIs using the OAuth 2.0 method. For more information see, https://developers.google.com/identity/protocols/oauth2/web-server.
You can follow the steps below to secure the authentication and authorization codes used to access the Google Drive API:
https://accounts.google.com/o/oauth2/v2/auth?scope=https://www.googleapis.com/auth/cloud-platform
https://accounts.google.com/o/oauth2/v2/auth?scope=https://www.googleapis.com/auth/cloud-platform&access_type=offline&include_granted_scopes=true&response_type=code&state=state_parameter_passthrough_value&redirect_uri=REDIRECT_URI&client_id=CLIENT_ID
REDIRECT_URI?state=STATE&code=AUTH_CODE&scope=SCOPE
. Copy the AUTH_CODE
(without the "code=" prefix), and in the Configurations tab of the connector, paste the AUTH_CODE
in the Authorization Code field.The process to access the Google Drive API is now complete. Google Drive API reference is available at: https://cloud.google.com/kms/docs/reference/rest.
Use the Content Hub to install the connector. For the detailed procedure to install a connector, click here.
You can also use the following yum command as a root
user to install connectors from an SSH session:
yum install cyops-connector-google-drive
For the procedure to configure a connector, click here
In FortiSOAR™, on the Connectors page, click the Google Drive connector row (if you are in the Grid view on the Connectors page) and in the Configurations tab enter the required configuration details:
Parameter | Description |
---|---|
Server URL | The service-based URL of the Google API server to which you will connect and perform the automated operations. |
Client ID | Unique ID of the Google Drive application that is used to create an authentication token required to access the API. |
Client Secret | Unique Client Secret of the Google application that is used to create an authentication token required to access the API. For information on how to get the secret key, see Using OAuth 2.0 for Web Server Applications. |
Authorization Code | The authorization code that you have acquired during the authorization step. For more information, see the Accessing the Google Drive API section. |
Redirect URL | The redirect_uri of your app, where you can send and receive the authentication responses. It must exactly match one of the redirect_uri you registered in the app registration portal. |
Verify SSL | Specifies whether the SSL certificate for the server is to be verified or not. By default, this option is set to True . |
The following automated operations can be included in playbooks and you can also use the annotations to access operations:
Function | Description | Annotation and Category |
---|---|---|
Get File List | Gets a list of all the files in Google Drive based on the count of files you have specified. | get_all_files Investigation |
Delete File | Deletes a file from Google Drive based on the file ID you have specified. | delete_file Containment |
Empty Trash | Permanently deletes all of the user's files from the Trash folder. | empty_trash Containment |
Upload File | Uploads a file to Google Drive based on the attachment IRI you have specified. | upload_file Containment |
Download File | Downloads a file from Google Drive based on the file ID you have specified. It then creates a record in FortiSOAR's Attachments module. | download_file Containment |
Parameter | Description |
---|---|
Page Size | Specify the number of files to display. |
The output contains the following populated JSON schema:
{
"kind": "",
"incompleteSearch": "",
"files": [
{
"kind": "",
"id": "",
"name": "",
"mimeType": ""
}
]
}
Parameter | Description |
---|---|
File ID | Specify the file ID of the file to delete from Google Drive. You can get the file ID from the Get File List operation. step. |
The output contains a non-dictionary value.
None.
The output contains a non-dictionary value.
Parameter | Description |
---|---|
Attachment IRI | Specify the attachment IRI of the file to upload. The attachment IRI can be found in the Dynamic Values -> IRI Lookup. |
New File Name | Specify a name for the uploaded file. If left blank, it takes the filename associated with the specified attachment IRI. |
The output contains the following populated JSON schema:
{
"file_id": ""
}
Parameter | Description |
---|---|
File ID | Specify the ID of the file to download from Google Drive. You can get the file ID from the Get File List operation. Note: The file ID that you have specified for download must not have .folder appended in the mimeType . |
The output contains the following populated JSON schema:
{
"id": "",
"@id": "",
"file": {
"id": "",
"@id": "",
"size": "",
"uuid": "",
"@type": "",
"assignee": "",
"filename": "",
"metadata": [],
"mimeType": "",
"thumbnail": "",
"uploadDate": ""
},
"name": "",
"type": "",
"uuid": "",
"@type": "",
"tasks": [],
"alerts": [],
"assets": [],
"owners": [],
"people": [],
"@context": "",
"assignee": "",
"comments": [],
"warrooms": [],
"incidents": [],
"createDate": "",
"createUser": {
"id": "",
"@id": "",
"name": "",
"uuid": "",
"@type": "",
"avatar": "",
"userId": "",
"userType": "",
"createDate": "",
"createUser": "",
"modifyDate": "",
"modifyUser": ""
},
"indicators": [],
"modifyDate": "",
"modifyUser": {
"id": "",
"@id": "",
"name": "",
"uuid": "",
"@type": "",
"avatar": "",
"userId": "",
"userType": "",
"createDate": "",
"createUser": "",
"modifyDate": "",
"modifyUser": ""
},
"recordTags": [],
"userOwners": [],
"description": ""
}
The Sample - Google Drive - 1.0.0
playbook collection comes bundled with the Google Drive 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 installing the Google Drive 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.
Google drive connector helps list, add, remove, download, and upload files from Google Drive using your playbooks.
This document provides information about the Google Drive Connector, which facilitates automated interactions, with a Google Drive server using FortiSOAR™ playbooks. Add the Google Drive Connector as a step in FortiSOAR™ playbooks and perform automated operations with Google Drive.
Connector Version: 1.0.0
Authored By: Community
Certified: No
Your application needs to be both authenticated and authorized to access the Google Drive API. The REST APIs of Google Drive allow you to manage asynchronous service-to-service communication used in serverless and microservices architectures
The following configuration parameters are required to authenticate the Google Drive connector with the Google Drive API.
The following configuration parameter is required to authorize the Google Drive connector with the Google Drive API.
You can get the authentication token to access the Google Drive APIs using the OAuth 2.0 method. For more information see, https://developers.google.com/identity/protocols/oauth2/web-server.
You can follow the steps below to secure the authentication and authorization codes used to access the Google Drive API:
https://accounts.google.com/o/oauth2/v2/auth?scope=https://www.googleapis.com/auth/cloud-platform
https://accounts.google.com/o/oauth2/v2/auth?scope=https://www.googleapis.com/auth/cloud-platform&access_type=offline&include_granted_scopes=true&response_type=code&state=state_parameter_passthrough_value&redirect_uri=REDIRECT_URI&client_id=CLIENT_ID
REDIRECT_URI?state=STATE&code=AUTH_CODE&scope=SCOPE
. Copy the AUTH_CODE
(without the "code=" prefix), and in the Configurations tab of the connector, paste the AUTH_CODE
in the Authorization Code field.The process to access the Google Drive API is now complete. Google Drive API reference is available at: https://cloud.google.com/kms/docs/reference/rest.
Use the Content Hub to install the connector. For the detailed procedure to install a connector, click here.
You can also use the following yum command as a root
user to install connectors from an SSH session:
yum install cyops-connector-google-drive
For the procedure to configure a connector, click here
In FortiSOAR™, on the Connectors page, click the Google Drive connector row (if you are in the Grid view on the Connectors page) and in the Configurations tab enter the required configuration details:
Parameter | Description |
---|---|
Server URL | The service-based URL of the Google API server to which you will connect and perform the automated operations. |
Client ID | Unique ID of the Google Drive application that is used to create an authentication token required to access the API. |
Client Secret | Unique Client Secret of the Google application that is used to create an authentication token required to access the API. For information on how to get the secret key, see Using OAuth 2.0 for Web Server Applications. |
Authorization Code | The authorization code that you have acquired during the authorization step. For more information, see the Accessing the Google Drive API section. |
Redirect URL | The redirect_uri of your app, where you can send and receive the authentication responses. It must exactly match one of the redirect_uri you registered in the app registration portal. |
Verify SSL | Specifies whether the SSL certificate for the server is to be verified or not. By default, this option is set to True . |
The following automated operations can be included in playbooks and you can also use the annotations to access operations:
Function | Description | Annotation and Category |
---|---|---|
Get File List | Gets a list of all the files in Google Drive based on the count of files you have specified. | get_all_files Investigation |
Delete File | Deletes a file from Google Drive based on the file ID you have specified. | delete_file Containment |
Empty Trash | Permanently deletes all of the user's files from the Trash folder. | empty_trash Containment |
Upload File | Uploads a file to Google Drive based on the attachment IRI you have specified. | upload_file Containment |
Download File | Downloads a file from Google Drive based on the file ID you have specified. It then creates a record in FortiSOAR's Attachments module. | download_file Containment |
Parameter | Description |
---|---|
Page Size | Specify the number of files to display. |
The output contains the following populated JSON schema:
{
"kind": "",
"incompleteSearch": "",
"files": [
{
"kind": "",
"id": "",
"name": "",
"mimeType": ""
}
]
}
Parameter | Description |
---|---|
File ID | Specify the file ID of the file to delete from Google Drive. You can get the file ID from the Get File List operation. step. |
The output contains a non-dictionary value.
None.
The output contains a non-dictionary value.
Parameter | Description |
---|---|
Attachment IRI | Specify the attachment IRI of the file to upload. The attachment IRI can be found in the Dynamic Values -> IRI Lookup. |
New File Name | Specify a name for the uploaded file. If left blank, it takes the filename associated with the specified attachment IRI. |
The output contains the following populated JSON schema:
{
"file_id": ""
}
Parameter | Description |
---|---|
File ID | Specify the ID of the file to download from Google Drive. You can get the file ID from the Get File List operation. Note: The file ID that you have specified for download must not have .folder appended in the mimeType . |
The output contains the following populated JSON schema:
{
"id": "",
"@id": "",
"file": {
"id": "",
"@id": "",
"size": "",
"uuid": "",
"@type": "",
"assignee": "",
"filename": "",
"metadata": [],
"mimeType": "",
"thumbnail": "",
"uploadDate": ""
},
"name": "",
"type": "",
"uuid": "",
"@type": "",
"tasks": [],
"alerts": [],
"assets": [],
"owners": [],
"people": [],
"@context": "",
"assignee": "",
"comments": [],
"warrooms": [],
"incidents": [],
"createDate": "",
"createUser": {
"id": "",
"@id": "",
"name": "",
"uuid": "",
"@type": "",
"avatar": "",
"userId": "",
"userType": "",
"createDate": "",
"createUser": "",
"modifyDate": "",
"modifyUser": ""
},
"indicators": [],
"modifyDate": "",
"modifyUser": {
"id": "",
"@id": "",
"name": "",
"uuid": "",
"@type": "",
"avatar": "",
"userId": "",
"userType": "",
"createDate": "",
"createUser": "",
"modifyDate": "",
"modifyUser": ""
},
"recordTags": [],
"userOwners": [],
"description": ""
}
The Sample - Google Drive - 1.0.0
playbook collection comes bundled with the Google Drive 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 installing the Google Drive 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.