@hadoku/service-kernel 0.1.25 → 0.1.27

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.
Files changed (2) hide show
  1. package/dist/auth/index.js +14 -0
  2. package/package.json +4 -4
@@ -73,8 +73,22 @@ export function createEdgeAuth(config) {
73
73
  // the app's own index.html. The hatch would be a flag that changes
74
74
  // nothing observable, which is worse than not having one.
75
75
  if (typeof headers['x-hadoku-tier'] !== 'string' || headers['x-hadoku-tier'] === '') {
76
+ // identity-model-disable-next-line G5: LEGITIMATE: R8's dev carve-out, the game template's old
77
+ // apps/server/src/edge-auth.ts, moved into cardtable's service-kernel package (templates/game and
78
+ // bomberman import it, 880bf59b6; templates/tunnel-* and hadoku-wiki since 2026-11-11, which
79
+ // retired their three template entries) on 2026-11-07 (cardtable 9bcdd8c82, 0d01c363e).
80
+ // createEdgeAuth's sanitizeHeaders bare-local branch writes x-hadoku-tier = config.devTier() and
81
+ // x-user-id/x-user-name ??= 'local-dev' only when config.edgeAuthSecret() === '' AND
82
+ // config.allowUnverifiedEdge() (CARDTABLE_INSECURE_NO_EDGE_AUTH=1, a tunnel app's
83
+ // <APP>_INSECURE_NO_EDGE_AUTH=1), warned at boot. Production injects EDGE_AUTH_SECRET through
84
+ // services/pm2/cardtable*-wrapper.mjs and every hydrated tunnel wrapper
85
+ // (scripts/test/template-edge-auth.test.mjs pins that), and nothing outside a dev script sets the
86
+ // insecure flag, so the branch is unreachable there. The function's other writes downgrade an
87
+ // unproven request and do not match G5.
76
88
  headers['x-hadoku-tier'] = config.devTier();
89
+ // identity-model-disable-next-line G5: same reason as the waiver above
77
90
  headers['x-user-id'] ??= 'local-dev';
91
+ // identity-model-disable-next-line G5: same reason as the waiver above
78
92
  headers['x-user-name'] ??= 'local-dev';
79
93
  }
80
94
  return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hadoku/service-kernel",
3
- "version": "0.1.25",
4
- "gitHead": "6f51d38eeb51ef668fe3615715a6a9ee5e7a2033",
3
+ "version": "0.1.27",
4
+ "gitHead": "2f9b66a0c4584be721b894c6701a9f66e5e80463",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "description": "The server parts any game keeps: edge auth and the tier gate, base path and bundle check, health and the busy probe, lifecycle, the JSON logger, the state directory, telemetry and capacity, per-caller limits, the browser relays, the erase registry, and createGameServer, which boots a game from its config and plugins. Knows no game; the app binds its service id, prefix and env names. MIT; imports only node built-ins, express, socket.io and @wolffm/*.",
@@ -56,8 +56,8 @@
56
56
  }
57
57
  },
58
58
  "dependencies": {
59
- "@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.86",
60
- "@wolffm/rooms-server": "npm:@hadoku/rooms-server@^0.45.86",
59
+ "@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.88",
60
+ "@wolffm/rooms-server": "npm:@hadoku/rooms-server@^0.45.88",
61
61
  "express": "^5.1.0",
62
62
  "socket.io": "^4.8.3"
63
63
  },