Skip to content

Flow matrix ​

Every network connection in the infrastructure, with its purpose and what allows it. Anything not in these tables is blocked.

Incoming flows from the Internet ​

#SourceDestinationPortWhyAllowed by
E1Internettrinity-prod · Traefik443, 80the site, the API and the docs; port 80 redirects to HTTPS and serves the Let's Encrypt challengeGCP trinity-allow-web, UFW 80 and 443
E2Internettrinity-dev · Traefik443, 80the dev site and APIGCP trinity-allow-web, UFW 80 and 443
E3Administratorsboth VMs22SSH: Ansible, administrationGCP default-allow-ssh, UFW 22, SSH key

Internal flows ​

Inside each VM, only through the Docker networks. Diagram: The two networks.

#SourceDestinationPortWhyAllowed by
I1Traefiktrinity_web, trinity_api, trinity_docs (prod)3000, 8000, 8080serve the site, the API and the docstrinity Docker network
I2apidb5432read and write productsinternal Docker network

Outgoing flows ​

#SourceDestinationPortWhy
S1the 3 runnersgitlab.com443ask for jobs and send logs back: the runner calls out, GitLab opens no connection to the servers
S2CI runner (*:build)registry.gitlab.com443push the api:<sha>, web:<sha>, docs:<sha> images
S3Swarm on trinity-prodregistry.gitlab.com443pull the commit's images at deployment
S4TraefikLet's Encrypt443obtain and renew certificates
S5trinity-dev (jobs and dev builds)Docker Hub, npm, PyPI443base images and dependencies
S6both VMsUbuntu, Docker, GitLab Runner repositories443packages and updates (Ansible)
S7webapi.trinity.jostud.com (its own Traefik)443server-side rendering calls the API at its public address (API_URL)

Flows outside our servers ​

#SourceDestinationWhy
X1GitLab.comGitHub (school repository)mirror: every push is copied, over SSH, with a key generated by GitLab
X2GitLab.comDatadog (us5.datadoghq.com)CI Visibility: durations and statuses of pipelines and jobs

Deliberately impossible ​

FlowWhy it is blocked
Internet to the database (5432)the database is only on the internal network, with no published port
Internet straight to the API, web or docs (8000, 3000, 8080)no published port: only Traefik exposes 80 and 443
Traefik to the databaseTraefik is not on the internal network
GitLab to the serversno deployment SSH key: the runners fetch the work themselves
SSH login with a passworddisabled: key only
Remote desktop (3389)default-allow-rdp rule deleted