Repository navigation
1.6.0
Authenticate before anything: every agent task endpoint checks the api-key before it reads the request body, builds a path or touches the disk — and every refusal looks the same.
Upgrade notes (read before rolling out)
CONTROL_PLANE_ENABLED=truenow requires your ownCONTROL_PLANE_TOKEN. The agent refuses to start when it is empty or the published defaultREPLACE_THIS_TEST_CONTROL_PLANE_TOKEN. With the control plane off nothing changes. The token is now masked in the startup log.- The config
typemust match the endpoint (ZIP_ARCHIVE,ZIP_DIRS,SAVE_ARTIFACT,FETCH_URL,JAR,WAR,NODE,DOCKER); another type gets 401. A config withouttypestill works, with a "has no type" warning in the agent log — add the field. Watch for an oldnodeconfig saved through the operator asJAR. Before upgrading, on each host:grep -H '"type"\|^type:' $CONFIG_DIR/*and compare with the endpoint each command is called through. - Command names outside
0-9 a-z A-Z . _ -or containing..get 401 (the operator never created such names). zip-dirs: the sub-path segments.and..are rejected.
Security fixes
zip-dirsescaped itsdir: Jetty 12 passes a raw..through to the servlet, so/zip-dirs/{name}/..extracted abovedir; a link insidedircould lead out too. Now./..are refused and the target must stay inside the canonicaldir. Also, an anonymous request created directories underdir— directories are now created only after authorization.- A key of one command worked on another endpoint: keys belong to a config name and
typewas never checked, so asave-artifactkey could unpack an arbitrary archive through/zip-archive/{same name}into the samedir(likewisejar/war/node). - Name enumeration and path disclosure: an unknown command name returned 500 with the absolute
CONFIG_DIRpath; empty or broken configs leaked parser messages. Every refusal — no key, wrong key, unknown command, broken config, another type — is now the same 401Unauthorized; the reason goes to the agent log only, never a key. - Control plane behind the published default token let anyone create a command with their own key and deploy through it — see the upgrade note.
Authorizationheader: onlyBasicis accepted (aBearervalue is no longer Base64-decoded), bad Base64 is a 401 instead of a 500, and a password may contain:.
Docs
- The false "a config without
apiKeysaccepts any request" is gone (the code already refused every request); security, configuration, installation and every command page describe the new checks, and each example config carries itstype.
Known issues: #99 (a misspelled type value reads as no type), #100 (Jetty 12 rejects /fetch-url/https://... with 400 — pre-existing).
Full docs: https://evsinev.github.io/dc-agent/
What's Changed
Full Changelog: 1.5.0...1.6.0