Skip to content

Changes on top of v0.7.4, bump to 0.7.5 - #8

Merged
CorentinFelten merged 4 commits into
28Pollux28:masterfrom
CorentinFelten:feat/upstream-next
Nov 12, 2026
Merged

CorentinFelten merged 4 commits into
28Pollux28:masterfrom
CorentinFelten:feat/upstream-next

Conversation

@CorentinFelten

Copy link
Copy Markdown
Collaborator

Three changes on top of v0.7.4 (and #7), one commit each, plus the version bump to 0.7.5 so master builds are tagged 0.7.5-B<n>:

  • Connection info lists every HTTP endpoint, one per line, ordered by compose service: each host of each Traefik router rule as https://<host>/. Only the first routed container was reported, so a challenge with several web services showed only one, depending on the order Ansible listed the containers. Without any route, the published ports of every container are listed (sorted by container port) instead of only the first container's. With show_tcp_ports (from Instance groups, configurable compose prefix, deploy fixes, and worker observability #7), ports follow the HTTP endpoints as before. Only routers' .rule labels are read, so author-written Traefik labels (entrypoints, tls, middlewares) no longer make the route random, and traefik.enable=false containers are skipped.
  • GET /admin/version returns the running version ({"version": "0.7.5"}), for Zync's compatibility check. Admin tokens only: no token, a wrong key, an unsigned or expired token get 401, player tokens 403, never with the version. /health is unchanged.
  • The API port no longer serves /metrics, which skipped authentication and exposed challenge names and team IDs. Metrics stay on the metrics server (port 5001, basic auth when metrics.password is set), which monitoring/prometheus.yml already scrapes.
  • Bump version to 0.7.5 (scripts/bump_version.sh patch output: constants, OpenAPI spec, generated API, CHANGELOG). Since constants.go already says 0.7.5, releasing after merge is tagging v0.7.5 on master rather than make bump-patch.

Note: #7 has no CHANGELOG entries, so the v0.7.5 section currently lists only these changes.

Tested: go test ./..., go vet ./..., golangci-lint (0 issues) locally, and CI on the fork (CorentinFelten#11, Lint and Test green).

GetConnectionInfo returned at the first container that had a Traefik
router label or a published port, so an instance with several
user-facing services (e.g. a web front end and an SSH service, both
exposed with expose:) reported only one of them, whichever Ansible
listed first. To find a route, it also took the first
traefik.http.routers.* label of a map, in random order: with
author-written router labels besides the rule (entrypoints, tls,
middlewares), the route was found or missed at random.

It now goes through every container, ordered by compose service then
name, and lists each Host() of each router rule as https://<host>/,
then each published IPv4 port as <scheme>://<host>:<port> (the port's
protocol hint, or its protocol), one per line without duplicates.
Only .rule labels are read, and containers with traefik.enable=false
are skipped. An instance with a single endpoint reports it as before.
Zync needs Galvanize's version to check that the two are compatible.
The project is open source, so a version also tells anyone which known
issues a deployment has: it is reported to admins only.

GET /admin/version returns {"version": "..."}, the version set at
startup (ServerOpts.Version, from the binary's Version). Like every
route but /health and /metrics, it requires a valid HS256 token signed
with the JWT secret, and the handler refuses any role but admin, so
requests without a valid token get 401 and player tokens 403, without
the version. /health is unchanged.

The JWT middleware setup moves to jwtMiddleware, so tests send real
requests through it: no token, a wrong key, an unsigned (alg none)
token, an expired admin token, player and role-less tokens.
The API served /metrics on its own port, skipped by the JWT
middleware, so anyone who could reach the API read every metric:
challenge names, team IDs, deployment counts. The route predates the
metrics server on :5001 (basic auth when metrics.password is set),
added later with the Prometheus and Grafana stack, which scrapes
instancer:5001 as the README documents.

Nothing else uses the API port's route: not the monitoring stack, the
load test, Zync, nor ctfd-management, whose Traefik router already
excludes /metrics. It is removed, along with its JWT exemption: the API
port now answers /metrics with 401, or 404 with a token. Request
metrics are still gathered and served on :5001, unchanged.
@CorentinFelten
CorentinFelten merged commit 3345b0c into 28Pollux28:master Nov 12, 2026
2 checks passed
@CorentinFelten
CorentinFelten deleted the feat/upstream-next branch November 12, 2026 01:16
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.

1 participant