Commit Graph
3154 Commits
Author SHA1 Message Date
Juan Denis 8a6da421e4 Merge pull request #279 from jhd3197/dev
Release: adopt existing host sites, authz advisory fixes, and 2FA enrollment
v1.11.45
2026-11-28 15:17:05 -05:00
Juan Denis 8ac2635b84 Merge main into dev for release promotion [skip version] 2026-11-28 15:10:26 -05:00
github-actions[bot] 2f28e56f08 chore: bump version to 1.11.45 [skip ci] 2026-11-28 19:14:43 +00:00
Juan Denis 70f268a0ef Merge pull request #273 from jhd3197/fix/2fa-enrollment-secret-reuse
Reuse the pending 2FA enrollment secret
v1.11.44-dev.70f268a
2026-11-28 14:07:00 -05:00
Juan Denis 1205a2506d Use shared JWT helpers in 2FA tests
The new setup-endpoint tests minted tokens directly, which the
one-door ratchet rejects. They now use headers_for. The race path
for an already-confirmed user raises ConflictError instead of
returning a hand-shaped error body, so the inventory count stays
at 849. The setup route reads the optional regenerate flag through
json_object.
2026-11-26 02:55:32 -05:00
github-actions[bot] 023ceb4d90 chore: bump version to 1.11.44 [skip ci] 2026-11-26 07:43:46 +00:00
Juan Denis bc750ea6e4 Show the older-QR hint on enroll 2026-11-26 02:42:34 -05:00
Juan Denis b156e2dce1 Keep the 2FA setup modal open until cancelled
Overlay click and Escape closed the setup modal and dropped the user
onto the Change password form. Add a Modal closeOnDismiss prop (default
unchanged) and use it for the setup modal; Cancel and the header X still
close it.

Guard Enable with a ref-based single-flight lock in both the settings
tab and the setup wizard so a double-click cannot fire two requests, and
show a hint after a failed confirm that the code may belong to an older
QR. Add the string to every locale.
2026-11-26 02:38:47 -05:00
Juan Denis 9bb3672551 Reuse the pending 2FA setup secret
initiate_setup minted and committed a new secret on every call, so a
second Enable click, a double-click or reopening the setup window threw
away the secret the user had just scanned and the authenticator's code
never verified.

Reuse the unconfirmed secret unless none exists or the caller sends
{"regenerate": true}. The user row is locked for the call so concurrent
/auth/2fa/setup requests cannot both invent a secret. Confirmed users
still get 400 and are never rotated. TOTP parameters are unchanged.

Tests cover reuse, confirm with the reused secret, regenerate, the 400
for confirmed users, and the QR being built from the otpauth URI.
2026-11-26 02:38:47 -05:00
Juan Denis 1e733d0bf8 Merge pull request #270 from jhd3197/claude/serverkit-work-tree-issues-33a9d1
Adopt existing host sites and close four authz gaps
v1.11.43-dev.1e733d0
2026-11-26 02:30:59 -05:00
Juan Denis 2366d8b9bf Mount site adoption on the apps blueprint
The adoption routes added a blueprint to the curated core
registry, which is kept exact on purpose. They now register on
the existing apps blueprint as an area module, the way the
server area modules do, under /apps/host-sites.

The host-managed check becomes a function that compares the
attribute, so services handed a stand-in app object (as the
lifecycle tests do) get False instead of an AttributeError.
2026-11-22 02:44:27 -05:00
Juan Denis ebb19c8444 Read through services in the scoped routes
The workspace-scoped mobile and shared-variable routes queried
models in the controller, which the boundary inventory counts
as new crossings. They now go through WorkspaceService and
ManagedDatabaseService; the baseline drops the two crossings
the mobile routes no longer make.
2026-11-22 02:41:56 -05:00
Juan Denis 7768318e31 Raise typed errors from site adoption
The adoption routes shaped their own error bodies, which the
hand-shaped-error ratchet counts. The service now raises the
typed application errors and the global handler owns the body.
PHP_ETC_DIR stops reading the environment: nothing sets it.
2026-11-22 02:41:54 -05:00
Juan Denis 64181c5520 Hold workspace viewers to read-only on servers
GHSA-m72h-hc66-5jwx: server routes checked that the caller could
reach the server but not that they could write in its workspace,
so a member capped to viewer there could still re-pair the agent,
rename the server or edit its IP allow-list.

The write check now lives in the one helper every server route
resolves its server through, applied to mutating requests, so a
new route cannot forget it.
2026-11-22 02:30:16 -05:00
Juan Denis 1c6c43326e Authorize resolved shared-variable reads
GHSA-893r-j92f-5q9x: both resolved-variables routes took the
resource id, and the hierarchical one its workspace, project and
environment ids, straight from the query string and checked none
of them. Any account could name another workspace's id and read
its variable groups.

