Skip to content

fix(deploy): add HTTPS support to ECS Terraform ALB configuration#8505

Open
camgrimsec wants to merge 1 commit intowindmill-labs:mainfrom
camgrimsec:security/terraform-alb-https
Open

fix(deploy): add HTTPS support to ECS Terraform ALB configuration#8505
camgrimsec wants to merge 1 commit intowindmill-labs:mainfrom
camgrimsec:security/terraform-alb-https

Conversation

@camgrimsec
Copy link
Copy Markdown

Add optional HTTPS listener with ACM certificate support to the ALB. When acm_certificate_arn is provided, the ALB:

  • Terminates TLS on port 443 with TLS 1.3 policy
  • Redirects HTTP (port 80) to HTTPS with 301

When no certificate is provided (default for development), the ALB falls back to HTTP-only mode with a clear variable description noting this is not recommended for production.

This follows Windmill's own self-host guidance which recommends TLS termination at the load balancer level.

Security impact: Prevents API tokens, script source code, database credentials, and OAuth tokens from flowing unencrypted between users and the Windmill server.

Add optional HTTPS listener with ACM certificate support to the ALB.
When acm_certificate_arn is provided, the ALB:
- Terminates TLS on port 443 with TLS 1.3 policy
- Redirects HTTP (port 80) to HTTPS with 301

When no certificate is provided (default for development), the ALB
falls back to HTTP-only mode with a clear variable description
noting this is not recommended for production.

This follows Windmill's own self-host guidance which recommends
TLS termination at the load balancer level.

Security impact: Prevents API tokens, script source code, database
credentials, and OAuth tokens from flowing unencrypted between
users and the Windmill server.
Copy link
Copy Markdown
Contributor

@rubenfiszel rubenfiszel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Security group missing port 443 ingress rule

The security group (security_group.tf) only allows inbound traffic on port 80. When HTTPS is enabled, the ALB listens on port 443, but there is no ingress rule for port 443 — HTTPS traffic will be blocked and the listener will be unreachable.

Suggested fix — add to security_group.tf:

ingress {
  from_port   = 443
  to_port     = 443
  protocol    = "tcp"
  cidr_blocks = ["0.0.0.0/0"]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants