File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed
Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -58,3 +58,34 @@ resource "aws_lb" "valentine" {
5858 " CostCentre" = var.billing_code
5959 }
6060}
61+
62+ # Serve security.txt as a fixed response from the ALB
63+ resource "aws_alb_listener_rule" "security_txt" {
64+ listener_arn = aws_lb_listener. valentine_listener . arn
65+ priority = 1
66+
67+ action {
68+ type = " fixed-response"
69+
70+ fixed_response {
71+ content_type = " text/plain"
72+ message_body = <<- EOT
73+ Contact: mailto:ZZTBSCYBERS@tbs-sct.gc.ca
74+ Contact: https://hackerone.com/tbs-sct/
75+ Canonical: https://${ replace (var. domain , " /^[^.]+\\ ./" , " " )} /.well-known/security.txt
76+ Expires: 2026-03-02T12:00:00.000Z
77+ Preferred-Languages: en, fr
78+ EOT
79+ status_code = " 200"
80+ }
81+ }
82+
83+ condition {
84+ path_pattern {
85+ values = [" /.well-known/security.txt" ]
86+ }
87+ }
88+ tags = {
89+ " CostCentre" = var.billing_code
90+ }
91+ }
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ module "rds_cluster" {
1010
1111 database_name = " valentine"
1212 engine = " aurora-postgresql"
13- engine_version = " 14.15 "
13+ engine_version = " 14.17 "
1414 instance_class = " db.t3.medium"
1515 instances = 1
1616 username = " valentine"
You can’t perform that action at this time.
0 commit comments