The caller must now be able to read the target resource and
every scope asked for; unknown resource types fail closed.
2026-11-22 02:30:14 -05:00
Juan Denis 60030b0b4e Keep backup hooks and app creation from viewers
GHSA-vrwv-j8w5-p94q: POST /apps took any authenticated account,
so a read-only viewer could create an app, own it, and set its
pre-backup hook, which the panel runs as a shell command on its
own host.

Creating a service now needs a developer or admin. Changing a
hook needs an admin, and the service refuses it by default, so
a new caller that forwards request data cannot hand out shell
access. Sending a hook back unchanged is not a change, so a
policy read by its owner still round-trips.
2026-11-22 02:30:11 -05:00
Juan Denis f605c6b95f Document adopting and hand-migrating a site
Adds the adopt-in-place mode to the coexistence guide, with what
a host-managed service does and does not let the panel do, and a
hand-migration checklist that ends in adoption so a migration no
longer bypasses the data model. Regenerates the API inventory.

Part of #269.
2026-11-22 02:13:13 -05:00
Juan Denis 7bc25e54c3 Offer unmanaged host sites on Services
When this server's nginx serves sites no service accounts for,
Services shows an Adopt button with the count; the dialog lists
each site with what was detected and adopts it in one click. The
button is absent on a host with nothing to adopt, so the top bar
stays quiet. Host-managed rows drop the start/stop controls and
the detail page names how they are run.

Part of #269.
2026-11-22 02:10:36 -05:00
Juan Denis 933216e911 Add serverkit adopt-site
Lists the sites host nginx serves, shows what adopting one
would record, and registers it with --apply. list-sites now
names a PHP-FPM site instead of calling it "port static".

Part of #269.
2026-11-22 02:02:48 -05:00
Juan Denis 4ba435243f Adopt sites already running on the host
A site set up by hand or by a migration serves traffic but has
no application, domain or WordPress row, so the panel cannot
see it. Every existing entry point creates something (a vhost,
a copy of the files), which is wrong for a site that is live.

Discovery reads the live nginx config, the PHP-FPM pools, the
certificate and wp-config.php. Adopting writes rows only, as a
dry run unless asked otherwise. The app is managed_by 'host',
and the vhost writer, drift repair, lifecycle and delete paths
leave its running config alone. The doctor reports sites nginx
serves that no application accounts for.

Part of #269.
2026-11-22 02:02:44 -05:00
Juan Denis 73e2251e28 Stop --help from running site commands
`serverkit add-site --help` wrote a vhost for a site named
"--help" and `setup-proxy --help` reran the proxy setup, which
reset the panel's certificate paths. Subcommands that take plain
positionals now print their usage for --help/-h and stop before
any command code runs, and add-site/remove-site refuse a name
that is not a hostname.

Part of #269.
2026-11-22 01:50:18 -05:00
Juan Denis f68819da02 Let ACME challenges past the dotfile deny
The shipped vhosts deny dotfiles with `location ~ /\.`, which
also matches /.well-known/acme-challenge/. nginx prefers a
matching regex location over a plain prefix one, so on the plain
HTTP vhost (both in one server block) HTTP-01 answered 403 and
issuance and renewal failed; a hand fix was undone by the next
update re-copying the file. `^~` stops the regex pass.

Part of #269.
2026-11-22 01:50:15 -05:00
Juan Denis 43c87cd5eb Scope fleet-wide server reads to the workspace
GHSA-qcjj-hf95-6rgw: the workspace check landed on every
<server_id> route, but the routes that list, search or export
across the fleet take no id in the path, so they kept answering
from unfiltered Server and ServerMetrics queries. Any account,
down to a viewer in no workspace, could enumerate other
workspaces' servers and read their metric history.

The fleet-monitor reads (heatmap, comparison, alerts, thresholds,
anomalies, search, both exports) and the mobile summary and
offline cache now take the caller and apply the rule GET /servers
uses. A sweep over every parameterless GET route found three more
of the same shape, fixed here too: the proxy overview, the
metrics retention stats, and server-group membership.
2026-11-22 01:44:59 -05:00
Juan Denis 2132f675c6 Merge pull request #259 from jhd3197/dev
Release: app network limit, WordPress PhpRedis and MySQL 8.4, dependency updates
v1.11.43
2026-11-14 23:38:19 -05:00
Juan Denis 86e6c7a088 Merge main into dev for release promotion [skip version] 2026-11-14 23:31:50 -05:00
github-actions[bot] 5e3c030f1d chore: bump version to 1.11.43 [skip ci] 2026-11-15 04:23:41 +00:00
Juan Denis ae2e3d23bc Sync bundled registry index to WordPress 1.0.6 v1.11.42-dev.ae2e3d2 2026-11-14 23:17:41 -05:00
Juan Denis 43c4872b56 Stream the pool-retry test through the shared stub
The streaming retry test patched subprocess.Popen by hand, which
the stub-adoption ratchet counts. The shared FakePopen could not
stand in because its stdout had no readline(); it does now, so the
test scripts the two compose runs through fake_subprocess instead.
2026-11-14 22:54:09 -05:00
Juan Denis 9d97a1c305 Give new WordPress sites PhpRedis and MySQL 8.4
Object Cache Pro refuses to start without the redis PHP extension,
which the upstream wordpress image does not ship, so the runtime image
now builds it and fails the build if it does not load.

