Repository navigation
Changes on top of v0.7.3 - #10
Closed
CorentinFelten wants to merge 3 commits into
Closed
CorentinFelten wants to merge 3 commits into
CorentinFelten wants to merge 3 commits into
Conversation
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.
This was referenced Oct 2, 2026
Owner
Author
|
Superseded: merged upstream as 28Pollux28#8, released in v0.7.5. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three changes on top of v0.7.3, one commit each:
https://<host>/, then each published port as<scheme>://<host>:<port>(protocol hint, ortcp/udp). Only the first container's endpoint was reported, so a web front end plus an SSH service showed only one of them. Only router.rulelabels are read, so author-written Traefik labels no longer make the route random. Pairs with Zync's one-endpoint-per-line display (Show every endpoint of an instance zync#1).GET /admin/versionreturns the running version ({"version": "0.7.3"}), 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./healthis unchanged./metrics, which skipped authentication and exposed challenge names and team IDs. Metrics stay on the metrics server (port 5001, basic auth whenmetrics.passwordis set), which the provided Prometheus configuration already scrapes; nothing else used the API port's route.