@caelo-cms/provisioning 0.11.19 → 0.11.20

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 (121) hide show
  1. package/dist/agent-db.js +32 -0
  2. package/dist/aws-task-roles.d.ts +11 -0
  3. package/dist/aws-task-roles.d.ts.map +1 -1
  4. package/dist/aws-task-roles.js +19 -0
  5. package/dist/aws-task-roles.js.map +1 -1
  6. package/dist/azure-secrets.d.ts +22 -0
  7. package/dist/azure-secrets.d.ts.map +1 -0
  8. package/dist/azure-secrets.js +14 -0
  9. package/dist/azure-secrets.js.map +1 -0
  10. package/dist/caddy.d.ts +7 -0
  11. package/dist/caddy.d.ts.map +1 -1
  12. package/dist/caddy.js +22 -1
  13. package/dist/caddy.js.map +1 -1
  14. package/dist/cli.js +3 -0
  15. package/dist/cli.js.map +1 -1
  16. package/dist/gateway-armor.d.ts +24 -0
  17. package/dist/gateway-armor.d.ts.map +1 -0
  18. package/dist/gateway-armor.js +118 -0
  19. package/dist/gateway-armor.js.map +1 -0
  20. package/dist/gateway-edge.d.ts +128 -0
  21. package/dist/gateway-edge.d.ts.map +1 -0
  22. package/dist/gateway-edge.js +211 -0
  23. package/dist/gateway-edge.js.map +1 -0
  24. package/dist/infra-contract.d.ts +1 -1
  25. package/dist/infra-contract.d.ts.map +1 -1
  26. package/dist/infra-contract.js +21 -1
  27. package/dist/infra-contract.js.map +1 -1
  28. package/dist/lifecycle.d.ts.map +1 -1
  29. package/dist/lifecycle.js +8 -1
  30. package/dist/lifecycle.js.map +1 -1
  31. package/dist/pool-budget-stack.d.ts +22 -0
  32. package/dist/pool-budget-stack.d.ts.map +1 -1
  33. package/dist/pool-budget-stack.js +22 -1
  34. package/dist/pool-budget-stack.js.map +1 -1
  35. package/dist/public-service-shape.d.ts +45 -0
  36. package/dist/public-service-shape.d.ts.map +1 -0
  37. package/dist/public-service-shape.js +90 -0
  38. package/dist/public-service-shape.js.map +1 -0
  39. package/dist/remote-mcp-edge.d.ts +1 -1
  40. package/dist/remote-mcp-edge.js +1 -1
  41. package/dist/remote-mcp.d.ts.map +1 -1
  42. package/dist/remote-mcp.js +12 -2
  43. package/dist/remote-mcp.js.map +1 -1
  44. package/dist/serverless-backend.d.ts +27 -0
  45. package/dist/serverless-backend.d.ts.map +1 -0
  46. package/dist/serverless-backend.js +30 -0
  47. package/dist/serverless-backend.js.map +1 -0
  48. package/dist/stack-contract.d.ts +6 -0
  49. package/dist/stack-contract.d.ts.map +1 -1
  50. package/dist/stack-contract.js +24 -0
  51. package/dist/stack-contract.js.map +1 -1
  52. package/dist/stack-converge.d.ts +13 -0
  53. package/dist/stack-converge.d.ts.map +1 -1
  54. package/dist/stack-converge.js +27 -0
  55. package/dist/stack-converge.js.map +1 -1
  56. package/dist/staging-gateway-setup.d.ts +5 -0
  57. package/dist/staging-gateway-setup.d.ts.map +1 -1
  58. package/dist/staging-gateway-setup.js +60 -19
  59. package/dist/staging-gateway-setup.js.map +1 -1
  60. package/dist/upgrade/app-roll.d.ts +5 -1
  61. package/dist/upgrade/app-roll.d.ts.map +1 -1
  62. package/dist/upgrade/app-roll.js +20 -3
  63. package/dist/upgrade/app-roll.js.map +1 -1
  64. package/dist/upgrade/converge.d.ts.map +1 -1
  65. package/dist/upgrade/converge.js +27 -4
  66. package/dist/upgrade/converge.js.map +1 -1
  67. package/dist/upgrade/health.d.ts +13 -3
  68. package/dist/upgrade/health.d.ts.map +1 -1
  69. package/dist/upgrade/health.js +24 -7
  70. package/dist/upgrade/health.js.map +1 -1
  71. package/dist/upgrade/load-balancer-get.d.ts +17 -0
  72. package/dist/upgrade/load-balancer-get.d.ts.map +1 -0
  73. package/dist/upgrade/load-balancer-get.js +38 -0
  74. package/dist/upgrade/load-balancer-get.js.map +1 -0
  75. package/dist/upgrader-gcp.d.ts.map +1 -1
  76. package/dist/upgrader-gcp.js +8 -1
  77. package/dist/upgrader-gcp.js.map +1 -1
  78. package/dist/wizards/gcp-cost.d.ts +9 -0
  79. package/dist/wizards/gcp-cost.d.ts.map +1 -1
  80. package/dist/wizards/gcp-cost.js +69 -34
  81. package/dist/wizards/gcp-cost.js.map +1 -1
  82. package/package.json +2 -2
  83. package/src/aws-task-roles.ts +22 -0
  84. package/src/azure-secrets.ts +38 -0
  85. package/src/caddy.test.ts +19 -2
  86. package/src/caddy.ts +23 -0
  87. package/src/cli.ts +5 -0
  88. package/src/gateway-armor.ts +135 -0
  89. package/src/gateway-bootstrap.test.ts +1 -0
  90. package/src/gateway-edge.test.ts +262 -0
  91. package/src/gateway-edge.ts +256 -0
  92. package/src/gateway-env-isolation.test.ts +45 -6
  93. package/src/infra-contract.test.ts +5 -3
  94. package/src/infra-contract.ts +21 -1
  95. package/src/lifecycle.ts +8 -1
  96. package/src/pool-budget-stack.ts +25 -0
  97. package/src/pool-budget-stacks.test.ts +31 -0
  98. package/src/public-service-shape.test.ts +166 -0
  99. package/src/public-service-shape.ts +131 -0
  100. package/src/remote-mcp-edge.ts +1 -1
  101. package/src/remote-mcp.test.ts +38 -1
  102. package/src/remote-mcp.ts +25 -3
  103. package/src/serverless-backend.ts +47 -0
  104. package/src/stack-contract.test.ts +13 -0
  105. package/src/stack-contract.ts +25 -0
  106. package/src/stack-converge.test.ts +28 -1
  107. package/src/stack-converge.ts +30 -0
  108. package/src/staging-gateway-setup.test.ts +55 -3
  109. package/src/staging-gateway-setup.ts +79 -27
  110. package/src/upgrade/app-roll.ts +27 -3
  111. package/src/upgrade/converge.ts +33 -4
  112. package/src/upgrade/health.test.ts +88 -13
  113. package/src/upgrade/health.ts +32 -7
  114. package/src/upgrade/load-balancer-get.ts +64 -0
  115. package/src/upgrade/upgrade.test.ts +96 -3
  116. package/src/upgrader-gcp.ts +8 -1
  117. package/src/wizards/gcp-cost.ts +78 -35
  118. package/stacks/aws/index.ts +24 -22
  119. package/stacks/azure/index.ts +152 -64
  120. package/stacks/gcp/index.ts +35 -47
  121. package/stacks/gcp-firebase/index.ts +25 -13
