From 2f2d2c1715fce4a566b57488a48dc520063b6709 Mon Sep 17 00:00:00 2001 From: WebX11 SysOp Date: Thu, 5 Nov 2026 23:49:03 +0100 Subject: feat(auth): self-service git push tokens from the dashboard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GET/POST /api/auth/gitpush-token (+ /revoke) on auth-api: session-scoped, CSRF-gated, 3 mints per account per hour, bcrypt into the htpasswd, plaintext returned once and never stored, audit at /var/lib/webx11/git-push-audit.jsonl. No sudo or reload needed: nginx re-opens auth_basic_user_file per request, so a new line is live immediately — proved by a 500 whose error line was per request. Dashboard card 'Git push token' shows none/active, mints and reveals the remote once, revokes. Verified in a real browser: badge none -> mint -> active, remote shape checked, then revoked; htpasswd back to 0 bytes and the test session removed. --- docs/usage.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage.html b/docs/usage.html index f25a074..52314fa 100644 --- a/docs/usage.html +++ b/docs/usage.html @@ -291,7 +291,7 @@ can never wedge. Nothing here can push — the repository refuses receive- generated from the platform's monorepo and a push to it would be erased by the next publish. Pushes go to a separate host that asks for credentials; the read-only host in your origin stays anonymous and read-only.

-
# 1. one token per account, issued by the platform operator
+
# 1. one token per account: Dashboard -> "Git push token" -> Create (shown once, revocable)
 #    (looks like: https://<user>:wx11gp_…@push.newos.webx11.duckdns.org/newos4.git)
 git remote add push https://push.newos.webx11.duckdns.org/newos4.git
 
-- 
cgit v1.2.3