Skip to content

Commit

Permalink
Merge pull request #113 from CybercentreCanada/malware_archive_fix
Browse files Browse the repository at this point in the history
Malware Archive configuration fix
  • Loading branch information
cccs-sgaron committed Feb 9, 2024
2 parents 607f8be + 024a1ea commit 48ae3c2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
28 changes: 15 additions & 13 deletions docs/installation/configuration/malware_archive.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
# Malware Archive section

Configuring the Malware Archive functionality is done by modifying the data storage section (`datastore:`) and the file storage section (`filestore:`). Refer to the [Malware Archive](../overview/architecture/#keeping-files-forever-malware-archive) to get an understanding of how this feature works.
Configuring the Malware Archive functionality is done by modifying the data storage section (`datastore`). Refer to the [Malware Archive](../overview/architecture/#keeping-files-forever-malware-archive) to get an understanding of how this feature works.

Enable the `archive:` option in the configuration to show the "Archive" link in the left navbar, activate the Archiver core component and create the archive indices in the database. The `indices:` list defines which indices will have an archive counterpart. This key is not required given its default values of `file`, `submission`, and `result`.
The minimum required change to turn on the Malware Archive is to set the `datastore.archive.enabled` flag to `true`. This will show the **Archive** link in the left navbar, activate the **Archiver** core component and create the archive indices in the database.

???+ example "Datastore section configuration example"
Optionally, you can also add a separate entry for the archive in the `filestore` so your archived files are not mixed with the non-archived files. Having a separate archive filestore will make some operations in the system faster. You can also configure the **Archiver** behaviour by setting a minimum service selection for all archived submission which means that if you try to archive a submission where not all those services ran, the **Archiver** will create a derived submission with the added services and will archive that new submission instead once it's done.

???+ example "Malware Archive configuration example"
```yaml
...
core:
archiver:
# List of services that must be selected for a submission to be archived. (optional)
# If a service is missing, the archiver will re-submit
# the file with the added services and archive that
minimum_required_services: ['Extract', 'Safelist', ...]
...
datastore:
# Datastore Archive feature configuration
archive:
# Are we enabling Achiving features across indices?
# Are we enabling the Archiving features? (required)
enabled: true

# List of indices the ILM Applies to
indices:
- file
- submission
- result

...
filestore:
# List of filestores used for malware archive
# List of filestores used for the malware archive (optional)
archive:
- s3://al_storage_key:Ch@ngeTh!sPa33w0rd@localhost:9000?s3_bucket=al-archive&use_ssl=False
...
Expand Down
5 changes: 3 additions & 2 deletions docs/user_manual/llm.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The AI integration can easily be turned on by editing the AI configuration secti
ai:
enabled: True
headers:
Api-Key: <OPENAI_APIKEY>
Authorization: Bearer <OPENAI_APIKEY>

...
```
Expand Down Expand Up @@ -116,7 +116,8 @@ The `ai` configuration block will also let you specify the other parameters sent

# Headers sent to the OpenAI API
headers:
Content-Type: "application/json"
Authorization: Bearer <OPENAI_APIKEY>
Content-Type: "application/json"

# Model used for the AI Integration
model_name: "gpt-3.5-turbo",
Expand Down

0 comments on commit 48ae3c2

Please sign in to comment.