@@ -0,0 +1,118 @@
1
+ // SPDX-License-Identifier: MPL-2.0
2
+ /**
3
+ * #1339 — bring the visitor gateway's Cloud Armor policy on an existing
4
+ * `gcp` install to the rules of gateway-edge.ts (infrastructure contract
5
+ * 21). The stack declares the same rules for new installs; the converge
6
+ * runs this, because the in-cloud upgrader holds no compute rights.
7
+ *
8
+ * No step leaves the policy with less protection than before:
9
+ * - a rule at a spec priority that differs is updated in place (one
10
+ * write: it is the old rule or the new one, never none);
11
+ * - a missing rule is created;
12
+ * - only once every rule is in place is the old catch-all ban at priority
13
+ * 1000 ({@link LEGACY_GENERAL_BAN}) deleted, and only when it is exactly
14
+ * that rule. A failure before that leaves it in force.
15
+ * Rules at other priorities are the Owner's own and stay.
16
+ */
17
+ import { GATEWAY_ARMOR_RULES, gatewayArmorRuleFlags, isGatewayArmorRule, isLegacyGeneralBan, LEGACY_GENERAL_BAN, } from "./gateway-edge.js";
18
+ import { gcloud as defaultGcloud } from "./gcloud.js";
19
+ import { gcpNamePrefix } from "./gcp-names.js";
20
+ /**
21
+ * Apply {@link GATEWAY_ARMOR_RULES} to the gateway's `<prefix>-waf*` policy.
22
+ *
23
+ * @param target the install's project and environment
24
+ * @returns the lines it changed (empty when every rule was already in place)
25
+ */
26
+ export async function ensureGatewayArmorRules(target, deps = {}) {
27
+ const run = deps.run ?? defaultGcloud;
28
+ const project = `--project=${target.projectId}`;
29
+ const done = [];
30
+ const prefix = `${gcpNamePrefix(target.env)}-waf`;
31
+ const list = await run([
32
+ "compute",
33
+ "security-policies",
34
+ "list",
35
+ project,
36
+ `--filter=name~^${prefix}`,
37
+ "--format=value(name)",
38
+ ]);
39
+ if (!list.ok)
40
+ return { ok: false, error: `list security policies: ${list.stderr.trim()}`, done };
41
+ const names = list.stdout
42
+ .split("\n")
43
+ .map((l) => l.trim())
44
+ .filter(Boolean);
45
+ // Pulumi names the policy `<prefix>-waf-<suffix>`; the MCP-Auth-Proxy's is `<prefix>-mcp-auth-proxy-armor`.
46
+ if (names.length !== 1) {
47
+ return {
48
+ ok: false,
49
+ error: `expected exactly one ${prefix}* Cloud Armor policy, found ${names.length}`,
50
+ done,
51
+ };
52
+ }
53
+ const policy = names[0];
54
+ const describe = await run([
55
+ "compute",
56
+ "security-policies",
57
+ "describe",
58
+ policy,
59
+ project,
60
+ "--format=json",
61
+ ]);
62
+ if (!describe.ok) {
63
+ return { ok: false, error: `describe ${policy}: ${describe.stderr.trim()}`, done };
64
+ }
65
+ let live;
66
+ try {
67
+ live = (JSON.parse(describe.stdout).rules ??
68
+ []);
69
+ }
70
+ catch {
71
+ return { ok: false, error: `describe ${policy}: output is not JSON`, done };
72
+ }
73
+ const rules = ["compute", "security-policies", "rules"];
74
+ for (const spec of GATEWAY_ARMOR_RULES) {
75
+ const existing = live.find((r) => r.priority === spec.priority);
76
+ if (existing && isGatewayArmorRule(existing, spec))
77
+ continue;
78
+ const verb = existing ? "update" : "create";
79
+ const r = await run([
80
+ ...rules,
81
+ verb,
82
+ String(spec.priority),
83
+ `--security-policy=${policy}`,
84
+ project,
85
+ ...gatewayArmorRuleFlags(spec),
86
+ "--quiet",
87
+ ]);
88
+ if (!r.ok) {
89
+ return {
90
+ ok: false,
91
+ error: `${verb} rule ${spec.priority} on ${policy}: ${r.stderr.trim()}`,
92
+ done,
93
+ };
94
+ }
95
+ done.push(`${existing ? "updated" : "created"} rule ${spec.priority}: ${spec.description}`);
96
+ }
97
+ const legacy = live.find((r) => r.priority === LEGACY_GENERAL_BAN.priority);
98
+ if (legacy && isLegacyGeneralBan(legacy)) {
99
+ const r = await run([
100
+ ...rules,
101
+ "delete",
102
+ String(LEGACY_GENERAL_BAN.priority),
103
+ `--security-policy=${policy}`,
104
+ project,
105
+ "--quiet",
106
+ ]);
107
+ if (!r.ok) {
108
+ return {
109
+ ok: false,
110
+ error: `delete the old catch-all ban ${LEGACY_GENERAL_BAN.priority} on ${policy}: ${r.stderr.trim()}`,
111
+ done,
112
+ };
113
+ }
114
+ done.push(`removed rule ${LEGACY_GENERAL_BAN.priority}: the old ban on every path (it banned staging reviewers)`);
115
+ }
116
+ return { ok: true, policy, done };
117
+ }
118
+ //# sourceMappingURL=gateway-armor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gateway-armor.js","sourceRoot":"","sources":["../src/gateway-armor.ts"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,GAEnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAO/C;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,MAA4D,EAC5D,OAA+B,EAAE;IAEjC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,aAAa,CAAC;IACtC,MAAM,OAAO,GAAG,aAAa,MAAM,CAAC,SAAS,EAAE,CAAC;IAChD,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,MAAM,MAAM,GAAG,GAAG,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;IAClD,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC;QACrB,SAAS;QACT,mBAAmB;QACnB,MAAM;QACN,OAAO;QACP,kBAAkB,MAAM,EAAE;QAC1B,sBAAsB;KACvB,CAAC,CAAC;IACH,IAAI,CAAC,IAAI,CAAC,EAAE;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,2BAA2B,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;IACjG,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM;SACtB,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IA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EAAE,gCAAgC,kBAAkB,CAAC,QAAQ,OAAO,MAAM,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE;gBACrG,IAAI;aACL,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,IAAI,CACP,gBAAgB,kBAAkB,CAAC,QAAQ,2DAA2D,CACvG,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AACpC,CAAC"}
@@ -0,0 +1,128 @@
1
+ /**
2
+ * #1339 (epic #763 P9, L5) — the Cloud Armor rules of the visitor gateway's
3
+ * policy on `gcp` (`<prefix>-waf`), declared once for the stack (new
4
+ * installs, imported from `dist/`) and for `cms-provision upgrade`
5
+ * ({@link ensureGatewayArmorRules} in gateway-armor.ts, existing installs).
6
+ * Pure module: no CLI or Pulumi imports.
7
+ *
8
+ * Cloud Armor is an extra layer here, never the only one (E3): the gateway
9
+ * sheds junk and rate-limits every route itself (docs/dev/gateway-hardening.md),
10
+ * and the cheap setup (gcp-firebase) has no WAF at all. What the edge adds
11
+ * is a per-IP ban before a request costs a Cloud Run instance.
12
+ *
13
+ * The policy also fronts the staging gateway's backend (staging-gateway-setup.ts),
14
+ * which serves whole staged pages. So the rules are per path:
15
+ *
16
+ * - Credential operations of the auth plugin (signup, login, password
17
+ * reset) — the brute-force targets — get the tightest ban, 30 a minute
18
+ * per IP: above every per-operation limit the plugin declares, so a
19
+ * visitor behind a shared NAT is stopped by the gateway's own limit
20
+ * first, and only a flood earns the ban. The pattern is anchored (as in
21
+ * remote-mcp-edge.ts): a traversal or encoded variant cannot match it and
22
+ * falls through to the general rule below.
23
+ * - The captcha challenge is throttled (429, no ban) at 60 a minute, the
24
+ * gateway's own per-client budget (`CAPTCHA_CHALLENGE_RATE_LIMIT`).
25
+ * - Every other path containing `/api/` keeps the original ban of 100 a
26
+ * minute. It used to match every request, so a reviewer who browsed a
27
+ * few staged pages (each with its styles, scripts, fonts and images)
28
+ * was banned from staging for ten minutes; staged pages are not `/api/`
29
+ * and are throttled by the staging gate itself.
30
+ * - The OWASP sqli/xss packs at sensitivity 1, Google's recommended
31
+ * starting level: the default (all signatures) flags ordinary comment
32
+ * and form text as an attack.
33
+ *
34
+ * Priorities: lower runs first, the first matching rule decides; the MCP
35
+ * throttle moved to the MCP-Auth-Proxy's own policy (#1328).
36
+ */
37
+ import { type LiveArmorRule } from "./remote-mcp-edge.js";
38
+ /**
39
+ * Priority of the `/api/` ban. Not the old catch-all's (1000): the converge
40
+ * creates this one first and deletes the old one only afterwards, so an
41
+ * install is never without a ban (gateway-armor.ts).
42
+ */
43
+ export declare const API_BAN_PRIORITY: number;
44
+ /**
45
+ * The catch-all ban every policy carried before #1339 (`srcIpRanges: *`,
46
+ * 100 a minute, 10-minute ban), retired by the converge once the rules
47
+ * below are in place.
48
+ */
49
+ export declare const LEGACY_GENERAL_BAN: {
50
+ readonly priority: 1000;
51
+ readonly count: 100;
52
+ readonly intervalSec: 60;
53
+ readonly banDurationSec: 600;
54
+ };
55
+ /** A per-IP rate rule of the gateway's policy. */
56
+ interface ArmorRateRule {
57
+ readonly kind: "rate";
58
+ readonly priority: number;
59
+ readonly description: string;
60
+ readonly expression: string;
61
+ readonly action: "rate_based_ban" | "throttle";
62
+ /** Requests per {@link intervalSec} per source IP. */
63
+ readonly count: number;
64
+ readonly intervalSec: number;
65
+ /** Seconds an IP stays banned after it went over (rate_based_ban only). */
66
+ readonly banDurationSec?: number;
67
+ }
68
+ /** A deny rule of the gateway's policy. */
69
+ interface ArmorDenyRule {
70
+ readonly kind: "deny";
71
+ readonly priority: number;
72
+ readonly description: string;
73
+ readonly expression: string;
74
+ readonly action: "deny(403)";
75
+ }
76
+ export type GatewayArmorRule = ArmorRateRule | ArmorDenyRule;
77
+ /**
78
+ * The auth plugin's credential operations, as an anchored RE2 pattern
79
+ * (Cloud Armor's `matches`).
80
+ */
81
+ export declare const CREDENTIAL_PATH_PATTERN = "^/api/plugin/auth/(?:signup|login|request_password_reset|reset_password)$";
82
+ /** Priority of Cloud Armor's default rule (it allows; every policy has one). */
83
+ export declare const DEFAULT_RULE_PRIORITY = 2147483647;
84
+ /** The gateway policy's rules, in evaluation order (the default allow excluded). */
85
+ export declare const GATEWAY_ARMOR_RULES: readonly GatewayArmorRule[];
86
+ /**
87
+ * Rules the gateway policy bills for, the default rule included (Cloud
88
+ * Armor Standard prices every rule of a policy, cloud.google.com/armor/pricing).
89
+ */
90
+ export declare const GATEWAY_ARMOR_BILLED_RULES: number;
91
+ /** The gateway policy's rules for the `gcp` stack, the default allow last. */
92
+ export declare function gatewayArmorRuleArgs(): ({
93
+ action: "throttle" | "rate_based_ban" | "deny(403)";
94
+ priority: number;
95
+ description: string;
96
+ match: {
97
+ expr: {
98
+ expression: string;
99
+ };
100
+ };
101
+ } | {
102
+ action: string;
103
+ priority: number;
104
+ description: string;
105
+ match: {
106
+ versionedExpr: string;
107
+ config: {
108
+ srcIpRanges: string[];
109
+ };
110
+ };
111
+ })[];
112
+ /**
113
+ * The `gcloud compute security-policies rules create` flags for `r`
114
+ * (without the verb, priority and policy).
115
+ */
116
+ export declare function gatewayArmorRuleFlags(r: GatewayArmorRule): string[];
117
+ /** A live rule as `describe` lists it, with the ban duration a rate rule carries. */
118
+ export interface LiveGatewayArmorRule extends LiveArmorRule {
119
+ readonly rateLimitOptions?: LiveArmorRule["rateLimitOptions"] & {
120
+ readonly banDurationSec?: number;
121
+ };
122
+ }
123
+ /** Whether a live rule is exactly `spec`. */
124
+ export declare function isGatewayArmorRule(live: LiveGatewayArmorRule, spec: GatewayArmorRule): boolean;
125
+ /** Whether a live rule is exactly {@link LEGACY_GENERAL_BAN}; any other rule at its priority is the Owner's. */
126
+ export declare function isLegacyGeneralBan(live: LiveGatewayArmorRule): boolean;
127
+ export {};
128
+ //# sourceMappingURL=gateway-edge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gateway-edge.d.ts","sourceRoot":"","sources":["../src/gateway-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,QAAiC,CAAC;AAuBzE,8EAA8E;AAC9E,wBAAgB,oBAAoB;;;;;;;;;;;;;;;;;;;KAUnC;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAcnE;AAED,qFAAqF;AACrF,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IACzD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG;QAC9D,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;KAClC,CAAC;CACH;AAED,6CAA6C;AAC7C,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAa9F;AAWD,gHAAgH;AAChH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAoBtE"}
@@ -0,0 +1,211 @@
1
+ // SPDX-License-Identifier: MPL-2.0
2
+ /**
3
+ * #1339 (epic #763 P9, L5) — the Cloud Armor rules of the visitor gateway's
4
+ * policy on `gcp` (`<prefix>-waf`), declared once for the stack (new
5
+ * installs, imported from `dist/`) and for `cms-provision upgrade`
6
+ * ({@link ensureGatewayArmorRules} in gateway-armor.ts, existing installs).
7
+ * Pure module: no CLI or Pulumi imports.
8
+ *
9
+ * Cloud Armor is an extra layer here, never the only one (E3): the gateway
10
+ * sheds junk and rate-limits every route itself (docs/dev/gateway-hardening.md),
11
+ * and the cheap setup (gcp-firebase) has no WAF at all. What the edge adds
12
+ * is a per-IP ban before a request costs a Cloud Run instance.
13
+ *
14
+ * The policy also fronts the staging gateway's backend (staging-gateway-setup.ts),
15
+ * which serves whole staged pages. So the rules are per path:
16
+ *
17
+ * - Credential operations of the auth plugin (signup, login, password
18
+ * reset) — the brute-force targets — get the tightest ban, 30 a minute
19
+ * per IP: above every per-operation limit the plugin declares, so a
20
+ * visitor behind a shared NAT is stopped by the gateway's own limit
21
+ * first, and only a flood earns the ban. The pattern is anchored (as in
22
+ * remote-mcp-edge.ts): a traversal or encoded variant cannot match it and
23
+ * falls through to the general rule below.
24
+ * - The captcha challenge is throttled (429, no ban) at 60 a minute, the
25
+ * gateway's own per-client budget (`CAPTCHA_CHALLENGE_RATE_LIMIT`).
26
+ * - Every other path containing `/api/` keeps the original ban of 100 a
27
+ * minute. It used to match every request, so a reviewer who browsed a
28
+ * few staged pages (each with its styles, scripts, fonts and images)
29
+ * was banned from staging for ten minutes; staged pages are not `/api/`
30
+ * and are throttled by the staging gate itself.
31
+ * - The OWASP sqli/xss packs at sensitivity 1, Google's recommended
32
+ * starting level: the default (all signatures) flags ordinary comment
33
+ * and form text as an attack.
34
+ *
35
+ * Priorities: lower runs first, the first matching rule decides; the MCP
36
+ * throttle moved to the MCP-Auth-Proxy's own policy (#1328).
37
+ */
38
+ import { GENERAL_RATE_LIMIT_PRIORITY } from "./remote-mcp-edge.js";
39
+ /**
40
+ * Priority of the `/api/` ban. Not the old catch-all's (1000): the converge
41
+ * creates this one first and deletes the old one only afterwards, so an
42
+ * install is never without a ban (gateway-armor.ts).
43
+ */
44
+ export const API_BAN_PRIORITY = GENERAL_RATE_LIMIT_PRIORITY + 1;
45
+ /**
46
+ * The catch-all ban every policy carried before #1339 (`srcIpRanges: *`,
47
+ * 100 a minute, 10-minute ban), retired by the converge once the rules
48
+ * below are in place.
49
+ */
50
+ export const LEGACY_GENERAL_BAN = {
51
+ priority: GENERAL_RATE_LIMIT_PRIORITY,
52
+ count: 100,
53
+ intervalSec: 60,
54
+ banDurationSec: 600,
55
+ };
56
+ /**
57
+ * The auth plugin's credential operations, as an anchored RE2 pattern
58
+ * (Cloud Armor's `matches`).
59
+ */
60
+ export const CREDENTIAL_PATH_PATTERN = "^/api/plugin/auth/(?:signup|login|request_password_reset|reset_password)$";
61
+ /** Priority of Cloud Armor's default rule (it allows; every policy has one). */
62
+ export const DEFAULT_RULE_PRIORITY = 2147483647;
63
+ /** The gateway policy's rules, in evaluation order (the default allow excluded). */
64
+ export const GATEWAY_ARMOR_RULES = [
65
+ {
66
+ kind: "rate",
67
+ priority: 800,
68
+ description: "Caelo gateway: per-IP ban on the auth plugin's credential operations",
69
+ expression: `request.path.matches('${CREDENTIAL_PATH_PATTERN}')`,
70
+ action: "rate_based_ban",
71
+ count: 30,
72
+ intervalSec: 60,
73
+ banDurationSec: 600,
74
+ },
75
+ {
76
+ kind: "rate",
77
+ priority: 810,
78
+ description: "Caelo gateway: per-IP throttle on captcha challenges",
79
+ expression: "request.path == '/api/captcha/challenge'",
80
+ action: "throttle",
81
+ count: 60,
82
+ intervalSec: 60,
83
+ },
84
+ {
85
+ kind: "rate",
86
+ priority: API_BAN_PRIORITY,
87
+ description: "Caelo gateway: per-IP ban on the visitor API",
88
+ expression: "request.path.contains('/api/')",
89
+ action: "rate_based_ban",
90
+ count: 100,
91
+ intervalSec: 60,
92
+ banDurationSec: 600,
93
+ },
94
+ {
95
+ kind: "deny",
96
+ priority: 2000,
97
+ description: "Caelo gateway: OWASP SQL injection signatures (sensitivity 1)",
98
+ expression: "evaluatePreconfiguredWaf('sqli-v33-stable', {'sensitivity': 1})",
99
+ action: "deny(403)",
100
+ },
101
+ {
102
+ kind: "deny",
103
+ priority: 2001,
104
+ description: "Caelo gateway: OWASP cross-site scripting signatures (sensitivity 1)",
105
+ expression: "evaluatePreconfiguredWaf('xss-v33-stable', {'sensitivity': 1})",
106
+ action: "deny(403)",
107
+ },
108
+ ];
109
+ /**
110
+ * Rules the gateway policy bills for, the default rule included (Cloud
111
+ * Armor Standard prices every rule of a policy, cloud.google.com/armor/pricing).
112
+ */
113
+ export const GATEWAY_ARMOR_BILLED_RULES = GATEWAY_ARMOR_RULES.length + 1;
114
+ /** One rule in the shape `gcp.compute.SecurityPolicy` `rules` take. */
115
+ function ruleArgs(r) {
116
+ const base = {
117
+ action: r.action,
118
+ priority: r.priority,
119
+ description: r.description,
120
+ match: { expr: { expression: r.expression } },
121
+ };
122
+ if (r.kind === "deny")
123
+ return base;
124
+ return {
125
+ ...base,
126
+ rateLimitOptions: {
127
+ rateLimitThreshold: { count: r.count, intervalSec: r.intervalSec },
128
+ conformAction: "allow",
129
+ exceedAction: "deny(429)",
130
+ enforceOnKey: "IP",
131
+ ...(r.banDurationSec !== undefined ? { banDurationSec: r.banDurationSec } : {}),
132
+ },
133
+ };
134
+ }
135
+ /** The gateway policy's rules for the `gcp` stack, the default allow last. */
136
+ export function gatewayArmorRuleArgs() {
137
+ return [
138
+ ...GATEWAY_ARMOR_RULES.map(ruleArgs),
139
+ {
140
+ action: "allow",
141
+ priority: DEFAULT_RULE_PRIORITY,
142
+ description: "default rule",
143
+ match: { versionedExpr: "SRC_IPS_V1", config: { srcIpRanges: ["*"] } },
144
+ },
145
+ ];
146
+ }
147
+ /**
148
+ * The `gcloud compute security-policies rules create` flags for `r`
149
+ * (without the verb, priority and policy).
150
+ */
151
+ export function gatewayArmorRuleFlags(r) {
152
+ const flags = [`--description=${r.description}`, `--expression=${r.expression}`];
153
+ if (r.kind === "deny")
154
+ return [...flags, "--action=deny-403"];
155
+ return [
156
+ ...flags,
157
+ `--action=${r.action === "rate_based_ban" ? "rate-based-ban" : "throttle"}`,
158
+ `--rate-limit-threshold-count=${r.count}`,
159
+ `--rate-limit-threshold-interval-sec=${r.intervalSec}`,
160
+ "--conform-action=allow",
161
+ // gcloud spells deny(429) as deny-429.
162
+ "--exceed-action=deny-429",
163
+ "--enforce-on-key=IP",
164
+ ...(r.banDurationSec !== undefined ? [`--ban-duration-sec=${r.banDurationSec}`] : []),
165
+ ];
166
+ }
167
+ /** Whether a live rule is exactly `spec`. */
168
+ export function isGatewayArmorRule(live, spec) {
169
+ if (live.priority !== spec.priority || live.action !== spec.action)
170
+ return false;
171
+ if (live.match?.expr?.expression !== spec.expression)
172
+ return false;
173
+ const o = live.rateLimitOptions;
174
+ if (spec.kind === "deny")
175
+ return o === undefined;
176
+ return (o?.rateLimitThreshold?.count === spec.count &&
177
+ o?.rateLimitThreshold?.intervalSec === spec.intervalSec &&
178
+ o?.conformAction === "allow" &&
179
+ o?.exceedAction === "deny(429)" &&
180
+ (o?.enforceOnKey ?? "ALL") === "IP" &&
181
+ o?.banDurationSec === spec.banDurationSec);
182
+ }
183
+ /** The rate-limit options the pre-#1339 stack set on the catch-all ban. */
184
+ const LEGACY_RATE_OPTION_KEYS = new Set([
185
+ "rateLimitThreshold",
186
+ "conformAction",
187
+ "exceedAction",
188
+ "enforceOnKey",
189
+ "banDurationSec",
190
+ ]);
191
+ /** Whether a live rule is exactly {@link LEGACY_GENERAL_BAN}; any other rule at its priority is the Owner's. */
192
+ export function isLegacyGeneralBan(live) {
193
+ const l = LEGACY_GENERAL_BAN;
194
+ const o = live.rateLimitOptions;
195
+ const config = live.match
196
+ ?.config;
197
+ return (live.priority === l.priority &&
198
+ live.action === "rate_based_ban" &&
199
+ live.match?.expr === undefined &&
200
+ JSON.stringify(config?.srcIpRanges ?? null) === JSON.stringify(["*"]) &&
201
+ o?.rateLimitThreshold?.count === l.count &&
202
+ o?.rateLimitThreshold?.intervalSec === l.intervalSec &&
203
+ o?.banDurationSec === l.banDurationSec &&
204
+ o?.conformAction === "allow" &&
205
+ o?.exceedAction === "deny(429)" &&
206
+ o?.enforceOnKey === "IP" &&
207
+ // Every other option the old stack never set (a ban threshold, an
208
+ // enforce-on-key config, a redirect, …) makes it an Owner's rule.
209
+ Object.keys(o ?? {}).every((k) => LEGACY_RATE_OPTION_KEYS.has(k)));
210
+ }
211
+ //# sourceMappingURL=gateway-edge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gateway-edge.js","sourceRoot":"","sources":["../src/gateway-edge.ts"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,2BAA2B,EAAsB,MAAM,sBAAsB,CAAC;AAEvF;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,2BAA2B,GAAG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C,GAAG,CAAC,CAAC,CAAC,CAAC,CAClE,CAAC;AACJ,CAAC"}
@@ -20,7 +20,7 @@
20
20
  * whose app-roll references infrastructure an install does not have yet fails
