@crvouga/mockingbird-service-kms 1.10.4 → 1.10.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog — @crvouga/mockingbird-service-kms
2
2
 
3
+ ## 1.10.6 (2026-11-02)
4
+
5
+ ### Fixes and improvements
6
+
7
+ - compare the admin key in constant time ([2a43141](https://github.com/crvouga/mockingbird/commit/2a43141f50dab41e698c3bbce0c69bf65b40e24e))
8
+
9
+ ## 1.10.5 (2026-11-02)
10
+
11
+ ### Fixes and improvements
12
+
13
+ - stop walkSchema recursing forever on a self-referential $ref ([69464a9](https://github.com/crvouga/mockingbird/commit/69464a9d9e7f468c5e1095125108d4d3d5515431))
14
+ - densify sparse bracket arrays by their written indices ([84a28cb](https://github.com/crvouga/mockingbird/commit/84a28cb182e3d7df91102897f0fc11fca714ba5f))
15
+
3
16
  ## 1.10.4 (2026-11-02)
4
17
 
5
18
  ### Fixes and improvements
@@ -9,7 +9,7 @@ import {
9
9
  parseFaultHeader,
10
10
  resolveAdminPrefix,
11
11
  restoreClock
12
- } from "./chunk-N2DR57JA.js";
12
+ } from "./chunk-UXBNF6GR.js";
13
13
 
14
14
  // ../../adapters/node/dist/cli.js
15
15
  import { readFile as readFile5 } from "node:fs/promises";
@@ -3057,7 +3057,7 @@ async function preflightFleet(config, options) {
3057
3057
  break;
3058
3058
  }
3059
3059
  }
3060
- targets.set(name, { ...target, packageVersion: packageVersion ?? "1.10.4" });
3060
+ targets.set(name, { ...target, packageVersion: packageVersion ?? "1.10.6" });
3061
3061
  } catch (error) {
3062
3062
  throw new Error(`service ${name}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
3063
3063
  }
@@ -5009,4 +5009,4 @@ export {
5009
5009
  createServer2 as createServer,
5010
5010
  serveTarget
5011
5011
  };
5012
- //# sourceMappingURL=chunk-T6VD6Z5U.js.map
5012
+ //# sourceMappingURL=chunk-BMESPGUX.js.map
@@ -6847,6 +6847,17 @@ var createNamespaceControls = (options) => {
6847
6847
  };
6848
6848
  };
6849
6849
 
6850
+ // ../core/dist/signing.js
6851
+ var encoder = new TextEncoder();
6852
+ var timingSafeEqual = (a, b) => {
6853
+ if (a.length !== b.length)
6854
+ return false;
6855
+ let diff = 0;
6856
+ for (let i = 0; i < a.length; i++)
6857
+ diff |= a.charCodeAt(i) ^ b.charCodeAt(i);
6858
+ return diff === 0;
6859
+ };
6860
+
6850
6861
  // ../core/dist/surface.js
6851
6862
  var defineMock = (runtime) => runtime;
6852
6863
  var ADMIN_ROUTE_REFERENCE = {
@@ -6965,6 +6976,10 @@ var assertAdminPrefixAvailable = (prefix, paths) => {
6965
6976
  }
6966
6977
  };
6967
6978
  var ADMIN_KEY_HEADER = CONTROL_HEADERS.adminKey;
6979
+ var hasAdminKey = (headers, adminKey) => {
6980
+ const sent = headers.get(ADMIN_KEY_HEADER);
6981
+ return sent !== null && timingSafeEqual(sent, adminKey);
6982
+ };
6968
6983
  var NAMESPACE_HEADER = CONTROL_HEADERS.namespace;
6969
6984
  var ADMIN_DOCS_URL = "https://mockingbird.chrisvouga.dev/docs/admin-controls";
6970
6985
  var ADMIN_CONTROL_PAGES = [
@@ -7438,7 +7453,7 @@ var createControlPlane = (context) => {
7438
7453
  }
7439
7454
  const path = url.pathname.slice(adminPrefix.length) || "/";
7440
7455
  const shell = request.method === "GET" && (path === "/ui" || path === "/ui/");
7441
- if (!shell && context.adminKey !== void 0 && request.headers.get(ADMIN_KEY_HEADER) !== context.adminKey) {
7456
+ if (!shell && context.adminKey !== void 0 && !hasAdminKey(request.headers, context.adminKey)) {
7442
7457
  return adminError(401, `missing or wrong ${ADMIN_KEY_HEADER}`);
7443
7458
  }
7444
7459
  for (const route of routes) {
@@ -8201,7 +8216,7 @@ var stateAdminRoutes = (routes) => {
8201
8216
  };
8202
8217
 
8203
8218
  // ../core/dist/version.js
8204
- var PACKAGE_VERSION = true ? "1.10.4" : UNRELEASED_VERSION;
8219
+ var PACKAGE_VERSION = true ? "1.10.6" : UNRELEASED_VERSION;
8205
8220
 
8206
8221
  // ../core/dist/webhooks.js
8207
8222
  var json4 = (status, body) => new Response(JSON.stringify(body), {
@@ -9180,7 +9195,7 @@ var createRuntime = (options) => {
9180
9195
  throw error;
9181
9196
  }
9182
9197
  const rewinds = at !== void 0 && selectedBranch === "main" && MUTATING_METHODS.has(request.method);
9183
- if ((requested || rewinds) && options.adminKey !== void 0 && request.headers.get(ADMIN_KEY_HEADER) !== options.adminKey)
9198
+ if ((requested || rewinds) && options.adminKey !== void 0 && !hasAdminKey(request.headers, options.adminKey))
9184
9199
  return refuse(401, `control headers need ${ADMIN_KEY_HEADER}`);
9185
9200
  controls.ensure(namespace);
9186
9201
  if (requested?.restore !== void 0 && !snapshotStore.get(namespace, requested.restore))
@@ -9834,4 +9849,4 @@ export {
9834
9849
  createRuntime2 as createRuntime,
9835
9850
  KmsAPI
9836
9851
  };
9837
- //# sourceMappingURL=chunk-N2DR57JA.js.map
9852
+ //# sourceMappingURL=chunk-UXBNF6GR.js.map