feat(gateway): match systemd service name to gateway name#244
Conversation
New installs use the gateway name as the systemd service name (e.g. my-gateway.service) with config at /etc/infisical/gateways/<name>.conf. Legacy installs are detected and updated in place with a migration warning. Uninstall now requires a gateway name argument.
|
💬 Discussion in Slack: #pr-review-cli-244-feat-gateway-match-systemd-service-name-to-gateway-name Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel. |
|
| Filename | Overview |
|---|---|
| packages/gateway-v2/systemd.go | Core systemd management rewrite: adds legacy detection/migration and per-gateway service naming. Gateway name is interpolated into root-owned file paths without validation, enabling path traversal. Two additional minor error-handling gaps exist. |
| packages/gateway-v2/enroll.go | Refactors loadConfKey to delegate to a new readKeyFromConfFile helper that accepts a path directly; no functional logic changes. |
| packages/cmd/gateway.go | Updates install commands to capture and use the returned service name, and adds a required gateway-name argument to the uninstall command. Logic is straightforward and consistent. |
Reviews (1): Last reviewed commit: "refactor(gateway): remove no-op serviceN..." | Re-trigger Greptile
Summary
The systemd service name now matches the gateway name directly (e.g.
my-gateway.serviceinstead of the hardcodedinfisical-gateway.service), with config at/etc/infisical/gateways/<name>.conf. Legacy installs are detected and updated in place with a warning to migrate. Thesystemd uninstallcommand now requires a gateway name argument.Companion docs PR: Infisical/infisical#6624
Test plan