As we reach the end of September 2024, ThreadFix version 3.x on-premises has officially reached its End-of-Life. Therefore, there is no longer support or updates for this version of the product. We have fully transitioned our product and development teams to focus ThreadFix SaaS and migrating all customers over from the on-premises versions. Our Customer Success and Support teams are here to help you in migrating to ThreadFix SaaS and maximizing the value you see from this improved offering from Coalfire. This is the next phase of ThreadFix and our team is looking forward to continuing to support you on this journey.
MySQL - AppSec Only
You will learn
By default, ThreadFix installs with a database deployed inside a container with the appropriate values already set. The following instructions cover installation of ThreadFix with an external database or other advanced database configurations.
Note: Unless otherwise specified, ThreadFix expects default values.
Prerequisites
Audience: IT Professional
Difficulty: Intermediate
Time needed: Approximately 25 minutes
Tools required: MySQL cli or Kubernetes cluster with MySQL container
Requirements:
MySQL server running MySQL 8
FQDN or IP for the MySQL server
Account with Administrative access to MySQL
Account with permissions to modify MySQL configuration
Helm installations are configured with yaml files that override default properties. The following examples would need to be invoked with the command -f .yaml
appended to the helm installation command. For example, if the yaml file is namedappsec-db.yaml
, invoke with ‘helm install tf denimgroup/threadfix -f appsec-db.yaml
.
Infrastructure Database only supports MySQL, with the MySQL requirements being the same as AppSec’s.
Configuring External AppSec Database
The following properties must be set for the database to function correctly depending on the database size:
Small Databases
innodb_buffer_pool_size=12G
max_allowed_packet=1G
lower_case_table_names=1
## Pre 3.1.0 configs ##
max_allowed_packet=256MB
#tmp_table_size=6GB
#max_heap_table_size=6GB
Changes to prior recommendations
LowersÂ
max_allowed_packet
Disables/removes the following configs by default. Please note that this needs to be left configured or adjusted (most likely to lower values) for very large CSV Vulnerability Exports
#tmp_table_size=6G
#max_heap_table_size=6G
Medium & Large Databases
The following sample configurations have been tested against a MySQL server hosted on a t3a.2xlarge EC2 instance with 8 vCPU and 32.0 GB RAM.
Please consult ThreadFix Support or a DBA to help configure the database to ensure stability and performance.
## new configs recommended as of release 3.1.0 ##
# The buffer pools size should be 50-70% of overall ram
innodb_buffer_pool_size=16GB
innodb_buffer_pool_instances=16
lower_case_table_names=1
innodb_log_file_size=1GB
innodb_log_buffer_size = 256M
innodb_io_capacity=1000
join_buffer_size=256K
innodb_read_io_threads=10
innodb_write_io_threads=14
## Pre 3.1.0 configs ##
max_allowed_packet=256MB
#tmp_table_size=6GB
#max_heap_table_size=6GB
Consult vendors guides for how to properly set these values:
Log into MySQL using the MySQL CLI
If a local MySQL CLI is installed, it may be run directly (replace values in angle brackets,
<>
with their appropriate value).If a local MySQL CLI is not installed, the ThreadFix kubernetes cluster may be leveraged to run one:
kubectl run -it --restart=Never --rm --image=mysql:8 setup-db -- /bin/bash
When a bash prompt appear, run the MySQL CLI (replace values in angle brackets,<>
with their appropriate value)mysql -u<user> -h<hostname> -p
.
Validate that the lower_case_table_names parameter is correctly set.
The following output should appear:
Warning: If the above parameter is not set, the ThreadFix installation will fail. Attempting to install ThreadFix without this variable will cause issues with the installation that will be difficult to reverse.Create the ThreadFix database.
Â
Create the ThreadFix user (replace values in angle brackets,
<>
with appropriate values).Â
Grant access to the ThreadFix user.
Â
Exit the CLI with CTRL-C.
Validate the user login functions (replace values in angle brackets,
<>
with appropriate values).Â
Validate access to the database.
The output should show the following:
Create External Database Helm Values
To review the pre-requisites for hosting an SQL Server ThreadFix database externally, please refer to the MySQL database setup guides (recommended) or the Windows SQL Server Configuration guide (supported).
Create two files,
username.txt
andpassword.txt
, containing the username and password credentials respectively for the external database.Warning: The external database must already contain the database
threadfix
, and the username and password configured above must be granted all permissions on that database. For external MySQL instances, the instance must be run with the configurationlower_case_table_names=1
.Warning: Many text editing tools insert a trailing newline character,
\n
, to text files by default. If the text editor being used has this property, consult the documentation on how to disable this functionality.
Validate no newline characters have been added to the username and password files. The following should output 0 for both files.
Â
Create a kubernetes secret for the external database.
Â
Remove the previously created files.
Â
Set the FQDN or IP of the database (replace
<hostname>
with the FQDN or IP of the database).Â
Set the name of the database to be used (replace
<db-name>
with the appropriate value defaultthreadfix
).Â
Create myValues folder (if it does not exist).
Â
Create appsec-db.yaml.
Â
Complete any other tasks from the Installation Checklist , then Install with Helm.
Table of Contents
Â
www.threadfix.it | www.coalfire.com
Copyright © 2024 Coalfire. All rights reserved.
This Information Security Policy is CoalFire - Public: Distribution of this material is not limited.