@crvouga/mockingbird-service-route53 1.10.3 → 1.10.5

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,17 @@
1
1
  # Changelog — @crvouga/mockingbird-service-route53
2
2
 
3
+ ## 1.10.5 (2026-11-02)
4
+
5
+ ### Fixes and improvements
6
+
7
+ - save and replay a 500 the endpoint produced under an Idempotency-Key ([789bbcc](https://github.com/crvouga/mockingbird/commit/789bbcccb792cddaf27f4f6db6d2fcf2da1d07fe))
8
+
9
+ ## 1.10.4 (2026-11-02)
10
+
11
+ ### Fixes and improvements
12
+
13
+ - compare the admin key in constant time ([2a43141](https://github.com/crvouga/mockingbird/commit/2a43141f50dab41e698c3bbce0c69bf65b40e24e))
14
+
3
15
  ## 1.10.3 (2026-11-02)
4
16
 
5
17
  ### Fixes and improvements
@@ -9,7 +9,7 @@ import {
9
9
  parseFaultHeader,
10
10
  resolveAdminPrefix,
11
11
  restoreClock
12
- } from "./chunk-O2KKV56S.js";
12
+ } from "./chunk-MW7CCOBK.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.3" });
3060
+ targets.set(name, { ...target, packageVersion: packageVersion ?? "1.10.5" });
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-QO6LBGDR.js.map
5012
+ //# sourceMappingURL=chunk-MV5LOEHN.js.map
@@ -6791,6 +6791,17 @@ var createNamespaceControls = (options) => {
6791
6791
  };
6792
6792
  };
6793
6793
 
6794
+ // ../core/dist/signing.js
6795
+ var encoder = new TextEncoder();
6796
+ var timingSafeEqual = (a, b) => {
6797
+ if (a.length !== b.length)
6798
+ return false;
6799
+ let diff = 0;
6800
+ for (let i = 0; i < a.length; i++)
6801
+ diff |= a.charCodeAt(i) ^ b.charCodeAt(i);
6802
+ return diff === 0;
6803
+ };
6804
+
6794
6805
  // ../core/dist/surface.js
6795
6806
  var defineMock = (runtime) => runtime;
6796
6807
  var ADMIN_ROUTE_REFERENCE = {
@@ -6909,6 +6920,10 @@ var assertAdminPrefixAvailable = (prefix, paths) => {
6909
6920
  }
6910
6921
  };
6911
6922
  var ADMIN_KEY_HEADER = CONTROL_HEADERS.adminKey;
6923
+ var hasAdminKey = (headers, adminKey) => {
6924
+ const sent = headers.get(ADMIN_KEY_HEADER);
6925
+ return sent !== null && timingSafeEqual(sent, adminKey);
6926
+ };
6912
6927
  var NAMESPACE_HEADER = CONTROL_HEADERS.namespace;
6913
6928
  var ADMIN_DOCS_URL = "https://mockingbird.chrisvouga.dev/docs/admin-controls";
6914
6929
  var ADMIN_CONTROL_PAGES = [
@@ -7382,7 +7397,7 @@ var createControlPlane = (context) => {
7382
7397
  }
7383
7398
  const path = url.pathname.slice(adminPrefix.length) || "/";
7384
7399
  const shell = request.method === "GET" && (path === "/ui" || path === "/ui/");
7385
- if (!shell && context.adminKey !== void 0 && request.headers.get(ADMIN_KEY_HEADER) !== context.adminKey) {
7400
+ if (!shell && context.adminKey !== void 0 && !hasAdminKey(request.headers, context.adminKey)) {
7386
7401
  return adminError(401, `missing or wrong ${ADMIN_KEY_HEADER}`);
7387
7402
  }
7388
7403
  for (const route of routes) {
@@ -8145,7 +8160,7 @@ var stateAdminRoutes = (routes) => {
8145
8160
  };
8146
8161
 
8147
8162
  // ../core/dist/version.js
8148
- var PACKAGE_VERSION = true ? "1.10.3" : UNRELEASED_VERSION;
8163
+ var PACKAGE_VERSION = true ? "1.10.5" : UNRELEASED_VERSION;
8149
8164
 
8150
8165
  // ../core/dist/webhooks.js
8151
8166
  var json4 = (status, body) => new Response(JSON.stringify(body), {
@@ -9124,7 +9139,7 @@ var createRuntime = (options) => {
9124
9139
  throw error;
9125
9140
  }
9126
9141
  const rewinds = at !== void 0 && selectedBranch === "main" && MUTATING_METHODS.has(request.method);
9127
- if ((requested || rewinds) && options.adminKey !== void 0 && request.headers.get(ADMIN_KEY_HEADER) !== options.adminKey)
9142
+ if ((requested || rewinds) && options.adminKey !== void 0 && !hasAdminKey(request.headers, options.adminKey))
9128
9143
  return refuse(401, `control headers need ${ADMIN_KEY_HEADER}`);
9129
9144
  controls.ensure(namespace);
9130
9145
  if (requested?.restore !== void 0 && !snapshotStore.get(namespace, requested.restore))
@@ -9477,4 +9492,4 @@ export {
9477
9492
  createRuntime2 as createRuntime,
9478
9493
  Route53API
9479
9494
  };
9480
- //# sourceMappingURL=chunk-O2KKV56S.js.map
9495
+ //# sourceMappingURL=chunk-MW7CCOBK.js.map