Skip to main content
Skip table of contents

Encrypt File with Password Protection

READER NOTE

This utility command is for 16.8+, if you are in a lower version, you may encounter limitations in accessing this command. Kindly reach out to D3 for assistance in obtaining access if such a situation arises.

This command applies password protection to files exported from the D3 platform, ensuring the security of sensitive information. It generates a ZIP file containing the protected content. Users can easily decrypt and access the file using standard ZIP software by providing the designated password.

Implementation

Python

Command Category

System Utility

Tags

N/A

Inputs

Parameter Name

Required/Optional

Description

Sample Data

File Id

Required

The unique identifier of the file to be encrypted

*****

File Source

Required

The origin of the file, which can be a Playbook File, Artifact File, or Incident Attachment File.

Playbook File

Password

Required

The password to be applied for encrypting the file.

*****

Output

Return Data

The returned result of this command. If some required parameters are not defined, this returned data could be empty. The returned result can be passed down directly to a subsequent command in playbooks.

SAMPLE DATA

JSON
{
    "Status": "Successful",
    "Data": {
        "fileId": "*****",
        "fileName": "189_2403251645070000---test-100M (1).zip",
        "md5": "*****",
        "sha1": "*****",
        "sha256": "*****"
    }
}

Remote Command API

The D3 command API allows you to send requests to D3 SOAR to execute this utility command via REST API.

Request

POST

CODE
https://{base_url}/{api_namespace}/api/Command/EncryptFilewithPasswordProtection

Headers

Please refer to the page Webhook Configuration Guide - Authentication Method: API Keys for more details.

Request Body

JSON
{
  "Username": <Username here>,
  "Site": <Site here>,
  "CommandParams": {
    "File Id": <File Id here>,
    "File Source": <File Source here>,
    "Password": <Password here>
  }
}

Body Parameters

Text

Type

Required/Optional

Description

Username

Text

Required

The username of your D3 SOAR account.

Site

Text

Required

The D3 SOAR site to run the remote command.

File Id

Text

Required

The unique identifier of the file to be encrypted

File Source

Text

Required

The origin of the file, which can be a Playbook File, Artifact File, or Incident Attachment File.

Password

Text

Required

The password to be applied for encrypting the file.

Sample Request

SAMPLE DATA

JSON
{
  "Username": "Admin",
  "Site": "Security Operations",
  "CommandParams": {
    "File Id": *****,
    "File Source": "Playbook File",
    "Password": "*****"
  }
}

Response

Response Fields

Field Name

Type

Description

error

Text

The error message if the API request has failed.

returnData

Text

The return data from the API request.

Sample Response

JSON
{
    "error": "",
    "returnData": {
      "Status": "Successful",
      "Data": {
        "fileId": "*****",
        "fileName": "189_2403251645070000---test-100M (1).zip",
        "md5": "*****",
        "sha1": "*****",
        "sha256": "*****"
      }
  }
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.