Site Health flags MySQL 8.0 as outdated and WordPress recommends 8.4,
so new sites are created on 8.4. Existing sites keep the database
they have; nothing upgrades a data directory in place.

Fixes #252
Fixes #253
2026-11-14 22:28:04 -05:00
Juan Denis ccfd68607b Pin a subnet when Docker's address pools run out
Every compose project takes a bridge network from Docker's default
pools, and a stock daemon has about thirty. Past that every new stack
failed at network creation with "all predefined address pools have
been fully subnetted", however idle the host was.

compose up now answers that failure by giving the project's networks
a /26 from SERVERKIT_COMPOSE_SUBNET_POOL (10.213.0.0/16) and starting
again. The pin goes into the project's own compose file: a separate
override is undone by any plain compose up, which recreates the
network from the exhausted pools.

Fixes #254
2026-11-14 22:28:01 -05:00
Juan Denis 80f3b676a1 Bump backend dependencies
Takes the weekly backend group (SQLAlchemy, Flask-SocketIO,
python-socketio, click, boto3, Authlib, prompture), the tomli and
tzlocal floors, and two majors: Flask-Limiter 4 and psutil 7.

Flask-Limiter 4 binds the key function exactly as 3.5 did, so limits
key the same way. psutil 6 renamed Process.connections() and will
remove the old name; the process detail now calls net_connections().

Supersedes Dependabot PRs 256, 212, 210, 209 and 207.
2026-11-14 22:27:59 -05:00
Juan Denis c5eddd57ef Hold React 19 and ESLint 10 in Dependabot
Neither is a version bump. Runtime extensions are published bundles
that resolve React to the panel's own copy, so React 19 has to be
proven against every shipped extension first; and eslint-plugin-react
7.x still peers on eslint <= 9, so npm ci cannot resolve ESLint 10.

Closes the standing PRs 213, 214 and 215 instead of leaving them red.
2026-11-14 22:26:35 -05:00
Juan Denis b82420e586 Bump frontend dependencies
Takes the weekly frontend group (@xyflow/react, lucide-react,
@vitejs/plugin-react, globals, playwright, sass, vite, the Windows
rollup binary) and xterm 6. The fit and web-links addons were already
on the releases that pair with xterm 6.

Supersedes Dependabot PRs 255 and 211.
2026-11-14 22:26:32 -05:00
Juan Denis 8335aa940d Merge pull request #258 from jhd3197/dev
One list-page shell and per-KPI overview blocks
2026-11-14 21:59:09 -05:00
github-actions[bot] 25b116b5d9 chore: bump version to 1.11.42 [skip ci] 2026-11-15 00:27:12 +00:00
Juan Denis 423f4a8393 Update Monitoring layout baselines
One block per KPI, and the empty-monitors notice as a short
block; the images are the ones CI rendered for this change.
2026-11-14 19:20:16 -05:00
Juan Denis 2bef454045 Update layout baselines for the list shell
Services, SSL and Queue no longer carry a filter icon or a tools
menu; the images are the ones CI rendered for this change.
2026-11-14 19:10:02 -05:00
Juan Denis 8453631d99 Keep KPI tiles compact when the board stacks
Below tablet width every block stacks full width at a chart's
height, which turned each one-number tile into a tall empty card.
Tiles now sit two to a row at their own height.

The "nothing is watched yet" notice is its own short block, so a
page with no monitors is a line and a button instead of a tall
empty list beside the host tiles.
2026-11-14 19:09:58 -05:00
Juan Denis 4ba740a12d Guard the list-page shell in lint
check-list-chrome fails a table that grows its own filter icon or
tools menu, hoists controls into the top bar, orders the bar
differently, or adds a KPI strip outside the remaining allowlist.
2026-11-14 18:36:29 -05:00
Juan Denis 2871da1458 Make each overview KPI its own board block
An overview section that wraps a whole strip of KPI tiles is one
block on a board meant to be rearranged tile by tile. Each KPI is
now an OverviewSection with `tile`: the frame is the tile's card,
with no header outside edit mode. `replaces` swaps a retired block
in a saved layout for the blocks it was split into.