21
21
  * at roll time, after migrations ran.
22
22
  */
23
- export declare const INFRA_CONTRACT_VERSION = 20;
23
+ export declare const INFRA_CONTRACT_VERSION = 22;
24
24
  /**
25
25
  * What each contract version adds, in operator terms — the upgrader's
26
26
  * refusal names the steps an install is missing. Keep one entry per version
@@ -1 +1 @@
1
- {"version":3,"file":"infra-contract.d.ts","sourceRoot":"","sources":["../src/infra-contract.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAoJzC;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAqBjE,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAM7E;AAED,uEAAuE;AACvE,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAExE"}
1
+ {"version":3,"file":"infra-contract.d.ts","sourceRoot":"","sources":["../src/infra-contract.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAsKzC;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAuBjE,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAM7E;AAED,uEAAuE;AACvE,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAExE"}
@@ -21,7 +21,7 @@
21
21
  * whose app-roll references infrastructure an install does not have yet fails
22
22
  * at roll time, after migrations ran.
23
23
  */
24
- export const INFRA_CONTRACT_VERSION = 20;
24
+ export const INFRA_CONTRACT_VERSION = 22;
25
25
  // History (why each bump happened — an install below a number needs the
26
26
  // converge that introduced it):
27
27
  // 1 — epic #696 split: converge vs app-roll.
