From 7b6ab67fec39838e33e9a771afdd85833b122a810a65e87e5b9b136c4d74290f Mon Sep 17 00:00:00 2001 From: gsadmin Date: Sat, 8 Aug 2026 23:06:14 -0400 Subject: [PATCH 1/7] README: TLS intro reflects the encrypted-by-default listener The Networking section opened with "plain HTTP only, will not be added", written before Self-Signed TLS became the default and contradicting the subsection right below it. It now states the actual model - encrypted listener by default, public termination at the edge - and recommends Nginx UI as the edge. Co-Authored-By: Claude Fable 5 --- README.md | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index f2f464e..85cdb73 100644 --- a/README.md +++ b/README.md @@ -399,26 +399,21 @@ packages — lives inside its own directory, so instances never share state. ## Networking and TLS -ExecuteR serves **plain HTTP only — SSL/TLS termination is not supported in -the service itself and will not be added**. Terminating TLS inside every -application is yesterday's pattern; the state of the art is a dedicated edge -appliance or service that terminates TLS once, renews certificates -automatically (ACME/Let's Encrypt) and gives you layer-7 visibility — access -logs, request metrics, rate limiting, WAF hooks — for everything behind it: +ExecuteR encrypts its own listener **by default** with a self-managed +certificate chain — see [Self-Signed TLS](#self-signed-tls-on-by-default) +below. Public TLS termination still belongs at a dedicated edge: it +terminates TLS once with real certificates, renews them automatically via +ACME, and gives you layer-7 visibility — access logs, request metrics, rate +limiting, WAF hooks — for everything behind it. -| Edge | Notes | -|------|-------| -| [Caddy](https://caddyserver.com) | Automatic HTTPS out of the box; single binary, runs fine on **Windows** or Linux | -| [nginx](https://nginx.org) + [Nginx UI](https://nginxui.com) | The classic; Nginx UI adds a web console with ACME renewal and also installs on **Windows** | -| [HAProxy](https://www.haproxy.org) | High-throughput L4/L7 balancing and fine-grained traffic policy | -| [Zoraxy](https://zoraxy.aroz.org) | All-in-one reverse proxy with a friendly UI | +The recommended edge is **[Nginx UI](https://nginxui.com)** — a web console +for nginx with ACME renewal built in, and it installs on **Windows** too. -Put any of these in front on `:443` and forward to ExecuteR over HTTP. -Because forwarded headers are trusted from private address space by default -(next section), this works with zero ExecuteR-side configuration — the edge -handles certificates and encryption, ExecuteR handles the rest. For the -standalone Windows server the shortest path is installing Caddy (or Nginx UI -if you want a console) on the same host and proxying `localhost:9080`. +Put it in front on `:443` and forward the routes below. Because forwarded +headers are trusted from private address space by default (next section), +this works with zero ExecuteR-side configuration. For the standalone +Windows server the shortest path is installing Nginx UI on the same host +and proxying `localhost:9080`. ### Self-Signed TLS (on by default) -- 2.52.0 From 18b40c64b143a1bd4649fcc56ec0d67afdd5e276500ea452f5637aa1f5e7aff4 Mon Sep 17 00:00:00 2001 From: gsadmin Date: Sun, 9 Aug 2026 08:33:04 -0400 Subject: [PATCH 2/7] Release artifacts carry the product name [skip ci] MSIs, ZIPs and checksum files rename to ExecuteR-Agent-* and ExecuteR-Server-* across the packaging scripts, the CI staging/upload globs and the release asset filter. The agent-package bundle names the server serves (Agent.msi, Agent-.zip) are internal delivery paths and stay unchanged. Takes effect on the next release build. Co-Authored-By: Claude Fable 5 --- .gitea/workflows/ci.yml | 18 +++++++++--------- README.md | 5 +++-- scripts/Package-Agent.ps1 | 8 ++++---- scripts/Package-Server.ps1 | 16 ++++++++-------- scripts/Publish-Release.ps1 | 4 ++-- 5 files changed, 26 insertions(+), 25 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index e0d219a..953e0d7 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -112,12 +112,12 @@ jobs: -Runtimes win-x64,win-arm64,linux-x64,linux-arm64,osx-x64,osx-arm64 $stage = 'artifacts/agent-package' New-Item -ItemType Directory -Force $stage | Out-Null - $msi = "artifacts/Agent-${{ steps.ver.outputs.version }}.msi" - $zip = "artifacts/Agent-${{ steps.ver.outputs.version }}-win-x64.zip" + $msi = "artifacts/ExecuteR-Agent-${{ steps.ver.outputs.version }}.msi" + $zip = "artifacts/ExecuteR-Agent-${{ steps.ver.outputs.version }}-win-x64.zip" if (Test-Path $msi) { Copy-Item $msi "$stage/Agent.msi" } if (Test-Path $zip) { Copy-Item $zip "$stage/Agent.zip" } foreach ($rid in 'linux-x64','linux-arm64','osx-x64','osx-arm64') { - $unix = "artifacts/Agent-${{ steps.ver.outputs.version }}-$rid.zip" + $unix = "artifacts/ExecuteR-Agent-${{ steps.ver.outputs.version }}-$rid.zip" if (Test-Path $unix) { Copy-Item $unix "$stage/Agent-$rid.zip" } } '${{ steps.ver.outputs.version }}' | Set-Content "$stage/VERSION" -NoNewline @@ -143,12 +143,12 @@ jobs: with: name: binaries path: | - artifacts/Agent-*.zip - artifacts/Agent-*.msi - artifacts/Agent-*-checksums.txt - artifacts/Server-*.zip - artifacts/Server-*.msi - artifacts/Server-*-checksums.txt + artifacts/ExecuteR-Agent-*.zip + artifacts/ExecuteR-Agent-*.msi + artifacts/ExecuteR-Agent-*-checksums.txt + artifacts/ExecuteR-Server-*.zip + artifacts/ExecuteR-Server-*.msi + artifacts/ExecuteR-Server-*-checksums.txt retention-days: 7 images: diff --git a/README.md b/README.md index 85cdb73..d67dafe 100644 --- a/README.md +++ b/README.md @@ -327,7 +327,8 @@ docker compose up -d --build For a quick spin-up without containers, one self-contained `ExecuteR-Server` binary serves the WebUI (static SPA), the API, the `/messaging/*` WebSocket relay, and supervises a `nats-server` sidecar. CI publishes -`Server--win-x64.zip`, `…-linux-x64.zip` **and `Server-.msi`** +`ExecuteR-Server--win-x64.zip`, `…-linux-x64.zip` **and +`ExecuteR-Server-.msi`** (build locally with `./scripts/Package-Server.ps1`): ```text @@ -1045,7 +1046,7 @@ unchanged build is skipped (the object key is content-addressed by hash). For a local build without CI: ```powershell -./scripts/Package-Agent.ps1 # writes artifacts/Agent-.msi +./scripts/Package-Agent.ps1 # writes artifacts/ExecuteR-Agent-.msi # then mount that directory at /data/agent, or set AGENT_PACKAGE_PATH ``` diff --git a/scripts/Package-Agent.ps1 b/scripts/Package-Agent.ps1 index 22449c0..77bd4c6 100644 --- a/scripts/Package-Agent.ps1 +++ b/scripts/Package-Agent.ps1 @@ -58,7 +58,7 @@ foreach ($rid in $Runtimes) { Copy-Item $modulesStage (Join-Path $ridPublishDir 'Modules') -Recurse - $zipPath = Join-Path $artifacts "Agent-$Version-$rid.zip" + $zipPath = Join-Path $artifacts "ExecuteR-Agent-$Version-$rid.zip" if (Test-Path $zipPath) { Remove-Item $zipPath -Force } Compress-Archive -Path (Join-Path $ridPublishDir '*') -DestinationPath $zipPath Write-Host "Created $zipPath" @@ -85,15 +85,15 @@ if (-not $SkipMsi -and (Test-Path $wixProject) -and (Test-Path $publishDir)) { $msi = Get-ChildItem (Join-Path $repoRoot 'src/Installer/bin/Release') -Filter '*.msi' -Recurse | Sort-Object LastWriteTimeUtc -Descending | Select-Object -First 1 if ($msi) { - $msiTarget = Join-Path $artifacts "Agent-$Version.msi" + $msiTarget = Join-Path $artifacts "ExecuteR-Agent-$Version.msi" Copy-Item $msi.FullName $msiTarget -Force Write-Host "Created $msiTarget" } } # Checksums for release attachment. -$checksums = Join-Path $artifacts "Agent-$Version-checksums.txt" -Get-ChildItem $artifacts -File | Where-Object { $_.Name -like "Agent-$Version*" -and $_.Extension -ne '.txt' } | ForEach-Object { +$checksums = Join-Path $artifacts "ExecuteR-Agent-$Version-checksums.txt" +Get-ChildItem $artifacts -File | Where-Object { $_.Name -like "ExecuteR-Agent-$Version*" -and $_.Extension -ne '.txt' } | ForEach-Object { "{0} {1}" -f (Get-FileHash $_.FullName -Algorithm SHA256).Hash.ToLowerInvariant(), $_.Name } | Set-Content $checksums -Encoding utf8NoBOM Write-Host "Created $checksums" diff --git a/scripts/Package-Server.ps1 b/scripts/Package-Server.ps1 index 2efa32d..7c2ff33 100644 --- a/scripts/Package-Server.ps1 +++ b/scripts/Package-Server.ps1 @@ -77,13 +77,13 @@ foreach ($rid in $Runtimes) { # ── Bundle the agent installers so URL install works out of the box ───── $agentStage = Join-Path $publishDir 'agent-package' New-Item -ItemType Directory -Force $agentStage | Out-Null - $agentMsi = Join-Path $artifacts "Agent-$Version.msi" - $agentZip = Join-Path $artifacts "Agent-$Version-win-x64.zip" + $agentMsi = Join-Path $artifacts "ExecuteR-Agent-$Version.msi" + $agentZip = Join-Path $artifacts "ExecuteR-Agent-$Version-win-x64.zip" $staged = $false if (Test-Path $agentMsi) { Copy-Item $agentMsi (Join-Path $agentStage 'Agent.msi'); $staged = $true } if (Test-Path $agentZip) { Copy-Item $agentZip (Join-Path $agentStage 'Agent.zip'); $staged = $true } foreach ($unixRid in 'linux-x64', 'linux-arm64', 'osx-x64', 'osx-arm64') { - $unixZip = Join-Path $artifacts "Agent-$Version-$unixRid.zip" + $unixZip = Join-Path $artifacts "ExecuteR-Agent-$Version-$unixRid.zip" if (Test-Path $unixZip) { Copy-Item $unixZip (Join-Path $agentStage "Agent-$unixRid.zip"); $staged = $true } } if ($staged) { @@ -167,7 +167,7 @@ TRUSTED_HOSTS, TRUST_PROXY=0 to disable. "@ # ── Zip it ─────────────────────────────────────────────────────────────── - $zipPath = Join-Path $artifacts "Server-$Version-$rid.zip" + $zipPath = Join-Path $artifacts "ExecuteR-Server-$Version-$rid.zip" if (Test-Path $zipPath) { Remove-Item $zipPath -Force } Compress-Archive -Path (Join-Path $publishDir '*') -DestinationPath $zipPath Write-Host "Created $zipPath" @@ -194,17 +194,17 @@ if (-not $SkipMsi -and (Test-Path $serverWix) -and (Test-Path $winPublish)) { $msi = Get-ChildItem (Join-Path $repoRoot 'src/Installer.Server/bin/Release') -Filter '*.msi' -Recurse | Sort-Object LastWriteTimeUtc -Descending | Select-Object -First 1 if ($msi) { - $msiTarget = Join-Path $artifacts "Server-$Version.msi" + $msiTarget = Join-Path $artifacts "ExecuteR-Server-$Version.msi" Copy-Item $msi.FullName $msiTarget -Force Write-Host "Created $msiTarget" } } # Checksums for release attachment. -$checksums = Join-Path $artifacts "Server-$Version-checksums.txt" -Get-ChildItem $artifacts -File | Where-Object { $_.Name -like "Server-$Version*" -and $_.Extension -ne '.txt' } | ForEach-Object { +$checksums = Join-Path $artifacts "ExecuteR-Server-$Version-checksums.txt" +Get-ChildItem $artifacts -File | Where-Object { $_.Name -like "ExecuteR-Server-$Version*" -and $_.Extension -ne '.txt' } | ForEach-Object { "{0} {1}" -f (Get-FileHash $_.FullName -Algorithm SHA256).Hash.ToLowerInvariant(), $_.Name } | Set-Content $checksums -Encoding utf8NoBOM Write-Host "Created $checksums" -Get-ChildItem $artifacts -Filter "Server-$Version-*.zip" | Select-Object Name, Length +Get-ChildItem $artifacts -Filter "ExecuteR-Server-$Version-*.zip" | Select-Object Name, Length diff --git a/scripts/Publish-Release.ps1 b/scripts/Publish-Release.ps1 index 31b8540..978920e 100644 --- a/scripts/Publish-Release.ps1 +++ b/scripts/Publish-Release.ps1 @@ -53,9 +53,9 @@ catch { $artifacts = Join-Path $repoRoot 'artifacts' $assets = Get-ChildItem $artifacts -File | - Where-Object { $_.Name -like "Agent-$Version*" -or $_.Name -like "Server-$Version*" } + Where-Object { $_.Name -like "ExecuteR-Agent-$Version*" -or $_.Name -like "ExecuteR-Server-$Version*" } if (-not $assets) { - throw "No artifacts matching Agent-$Version* or Server-$Version* under $artifacts." + throw "No artifacts matching ExecuteR-Agent-$Version* or ExecuteR-Server-$Version* under $artifacts." } foreach ($asset in $assets) { -- 2.52.0 From 5da166b0b97dc1484d90d49f8e13466aa4f868be981260f02fc4ded3f5f0ef67 Mon Sep 17 00:00:00 2001 From: gsadmin Date: Sun, 9 Aug 2026 08:49:48 -0400 Subject: [PATCH 3/7] Deployment feedback: reset only on the default password, concise MSI text, no-expiry tokens [skip ci] The first-sign-in reset now presents only while the password is literally the built-in default - a custom install-time password signs straight in and clears a stale must-change flag. Bootstrap tokens accept validMinutes 0 for no expiry (pipelines), mirrored by a No expiry checkbox in the Add Device modal and a Never display in Settings. Both MSI dialogs lose the literal ampersands (NoPrefix labels render & as-is), get much shorter texts with real line spacing, and the network page relayouts with room to breathe. Co-Authored-By: Claude Fable 5 --- src/Backend/Api/BootstrapTokenEndpoints.cs | 18 +++++++-- src/Backend/Auth/AuthEndpoints.cs | 20 ++++++++-- src/Installer.Server/Product.wxs | 40 +++++++++---------- src/Installer/Product.wxs | 12 +++--- .../src/lib/components/AddDeviceModal.svelte | 18 ++++++--- src/WebUI/src/routes/settings/+page.svelte | 10 +++-- tests/Backend.Tests/InstallScriptTests.cs | 23 +++++++++++ tests/Backend.Tests/RoleTests.cs | 37 +++++++++++++++-- 8 files changed, 134 insertions(+), 44 deletions(-) diff --git a/src/Backend/Api/BootstrapTokenEndpoints.cs b/src/Backend/Api/BootstrapTokenEndpoints.cs index 6e5cbb8..f1b0a46 100644 --- a/src/Backend/Api/BootstrapTokenEndpoints.cs +++ b/src/Backend/Api/BootstrapTokenEndpoints.cs @@ -24,9 +24,19 @@ public static class BootstrapTokenEndpoints HttpContext context, CancellationToken cancellationToken) { - var lifetime = request?.ValidMinutes is > 0 - ? TimeSpan.FromMinutes(request.ValidMinutes.Value) - : ProtocolDefaults.BootstrapTokenDefaultLifetime; + // 0 disables expiry entirely (pipelines and pre-staged installers); + // absent keeps the 24-hour default. Revocation always applies. + if (request?.ValidMinutes is < 0) + { + return Results.BadRequest(new { error = "validMinutes must be 0 (no expiry) or positive." }); + } + + var expiresUtc = request?.ValidMinutes switch + { + 0 => DateTimeOffset.MaxValue, + > 0 => DateTimeOffset.UtcNow + TimeSpan.FromMinutes(request.ValidMinutes.Value), + _ => DateTimeOffset.UtcNow + ProtocolDefaults.BootstrapTokenDefaultLifetime, + }; // 0 means unlimited uses (expiry and revocation still apply). if (request?.MaxUses is < 0 or > 9999) @@ -45,7 +55,7 @@ public static class BootstrapTokenEndpoints Id = Guid.NewGuid(), TokenHash = TokenHashing.Sha256Hex(token), CreatedUtc = DateTimeOffset.UtcNow, - ExpiresUtc = DateTimeOffset.UtcNow + lifetime, + ExpiresUtc = expiresUtc, MaxUses = maxUses, Note = request?.Note, CreatedBy = actor, diff --git a/src/Backend/Auth/AuthEndpoints.cs b/src/Backend/Auth/AuthEndpoints.cs index b0f9774..37268d3 100644 --- a/src/Backend/Auth/AuthEndpoints.cs +++ b/src/Backend/Auth/AuthEndpoints.cs @@ -41,11 +41,15 @@ public static class AuthEndpoints app.MapGet(ApiRoutes.AuthOidcCallback, () => Results.Redirect("/")).AllowAnonymous(); } + /// The built-in default; signing in with it forces a reset. + private const string DefaultAdminPassword = "admin"; + private static async Task LoginAsync( LoginRequest request, UserService users, RoleCache roles, AuditService audit, + Backend.Data.AppDbContext db, HttpContext context, CancellationToken cancellationToken) { @@ -59,9 +63,11 @@ public static class AuthEndpoints return Results.Unauthorized(); } - // Valid credentials, but a defaulted password: no session until a real - // one is set (POST /api/auth/change-password completes the sign-in). - if (user.MustChangePassword) + // The reset presents only while the password is still the built-in + // default — a custom password chosen at install signs straight in, + // whatever the flag says (POST /api/auth/change-password completes + // the sign-in when the reset does apply). + if (user.MustChangePassword && request.Password == DefaultAdminPassword) { await audit.LogAsync(AuditCategories.Auth, "login-password-change-required", actor: user.Username, remoteIp: remoteIp, cancellationToken: cancellationToken); @@ -70,6 +76,14 @@ public static class AuthEndpoints MustChangePassword: true)); } + if (user.MustChangePassword) + { + // Stale flag with a non-default password: clear it. + var tracked = await db.Users.SingleAsync(u => u.Id == user.Id, cancellationToken); + tracked.MustChangePassword = false; + await db.SaveChangesAsync(cancellationToken); + } + var session = await IssueSessionAsync(user, roles, context, cancellationToken); await audit.LogAsync(AuditCategories.Auth, "login-succeeded", actor: user.Username, remoteIp: remoteIp, cancellationToken: cancellationToken); diff --git a/src/Installer.Server/Product.wxs b/src/Installer.Server/Product.wxs index fe2e116..b670cb3 100644 --- a/src/Installer.Server/Product.wxs +++ b/src/Installer.Server/Product.wxs @@ -143,17 +143,17 @@ + NoPrefix="yes" Text="Administrator username:" /> + NoPrefix="yes" Text="Administrator password:" /> - + + Text="Bind address (0.0.0.0 = every interface; 127.0.0.1 = local proxy only):" /> + Text="HTTP port (UI, API, agent enrollment):" /> - - - - - - - + + + + + + + - - + Text="Enable Self-Signed TLS (auto-renewed)" /> + - + + NoPrefix="yes" Text="Server URL (https://control.example.com):" /> + NoPrefix="yes" Text="Bootstrap token (one-time enrollment secret):" /> - + - + Text="Skip TLS verification (self-signed server; traffic stays encrypted)" /> ('single'); let multiUses = $state(1); let unlimited = $state(false); + let noExpiry = $state(false); let token = $state(''); let tokenId = $state(''); let baseUrl = $state(''); @@ -58,7 +59,7 @@ } const created = await api.createBootstrapToken({ - validMinutes: 24 * 60, + validMinutes: noExpiry ? 0 : 24 * 60, maxUses: effectiveUses, note: scope === 'single' @@ -181,6 +182,11 @@ {/if} +