Applied to Monitoring, Backups, Server, Security and Workspace.
Security and Workspace move onto the overview board to get there,
so the backend accepts their layout scopes.
2026-11-14 18:36:24 -05:00
Juan Denis 36f8285bf3 Fold table controls into the view selector
Every list page placed its filter, tools menu, search and create
button differently: four homes for the filter and "⋮", three button
styles and five orders in the top bar.

The view selector's menu now holds filters and fields, copy link,
export, refresh and reset on every table (chrome.pickerProps), and
the top bar is always secondary buttons, create, then search
(ListActions / useListTopbar). PageLayout pages can publish into
their own bar, which puts Docker on the same shell as Servers.

Docker's KPI strip is gone, along with the four list fetches it
made only to count rows.
2026-11-14 18:36:13 -05:00
Juan Denis c9aa8bcbf0 Merge pull request #257 from jhd3197/dev
Release: unified detail pages, editable overviews, leaner list chrome
v1.11.41
2026-11-14 15:26:12 -05:00
github-actions[bot] 623a9622ba chore: bump version to 1.11.41 [skip ci] 2026-11-14 20:24:37 +00:00
Juan Denis 2732c97907 Tidy the Files toolbar
The row under the top bar held the search box, two wide selects, a
layout toggle and three icons beside the path, so the path it exists
to show was the smallest thing in it.

Search moves into the top bar, where every other page has it. Kinds,
sort order and hidden files become one View menu; the row keeps
navigation, the path, the layout toggle and refresh. The breadcrumb no
longer prints a separator after the root.
2026-11-14 15:08:42 -05:00
Juan Denis 5f23e9fe6d Put Monitoring and Backups on the overview board
Their overviews are now boards like the server and service ones: each
panel is a block that can be moved, resized, removed or opened
fullscreen, with dashboard widgets alongside (Monitoring's follow the
host the page is scoped to). Layouts are saved per user under two new
board scopes.

Every board gets a quiet "Edit overview layout" link under its blocks,
so pages without a menu of their own have a way in. Monitoring layout
baselines updated.
2026-11-14 14:59:05 -05:00
Juan Denis 74c24b93b3 Put the style guide on the page shell
The style guide dropped a PageTopbar and a tab strip into the padded
content well, so its bar floated with a gutter on every side: the
arrangement its own "Page headers" section warns against. It now uses
PageLayout, with the sections as the bar's tabs.
2026-11-14 14:59:01 -05:00
Juan Denis 6ecd3245bc Fold the servers table controls into the view
The servers top bar carried Groups, Sync, Add, search, a filter icon
and a tools menu, and the table opened with every column it had, so it
scrolled sideways.

The view selector's menu now holds Filters and fields, the table tools
(copy link, export, reset) and Manage groups; the top bar keeps Sync,
Add and search. The table opens with eight columns. Everything else
the list returns about a server is an optional field: services and
domains counts, IP, OS, architecture, cores, capacity, Docker, tags,
date added. Reset returns to that default set, not to "show all".

The Fields pane splits into what is in the table (reorder, switch off)
and the fields that can be added, with a search once the list is long.

GridViewPicker takes `filters`, `tools` and `extra`; GridToolsMenu's
content is now GridToolsPanel so it can live in either place. Other
tables keep their top-bar controls for now.
2026-11-14 14:46:24 -05:00
Juan Denis 4fa5caef79 Report services and domains per server
The server list could not say what a server carries. It now returns
services_count and domains_count for every row, computed for the whole
list in two queries and limited to the services the caller may see, so
a count never reveals something they have no access to.
2026-11-14 14:37:33 -05:00
Juan Denis ebf19e8a9e Rework the filters and fields drawer
The header repeated its own tabs ("Filters and fields" over tabs
reading Filters and Fields, a subtitle restating both counts), and an
empty filter list still showed a Match all/any sentence with nothing
to match.

The pane switch is now the header. An empty Filters pane offers the
filterable fields as one-tap chips; with conditions, the and/or switch
sits between them and Add condition follows the list. The footer
reports how many rows the conditions leave. Fields lists only named
columns and counts shown of total.

ds/Drawer gains `headless` for bodies that bring their own header; the
title stays for assistive tech.
2026-11-14 14:24:15 -05:00
Juan Denis 026b963c41 Drop the dashboard's Setup health banner
The status bar already shows the setup score on every page and opens
the same review, so the banner repeated it at the top of the dashboard.
Dashboard layout baselines updated.
2026-11-14 14:09:29 -05:00