@@ -167,6 +167,24 @@ export const INFRA_CONTRACT_VERSION = 20;
167
167
  // forwarder. New service, account, bucket, IAM and edge resources the
168
168
  // in-cloud upgrader may not create, and the app-roll rolls four
169
169
  // services from now on.
170
+ // 21 — #1463 and the plain-gcp repairs. The app-roll now brings the gateways
171
+ // to the connection budget (max instances, CAELO_DB_PUBLIC_POOL_MAX),
172
+ // but an in-cloud upgrader rolls with the code of the release it runs
173
+ // from, so without this bump an install would keep 100 gateway
174
+ // instances until the update after next; the converge job runs the
175
+ // target release's code. On `gcp` the gateway also gets its allUsers
176
+ // run.invoker (the stack never declared it, so every /api/ call
177
+ // answered Cloud Run's 403) and the CLI-owned backends created with
178
+ // the `https` port name get `http` and their NEG: IAM and
179
+ // load-balancer writes the in-cloud upgrader may not make.
180
+ // 22 — #1339: on `gcp` the gateway's Cloud Armor policy gets per-path
181
+ // rules (gateway-edge.ts): a tighter ban on the auth plugin's
182
+ // credential operations, a captcha throttle, the general ban limited
183
+ // to /api/ paths (it banned staging reviewers, whose pages share the
184
+ // policy since #1330) and the OWASP packs at sensitivity 1. Policy
185
+ // writes the in-cloud upgrader holds no compute rights for, so the
186
+ // converge applies them (gateway-armor.ts). Other providers have
187
+ // nothing to converge for it.
170
188
  /**
171
189
  * What each contract version adds, in operator terms — the upgrader's
172
190
  * refusal names the steps an install is missing. Keep one entry per version
@@ -193,6 +211,8 @@ export const INFRA_CONTRACT_STEPS = {
193
211
  18: "the scheduler tick that runs the admin's periodic work and plugin workers every few minutes: its service account, workflow and Cloud Scheduler job, and its IAP access (#1140)",
194
212
  19: "the scheduler tick sent as a JSON request, because the admin refused every tick before (#1140)",
195
213
  20: "the staging gateway that serves the staged site behind the staging gate on every address: its service, service account and grants, the private staging bucket, and the staging host's own route (a second Firebase Hosting site, or a host rule and certificate on the load balancer); the live gateway no longer holds the staging gate key (#1330, #1331)",
214
+ 21: "the gateways' scale-out and connection pool kept inside the database connection budget, and on Google Cloud load-balancer installs the gateway open to visitors and the sign-in and staging routes repaired (#1463)",
215
+ 22: "per-path Cloud Armor rules for the visitor and staging gateways on Google Cloud load-balancer installs: a tighter ban on sign-up, login and password reset, a captcha throttle, the general ban only on the visitor API, and fewer false positives from the OWASP rules (#1339)",
196
216
  };
197
217
  /**
198
218
  * The steps an install at contract `installed` lacks for `target`, oldest
@@ -1 +1 @@
1
- {"version":3,"file":"infra-contract.js","sourceRoot":"","sources":["../src/infra-contract.ts"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAEzC,wEAAwE;AACxE,gCAAgC;AAChC,+CAA+C;AAC/C,sEAAsE;AACtE,2EAA2E;AAC3E,wEAAwE;AACxE,0EAA0E;AAC1E,6EAA6E;AAC7E,yEAAyE;AACzE,eAAe;AACf,0EAA0E;AAC1E,8DAA8D;AAC9D,6EAA6E;AAC7E,qEAAqE;AACrE,2EAA2E;AAC3E,6DAA6D;AAC7D,gEAAgE;AAChE,8EAA8E;AAC9E,yEAAyE;AACzE,wEAAwE;AACxE,4BAA4B;AAC5B,2EAA2E;AAC3E,2EAA2E;AAC3E,4EAA4E;AAC5E,0EAA0E;AAC1E,4EAA4E;AAC5E,wCAAwC;AACxC,4EAA4E;AAC5E,wDAAwD;AACxD,0EAA0E;AAC1E,6EAA6E;AAC7E,oEAAoE;AACpE,+EAA+E;AAC/E,2EAA2E;AAC3E,0EAA0E;AAC1E,mEAAmE;AACnE,2EAA2E;AAC3E,2EAA2E;AAC3E,wEAAwE;AACxE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} from "./upgrade/backup.js";
36
36
  import { findServiceUrl, lookupFailure, resolveGcpResourceName } from "./upgrade/gcp-lookup.js";
37
37
  import { createIapHealthProbe } from "./upgrade/health.js";
38
38
  import { createReleaseImageForms, platformDigestsOf } from "./upgrade/image-forms.js";
39
+ import { httpsLoadBalancerGet } from "./upgrade/load-balancer-get.js";
39
40
  import { recordRolledDigests } from "./upgrade/record-rolled.js";
40
41
  import { canonicalReleaseTag, ensureCosignAvailable, fetchLatestReleaseTag, releaseTag, releaseVersionForDigest, resolveOpsImageRef, resolveReleaseImages, verifyCosignAll, } from "./upgrade/release-images.js";
41
42
  import { clackReporter } from "./upgrade/reporter.js";
@@ -521,7 +522,13 @@ async function gcpHealthProbe(run, http, plan, context) {
521
522
  adminServiceUrl: urls.admin,
522
523
  gatewayServiceUrl: urls.gateway,
523
524
  mcpAuthProxyServiceUrl: urls["mcp-auth-proxy"],
524
- }, { run, http, sleep: realSleep, accessJustChanged: context.accessJustChanged }),
525
+ }, {
526
+ run,
527
+ http,
528
+ loadBalancerGet: httpsLoadBalancerGet,
529
+ sleep: realSleep,
530
+ accessJustChanged: context.accessJustChanged,
531
+ }),
525
532
  };
526
533
  }
527
534
  /**