Skip to content

Use Tesseract db for antispam #298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deployment/live/aws/conformance/ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ define a CI environment to run TesseraCT, backed by Trillian Tessera.

At a high level, this environment consists of:

- Aurora MySQL database
- Aurora MySQL database, used by Tessera both for sequencing and antispam
- S3 Bucket
- Secrets Manager
- ECS
Expand Down
13 changes: 12 additions & 1 deletion deployment/live/aws/conformance/ci/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,15 @@ include "root" {
expose = true
}

inputs = include.root.locals
inputs = merge (
include.root.locals,
{
# This hack makes it so that the antispam tables are created in the main
# tessera DB. We strongly recommend that the antispam DB is separate, but
# creating a second DB from Terraform is too difficult without a large
# rewrite. For CI purposes, testing antispam, even if in the same DB, is
# preferred compared to not testing antispam at all.
antispam_database_name = "tesseract"
create_antispam_db = false
}
)
4 changes: 2 additions & 2 deletions deployment/modules/aws/tesseract/conformance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module "storage" {
base_name = var.base_name
region = var.region
ephemeral = var.ephemeral
create_antispam_db = true
create_antispam_db = var.create_antispam_db
}

module "secretsmanager" {
Expand Down Expand Up @@ -171,7 +171,7 @@ resource "aws_ecs_task_definition" "conformance" {
"--db_port=3306",
"--signer_public_key_secret_name=${module.secretsmanager.ecdsa_p256_public_key_id}",
"--signer_private_key_secret_name=${module.secretsmanager.ecdsa_p256_private_key_id}",
"--antispam_db_name=${module.storage.antispam_database_name}",
"--antispam_db_name=${var.antispam_database_name}",
"--inmemory_antispam_cache_size=25000000", # About 1GB of memory.
"-v=2"
],
Expand Down
11 changes: 11 additions & 0 deletions deployment/modules/aws/tesseract/conformance/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,14 @@ variable "ecs_conformance_task_role" {
description = "Role assumed by conformance containers when they run."
type = string
}

variable "create_antispam_db" {
description = "Set to true to create another database to be used by the antispam implementation."
type = bool
default = false
}

variable "antispam_database_name" {
description = "The name of the antispam database."
type = string
}
Loading