Skip to main content

Vertex — security and access

Principles: least privilege per environment · no inbound internet exposure · the vendor can reach stage only · no credential with deploy rights exists in the vendor-writable repository.

Security controls

Security groups (identical shape per environment)

Security groupAttached toInboundOutbound
vertex-<env>-task-sgFargate task ENINone443 → 0.0.0.0/0 (GHCR, AWS APIs, Google, Cloudflare) · tunnel ports per tunnel config · 465/587 SMTP · 5432 → ttg-<env>-rds-sg
ttg-<env>-nat-sgNAT instanceAll from vertex-<env>-task-sgAll → 0.0.0.0/0
ttg-<env>-rds-sgRDS instance5432 from vertex-<env>-task-sgNone
ttg-<env>-alb-sg (future)ALB443 from Cloudflare IP ranges (stage: + vendor CIDRs)vertex-<env>-task-sg

A security group cannot allowlist vendor IPs for tunnel or ECS Exec traffic, because both are initiated outbound from AWS. Vendor IP control is therefore enforced in Cloudflare (stage hostname) and IAM (aws:SourceIp).

IAM roles

RoleTrusted byPermissionsScope
vertex-<env>-deployGitHub OIDC, repo ttg-infra onlyecs:RegisterTaskDefinition, ecs:UpdateService, iam:PassRole (exec + task roles)Own env cluster
vertex-<env>-exececs-tasks.amazonaws.comRead vertex-<env>/* secrets, write /vertex/<env>/* logsOwn env
vertex-<env>-taskecs-tasks.amazonaws.comECS Exec channel onlyOwn env
vertex-vendor-stageVendor IAM principalsecs:ExecuteCommand, read logs, condition aws:SourceIp ∈ vendor_cidrs with explicit deny otherwiseStage only

No AWS role trusts the vertex repository.

Secrets (AWS Secrets Manager, AWS-managed keys)

SecretContentsConsumers
vertex-<env>/appJSON: db-url, Google client id/secret, SMTP key, internal token, tunnel tokenInjected per key; the tunnel token goes to cloudflared only
vertex-<env>/ghcrGHCR username + read-only token (classic PAT, read:packages)ECS execution role (image pull)
ttg-<env>/rds-master (RDS-managed)Master credentials of the common RDS instanceAdministrator only

Access matrix

CapabilityAdminttg-infra CIvertex CIVendor (allowlisted IP)Internet
Deploy prod
Deploy stage
Shell into stage task
Shell into prod task
Reach task / RDS network directly