@serve.zone/gitops 3.1.1 → 32.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.smartconfig.json +26 -7
- package/changelog.md +42 -0
- package/deno.json +1 -1
- package/dist_serve/bundle.js +327 -299
- package/dist_serve/bundle.js.map +1 -0
- package/dist_ts/00_commitinfo_data.js +2 -2
- package/dist_ts/cache/classes.cachedb.d.ts +1 -1
- package/dist_ts/cache/classes.cachedb.js +1 -1
- package/dist_ts/classes/connectionmanager.d.ts +41 -0
- package/dist_ts/classes/connectionmanager.js +143 -9
- package/dist_ts/opsserver/handlers/webhook.handler.d.ts +20 -0
- package/dist_ts/opsserver/handlers/webhook.handler.js +132 -14
- package/dist_ts/opsserver/helpers/webhookverification.d.ts +70 -0
- package/dist_ts/opsserver/helpers/webhookverification.js +158 -0
- package/dist_ts/plugins.d.ts +2 -1
- package/dist_ts/plugins.js +3 -2
- package/dist_ts/providers/classes.giteaprovider.d.ts +10 -0
- package/dist_ts/providers/classes.giteaprovider.js +11 -1
- package/dist_ts/providers/classes.gitlabprovider.d.ts +10 -0
- package/dist_ts/providers/classes.gitlabprovider.js +11 -1
- package/dist_ts_interfaces/data/connection.d.ts +27 -0
- package/dist_ts_interfaces/requests/webhook.d.ts +31 -0
- package/package.json +9 -9
- package/readme.md +60 -3
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/cache/classes.cachedb.ts +1 -1
- package/ts/classes/connectionmanager.ts +150 -8
- package/ts/opsserver/handlers/webhook.handler.ts +175 -14
- package/ts/opsserver/helpers/webhookverification.ts +202 -0
- package/ts/plugins.ts +2 -1
- package/ts/providers/classes.giteaprovider.ts +11 -0
- package/ts/providers/classes.gitlabprovider.ts +11 -0
- package/ts_interfaces/data/connection.ts +29 -0
- package/ts_interfaces/requests/webhook.ts +42 -0
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/appstate.ts +46 -0
- package/ts_web/elements/views/connections/index.ts +89 -0
- package/readme.todo.md +0 -3
package/.smartconfig.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@git.zone/tsdocker": {
|
|
3
|
-
"registries": [
|
|
3
|
+
"registries": [
|
|
4
|
+
"code.foss.global"
|
|
5
|
+
],
|
|
4
6
|
"registryRepoMap": {
|
|
5
7
|
"code.foss.global": "serve.zone/gitops"
|
|
6
8
|
},
|
|
7
9
|
"platforms": [
|
|
8
10
|
"linux/amd64",
|
|
9
11
|
"linux/arm64"
|
|
10
|
-
]
|
|
12
|
+
],
|
|
13
|
+
"requireTestFile": true
|
|
11
14
|
},
|
|
12
15
|
"@git.zone/tsbundle": {
|
|
13
16
|
"bundles": [
|
|
@@ -30,7 +33,9 @@
|
|
|
30
33
|
"entryPoint": "binary/gitops.ts",
|
|
31
34
|
"outDir": "dist/binaries",
|
|
32
35
|
"target": "x86_64-unknown-linux-gnu",
|
|
33
|
-
"permissions": [
|
|
36
|
+
"permissions": [
|
|
37
|
+
"--allow-all"
|
|
38
|
+
],
|
|
34
39
|
"noCheck": true,
|
|
35
40
|
"selfExtracting": true
|
|
36
41
|
},
|
|
@@ -39,7 +44,9 @@
|
|
|
39
44
|
"entryPoint": "binary/gitops.ts",
|
|
40
45
|
"outDir": "dist/binaries",
|
|
41
46
|
"target": "aarch64-unknown-linux-gnu",
|
|
42
|
-
"permissions": [
|
|
47
|
+
"permissions": [
|
|
48
|
+
"--allow-all"
|
|
49
|
+
],
|
|
43
50
|
"noCheck": true,
|
|
44
51
|
"selfExtracting": true
|
|
45
52
|
}
|
|
@@ -53,7 +60,10 @@
|
|
|
53
60
|
"outputMode": "bundle",
|
|
54
61
|
"bundler": "esbuild",
|
|
55
62
|
"production": true,
|
|
56
|
-
"watchPatterns": [
|
|
63
|
+
"watchPatterns": [
|
|
64
|
+
"./ts_web/**/*",
|
|
65
|
+
"./html/**/*"
|
|
66
|
+
],
|
|
57
67
|
"includeFiles": [
|
|
58
68
|
"./html/**/*.html"
|
|
59
69
|
]
|
|
@@ -62,7 +72,11 @@
|
|
|
62
72
|
"watchers": [
|
|
63
73
|
{
|
|
64
74
|
"name": "backend",
|
|
65
|
-
"watch": [
|
|
75
|
+
"watch": [
|
|
76
|
+
"./ts/**/*",
|
|
77
|
+
"./ts_interfaces/**/*",
|
|
78
|
+
"./dist_serve/**/*"
|
|
79
|
+
],
|
|
66
80
|
"command": "node ./cli.ts.js server",
|
|
67
81
|
"restart": true,
|
|
68
82
|
"debounce": 500,
|
|
@@ -91,6 +105,10 @@
|
|
|
91
105
|
]
|
|
92
106
|
},
|
|
93
107
|
"release": {
|
|
108
|
+
"preflight": {
|
|
109
|
+
"test": true,
|
|
110
|
+
"build": true
|
|
111
|
+
},
|
|
94
112
|
"targets": {
|
|
95
113
|
"git": {
|
|
96
114
|
"enabled": true,
|
|
@@ -106,7 +124,8 @@
|
|
|
106
124
|
},
|
|
107
125
|
"docker": {
|
|
108
126
|
"enabled": true,
|
|
109
|
-
"engine": "tsdocker"
|
|
127
|
+
"engine": "tsdocker",
|
|
128
|
+
"test": true
|
|
110
129
|
}
|
|
111
130
|
}
|
|
112
131
|
}
|
package/changelog.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-09-19 - 32.1.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- Webhook secrets are managed per connection (webhook)
|
|
8
|
+
- Every connection carries a webhook secret minted with `crypto.randomBytes(32)`. It is stored through SmartSecret like the provider token, masked as `***` in every connection response, and revealed only through the new identity-guarded TypedRequests `getWebhookSettings`, `rotateWebhookSecret` and `confirmWebhookSecret`.
|
|
9
|
+
- The connections view gained a **Webhook** action showing the payload URL, the secret, the verification header and the webhook status, with **Rotate Secret** and **Mark Configured**. The table shows the webhook status per connection.
|
|
10
|
+
- Neither provider implementation nor the Gitea/GitLab clients expose a hooks endpoint, so gitops cannot register the webhook itself: the operator copies the secret into the provider's webhook configuration and confirms it. Connections stored before this release are loaded with a minted secret and the status `unverified`, and their deliveries are refused until that is done.
|
|
11
|
+
|
|
12
|
+
### Fixes
|
|
13
|
+
|
|
14
|
+
- Verify the caller of `POST /webhook/:connectionId` (webhook)
|
|
15
|
+
- The endpoint accepted every POST: it checked neither Gitea's `X-Gitea-Signature` nor GitLab's `X-Gitlab-Token`, so anyone who could reach the ops server could make it fan a webhook event out to every connected dashboard. It now computes HMAC-SHA256 over the raw request bytes and compares with `crypto.timingSafeEqual` (hex length and alphabet checked first), or compares the GitLab token the same way.
|
|
16
|
+
- The connection is resolved and its webhook state checked before any body is buffered, and a refusal answers 401/404/411/413/503 with a stable name — `webhook-connection-unknown`, `webhook-connection-unverified`, `webhook-secret-missing`, `webhook-secret-unreadable`, `webhook-length-missing`, `webhook-signature-missing`, `webhook-signature-invalid`, `webhook-body-too-large`, `webhook-body-unreadable` — logged in a single line that contains no payload.
|
|
17
|
+
- The delivery body is read through a bounded reader instead of `ctx.arrayBuffer()`, which buffers whatever an unauthenticated caller sends. Gitea and GitLab always declare a `Content-Length`, so a delivery without a parsable one is refused as `webhook-length-missing` (411) before its body is touched, and the declared length is then verified against a running 1 MiB budget so a forged short `Content-Length` is refused the moment the bound is crossed.
|
|
18
|
+
- A connection whose webhook secret is stored but unreadable (a secret-store failure such as the SmartSecret keyring quota) is no longer treated as a connection without a secret: it is flagged at load time, its deliveries are refused as `webhook-secret-unreadable` (503), and neither the backfill nor any later persist mints or deletes anything under its keychain id, so a confirmed operator secret survives the outage. Rotating remains the explicit way to replace it.
|
|
19
|
+
- The broadcast now reports the connection's own provider type instead of the one the caller claimed.
|
|
20
|
+
- The provider header names are spelled as Gitea and GitLab document them (`X-Gitea-Signature`, `X-Gitlab-Token`, `X-Gitea-Event`, `X-Gitlab-Event`); header lookup is case-insensitive, so the webhook dialog now shows the operator exactly the name the provider uses.
|
|
21
|
+
|
|
22
|
+
### Maintenance
|
|
23
|
+
|
|
24
|
+
- Move the Docker release tooling to `@git.zone/tsdocker` 3.6.0 (deps)
|
|
25
|
+
|
|
26
|
+
## 2026-09-19 - 32.0.0
|
|
27
|
+
|
|
28
|
+
### Breaking Changes
|
|
29
|
+
|
|
30
|
+
- Join the serve.zone 32 line; images publish version tags only (release)
|
|
31
|
+
- @serve.zone/gitops releases as 32.0.0 together with the rest of the serve.zone platform repositories.
|
|
32
|
+
- The Dockerfile is now `Dockerfile_##version##`, so the image publishes `:32.0.0` only. `code.foss.global/serve.zone/gitops:latest` freezes at the 3.1.1 build and is no longer moved by a release.
|
|
33
|
+
- Every image is qualified inside the container by `test/test_latest.sh` before it is pushed; a missing test script now fails the release instead of warning. The script compares the versions in package.json, deno.json and the compiled commitinfo, then starts the real `GitopsApp` and requires the route the HEALTHCHECK probes to answer.
|
|
34
|
+
- Working notes leave the package root: `readme.todo.md` now lives untracked in `.nogit/`. npm force-includes every root `readme.*` regardless of the `files` list, so the published tarball had been shipping the TODO list; `npm pack --dry-run` now lists `readme.md` only.
|
|
35
|
+
|
|
36
|
+
### Fixes
|
|
37
|
+
|
|
38
|
+
- Use SmartMongo 9 and TSTest 6 with NoSQLDB, update cache documentation and fixture naming, and rebuild the browser bundle.
|
|
39
|
+
|
|
40
|
+
### Maintenance
|
|
41
|
+
|
|
42
|
+
- Bring the build, test and release tooling to the 32-train baseline (deps)
|
|
43
|
+
- pnpm 12.4.1 (`packageManager`), @git.zone/tsbuild 4.5.0, @git.zone/tsbundle 2.13.0, @git.zone/tsdeno 1.8.0, @git.zone/tsdocker 3.5.9, @git.zone/tsrun 2.0.6, @git.zone/tstest 6.1.1, @types/node 26.5.1.
|
|
44
|
+
|
|
3
45
|
## 2026-06-14 - 3.1.1
|
|
4
46
|
|
|
5
47
|
### Fixes
|