Skip to content

Commit 2ba8392

Browse files
content-botxsoar-botspearmin10ostolero
authored
[Marketplace Contribution] Web File Repository (demisto#23469)
* [Marketplace Contribution] Web File Repository (demisto#23108) * "pack contribution initial commit" * Added test scripts Co-authored-by: spearmin10 <minoue@paloaltonetworks.com> * update docker * add description Co-authored-by: xsoar-bot <67315154+xsoar-bot@users.noreply.github.com> Co-authored-by: spearmin10 <minoue@paloaltonetworks.com> Co-authored-by: ostolero <ostolero@paloaltonetworks.com>
1 parent 9a458e0 commit 2ba8392

42 files changed

Lines changed: 8745 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Packs/WebFileRepository/.pack-ignore

Whitespace-only changes.

Packs/WebFileRepository/.secrets-ignore

Whitespace-only changes.
Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
Simple web server with a file uploading console to store small files.
2+
This is helpful to make your environment ready for testing purpose for your playbooks or automations to download files from a web server.
3+
## Configure Web File Repository on Cortex XSOAR
4+
5+
1. Navigate to **Settings** > **Integrations** > **Servers & Services**.
6+
2. Search for Web File Repository.
7+
3. Click **Add instance** to create and configure a new integration instance.
8+
9+
| **Parameter** | **Description** | **Required** |
10+
| --- | --- | --- |
11+
| Incident type | | False |
12+
| Long running instance | | False |
13+
| Port mapping (&lt;port&gt; or &lt;host port&gt;:&lt;docker port&gt;) | | True |
14+
| User ID for Read/Write | | False |
15+
| Password | | False |
16+
| User ID for Read-Only | | False |
17+
| Password | | False |
18+
| Authentication Method | Some of the browsers such as Chrome may not support Digest-sha256. | False |
19+
| Public Read Access | Authentication is not requiured for read access | False |
20+
| MIME Types for file extensions | "mime-type extension \[extension\]\*" for each line, wild-card file extensions are supported. | False |
21+
| Merge with Default MIME Types | Set true to merge the specified types with the default settings, false to replace them | False |
22+
| Attachment extensions | List of extensions to set "attachment" to Content-Disposition | False |
23+
| Storage Protection | | True |
24+
| The maximum repository size | | False |
25+
| The maximum sandbox repository size | | False |
26+
27+
4. Click **Test** to validate the URLs, token, and connection.
28+
29+
30+
## How to Access the File Management UI
31+
32+
### Access the File Management UI by URL and Port (HTTP)
33+
In a web browser, go to **`http://<cortex-xsoar-server-address>:<listen_port>`**.
34+
35+
### Access the File Management UI by Instance Name (HTTPS)
36+
37+
To access the File Management UI by instance name, make sure ***Instance execute external*** is enabled.
38+
39+
1. In Cortex XSOAR, go to **Settings > About > Troubleshooting**.
40+
2. In the **Server Configuration** section, verify that the `instance.execute.external.<instance_name>` key is set to `true`. If this key does not exist, click **+ Add Server Configuration** and add the `instance.execute.external.<instance_name>` and set the value to `true`. See [this documentation](https://xsoar.pan.dev/docs/reference/articles/long-running-invoke) for further information.
41+
3. In a web browser, go to `https://<cortex-xsoar-address>/instance/execute/<instance_name>/`.
42+
43+
In Multi Tenant environments, go to `https://<cortex-xsoar-address>/acc_<account name>/instance/execute/<instance_name>/`
44+
45+
46+
## Commands
47+
You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook.
48+
After you successfully execute a command, a DBot message appears in the War Room with the command details.
49+
### wfr-status
50+
***
51+
Get the service status
52+
53+
54+
#### Base Command
55+
56+
`wfr-status`
57+
#### Input
58+
59+
| **Argument Name** | **Description** | **Required** |
60+
| --- | --- | --- |
61+
62+
63+
#### Context Output
64+
65+
| **Path** | **Type** | **Description** |
66+
| --- | --- | --- |
67+
| WebFileRepository.Status.StorageUsage | number | The current storage usage in bytes |
68+
| WebFileRepository.Status.SandboxUsage | number | The current sandbox usage in bytes |
69+
| WebFileRepository.Status.StorageProtection | string | The storage protection mode |
70+
| WebFileRepository.Status.IntercommunicationIP | string | The IP address of the service to which the internal client connects |
71+
| WebFileRepository.Status.IntercommunicationPort | number | The port number of the service to which the internal client connects |
72+
| WebFileRepository.Status.ExternaIP | unknown | The external IP address of the service |
73+
| WebFileRepository.Status.ExternalPort | unknown | The external port number of the service |
74+
| WebFileRepository.Status.ServerIP | string | The IP address of the service |
75+
| WebFileRepository.Status.ServerPort | number | The port number of the service |
76+
77+
### wfr-cleanup
78+
***
79+
Remove all the files from the repository
80+
81+
82+
#### Base Command
83+
84+
`wfr-cleanup`
85+
#### Input
86+
87+
| **Argument Name** | **Description** | **Required** |
88+
| --- | --- | --- |
89+
90+
91+
#### Context Output
92+
93+
There is no context output for this command.
94+
### wfr-upload-files
95+
***
96+
Upload files to the repository
97+
98+
99+
#### Base Command
100+
101+
`wfr-upload-files`
102+
#### Input
103+
104+
| **Argument Name** | **Description** | **Required** |
105+
| --- | --- | --- |
106+
| entry_ids | The entry ID list of files. | Required |
107+
| extract_archive | Set to true to extract files to archive files, otherwise false. Possible values are: true, false. Default is false. | Optional |
108+
| upload_directory | The directory path where to upload. Default is /. | Optional |
109+
110+
111+
#### Context Output
112+
113+
There is no context output for this command.
114+
### wfr-list-files
115+
***
116+
List files in the repository
117+
118+
119+
#### Base Command
120+
121+
`wfr-list-files`
122+
#### Input
123+
124+
| **Argument Name** | **Description** | **Required** |
125+
| --- | --- | --- |
126+
| directory | The directory path where to list files. Default is /. | Optional |
127+
| recursive | Set to true to list subdirectories recursively, otherwise false. Possible values are: true, false. Default is false. | Optional |
128+
129+
130+
#### Context Output
131+
132+
| **Path** | **Type** | **Description** |
133+
| --- | --- | --- |
134+
| WebFileRepository.Files.Name | string | The file name |
135+
| WebFileRepository.Files.Path | string | The file path |
136+
| WebFileRepository.Files.Size | number | The file size in bytes |
137+
| WebFileRepository.Files.LastModified | date | The last modified time |
138+
139+
### wfr-remove-files
140+
***
141+
Remove files from the repository
142+
143+
144+
#### Base Command
145+
146+
`wfr-remove-files`
147+
#### Input
148+
149+
| **Argument Name** | **Description** | **Required** |
150+
| --- | --- | --- |
151+
| paths | The list of the file paths. | Required |
152+
153+
154+
#### Context Output
155+
156+
There is no context output for this command.
157+
### wfr-download-file
158+
***
159+
Download a file from the repository
160+
161+
162+
#### Base Command
163+
164+
`wfr-download-file`
165+
#### Input
166+
167+
| **Argument Name** | **Description** | **Required** |
168+
| --- | --- | --- |
169+
| path | The file path. | Required |
170+
| save_as | The name to give the file to save. | Optional |
171+
172+
173+
#### Context Output
174+
175+
There is no context output for this command.
176+
### wfr-archive-zip
177+
***
178+
Download a file to which all the files are archived
179+
180+
181+
#### Base Command
182+
183+
`wfr-archive-zip`
184+
#### Input
185+
186+
| **Argument Name** | **Description** | **Required** |
187+
| --- | --- | --- |
188+
| save_as | The name to give the archive-file to save. | Optional |
189+
190+
191+
#### Context Output
192+
193+
There is no context output for this command.
194+
### wfr-reset
195+
***
196+
Reset the repository data
197+
198+
199+
#### Base Command
200+
201+
`wfr-reset`
202+
#### Input
203+
204+
| **Argument Name** | **Description** | **Required** |
205+
| --- | --- | --- |
206+
207+
208+
#### Context Output
209+
210+
There is no context output for this command.

0 commit comments

Comments
 (0)