@fntio/infra-client 0.0.0-stage → 0.5.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.
Files changed (940) hide show
  1. package/CHANGELOG.md +193 -0
  2. package/LICENSE +93 -0
  3. package/README.md +875 -2
  4. package/assets/acl-reconciler/index.js +1604 -0
  5. package/assets/api/index.js +9857 -0
  6. package/assets/api/package.json +9 -0
  7. package/assets/api/vendor_modules/.package-lock.json +857 -0
  8. package/assets/api/vendor_modules/accepts/HISTORY.md +243 -0
  9. package/assets/api/vendor_modules/accepts/LICENSE +23 -0
  10. package/assets/api/vendor_modules/accepts/README.md +140 -0
  11. package/assets/api/vendor_modules/accepts/index.js +238 -0
  12. package/assets/api/vendor_modules/accepts/package.json +47 -0
  13. package/assets/api/vendor_modules/array-flatten/LICENSE +21 -0
  14. package/assets/api/vendor_modules/array-flatten/README.md +43 -0
  15. package/assets/api/vendor_modules/array-flatten/array-flatten.js +64 -0
  16. package/assets/api/vendor_modules/array-flatten/package.json +39 -0
  17. package/assets/api/vendor_modules/aws-jwt-verify/LICENSE +175 -0
  18. package/assets/api/vendor_modules/aws-jwt-verify/README.md +1033 -0
  19. package/assets/api/vendor_modules/aws-jwt-verify/asn1.d.ts +20 -0
  20. package/assets/api/vendor_modules/aws-jwt-verify/assert.d.ts +41 -0
  21. package/assets/api/vendor_modules/aws-jwt-verify/cognito-verifier.d.ts +183 -0
  22. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/asn1.js +301 -0
  23. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/assert.js +108 -0
  24. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/cognito-verifier.js +158 -0
  25. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/error.js +131 -0
  26. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/https-common.js +29 -0
  27. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/https-node.js +89 -0
  28. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/https.js +52 -0
  29. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/index.js +9 -0
  30. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/jwk.js +221 -0
  31. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/jwt-model.js +10 -0
  32. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/jwt-rsa.js +397 -0
  33. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/jwt.js +161 -0
  34. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/node-web-compat-node.js +48 -0
  35. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/node-web-compat-web.js +78 -0
  36. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/node-web-compat.js +11 -0
  37. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/package.json +1 -0
  38. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/safe-json-parse.js +34 -0
  39. package/assets/api/vendor_modules/aws-jwt-verify/dist/cjs/typing-util.js +6 -0
  40. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/asn1.js +296 -0
  41. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/assert.js +101 -0
  42. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/cognito-verifier.js +153 -0
  43. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/error.js +101 -0
  44. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/https-common.js +25 -0
  45. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/https-node.js +85 -0
  46. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/https.js +48 -0
  47. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/index.js +4 -0
  48. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/jwk.js +208 -0
  49. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/jwt-model.js +7 -0
  50. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/jwt-rsa.js +389 -0
  51. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/jwt.js +156 -0
  52. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/node-web-compat-node.js +45 -0
  53. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/node-web-compat-web.js +75 -0
  54. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/node-web-compat.js +10 -0
  55. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/package.json +1 -0
  56. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/safe-json-parse.js +29 -0
  57. package/assets/api/vendor_modules/aws-jwt-verify/dist/esm/typing-util.js +5 -0
  58. package/assets/api/vendor_modules/aws-jwt-verify/error.d.ts +108 -0
  59. package/assets/api/vendor_modules/aws-jwt-verify/https-common.d.ts +9 -0
  60. package/assets/api/vendor_modules/aws-jwt-verify/https-node.d.ts +20 -0
  61. package/assets/api/vendor_modules/aws-jwt-verify/https.d.ts +35 -0
  62. package/assets/api/vendor_modules/aws-jwt-verify/index.d.ts +2 -0
  63. package/assets/api/vendor_modules/aws-jwt-verify/jwk.d.ts +76 -0
  64. package/assets/api/vendor_modules/aws-jwt-verify/jwt-model.d.ts +78 -0
  65. package/assets/api/vendor_modules/aws-jwt-verify/jwt-rsa.d.ts +348 -0
  66. package/assets/api/vendor_modules/aws-jwt-verify/jwt.d.ts +51 -0
  67. package/assets/api/vendor_modules/aws-jwt-verify/package.json +136 -0
  68. package/assets/api/vendor_modules/aws-jwt-verify/safe-json-parse.d.ts +18 -0
  69. package/assets/api/vendor_modules/aws-jwt-verify/typing-util.d.ts +38 -0
  70. package/assets/api/vendor_modules/body-parser/HISTORY.md +703 -0
  71. package/assets/api/vendor_modules/body-parser/LICENSE +23 -0
  72. package/assets/api/vendor_modules/body-parser/README.md +476 -0
  73. package/assets/api/vendor_modules/body-parser/index.js +156 -0
  74. package/assets/api/vendor_modules/body-parser/lib/read.js +205 -0
  75. package/assets/api/vendor_modules/body-parser/lib/types/json.js +247 -0
  76. package/assets/api/vendor_modules/body-parser/lib/types/raw.js +105 -0
  77. package/assets/api/vendor_modules/body-parser/lib/types/text.js +125 -0
  78. package/assets/api/vendor_modules/body-parser/lib/types/urlencoded.js +303 -0
  79. package/assets/api/vendor_modules/body-parser/node_modules/qs/.editorconfig +46 -0
  80. package/assets/api/vendor_modules/body-parser/node_modules/qs/.github/FUNDING.yml +12 -0
  81. package/assets/api/vendor_modules/body-parser/node_modules/qs/.github/SECURITY.md +11 -0
  82. package/assets/api/vendor_modules/body-parser/node_modules/qs/.github/THREAT_MODEL.md +80 -0
  83. package/assets/api/vendor_modules/body-parser/node_modules/qs/.nycrc +13 -0
  84. package/assets/api/vendor_modules/body-parser/node_modules/qs/CHANGELOG.md +872 -0
  85. package/assets/api/vendor_modules/body-parser/node_modules/qs/LICENSE.md +29 -0
  86. package/assets/api/vendor_modules/body-parser/node_modules/qs/README.md +804 -0
  87. package/assets/api/vendor_modules/body-parser/node_modules/qs/dist/qs.js +141 -0
  88. package/assets/api/vendor_modules/body-parser/node_modules/qs/eslint.config.mjs +57 -0
  89. package/assets/api/vendor_modules/body-parser/node_modules/qs/lib/formats.js +23 -0
  90. package/assets/api/vendor_modules/body-parser/node_modules/qs/lib/index.js +11 -0
  91. package/assets/api/vendor_modules/body-parser/node_modules/qs/lib/parse.js +503 -0
  92. package/assets/api/vendor_modules/body-parser/node_modules/qs/lib/stringify.js +378 -0
  93. package/assets/api/vendor_modules/body-parser/node_modules/qs/lib/utils.js +512 -0
  94. package/assets/api/vendor_modules/body-parser/node_modules/qs/package.json +95 -0
  95. package/assets/api/vendor_modules/body-parser/node_modules/qs/test/empty-keys-cases.js +267 -0
  96. package/assets/api/vendor_modules/body-parser/node_modules/qs/test/parse.js +2296 -0
  97. package/assets/api/vendor_modules/body-parser/node_modules/qs/test/stringify.js +1995 -0
  98. package/assets/api/vendor_modules/body-parser/node_modules/qs/test/utils.js +822 -0
  99. package/assets/api/vendor_modules/body-parser/package.json +55 -0
  100. package/assets/api/vendor_modules/bytes/History.md +97 -0
  101. package/assets/api/vendor_modules/bytes/LICENSE +23 -0
  102. package/assets/api/vendor_modules/bytes/Readme.md +152 -0
  103. package/assets/api/vendor_modules/bytes/index.js +170 -0
  104. package/assets/api/vendor_modules/bytes/package.json +42 -0
  105. package/assets/api/vendor_modules/call-bind-apply-helpers/.eslintrc +17 -0
  106. package/assets/api/vendor_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
  107. package/assets/api/vendor_modules/call-bind-apply-helpers/.nycrc +9 -0
  108. package/assets/api/vendor_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
  109. package/assets/api/vendor_modules/call-bind-apply-helpers/LICENSE +21 -0
  110. package/assets/api/vendor_modules/call-bind-apply-helpers/README.md +62 -0
  111. package/assets/api/vendor_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
  112. package/assets/api/vendor_modules/call-bind-apply-helpers/actualApply.js +10 -0
  113. package/assets/api/vendor_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
  114. package/assets/api/vendor_modules/call-bind-apply-helpers/applyBind.js +10 -0
  115. package/assets/api/vendor_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
  116. package/assets/api/vendor_modules/call-bind-apply-helpers/functionApply.js +4 -0
  117. package/assets/api/vendor_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
  118. package/assets/api/vendor_modules/call-bind-apply-helpers/functionCall.js +4 -0
  119. package/assets/api/vendor_modules/call-bind-apply-helpers/index.d.ts +64 -0
  120. package/assets/api/vendor_modules/call-bind-apply-helpers/index.js +15 -0
  121. package/assets/api/vendor_modules/call-bind-apply-helpers/package.json +85 -0
  122. package/assets/api/vendor_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
  123. package/assets/api/vendor_modules/call-bind-apply-helpers/reflectApply.js +4 -0
  124. package/assets/api/vendor_modules/call-bind-apply-helpers/test/index.js +63 -0
  125. package/assets/api/vendor_modules/call-bind-apply-helpers/tsconfig.json +9 -0
  126. package/assets/api/vendor_modules/call-bound/.eslintrc +13 -0
  127. package/assets/api/vendor_modules/call-bound/.github/FUNDING.yml +12 -0
  128. package/assets/api/vendor_modules/call-bound/.nycrc +9 -0
  129. package/assets/api/vendor_modules/call-bound/CHANGELOG.md +42 -0
  130. package/assets/api/vendor_modules/call-bound/LICENSE +21 -0
  131. package/assets/api/vendor_modules/call-bound/README.md +53 -0
  132. package/assets/api/vendor_modules/call-bound/index.d.ts +94 -0
  133. package/assets/api/vendor_modules/call-bound/index.js +19 -0
  134. package/assets/api/vendor_modules/call-bound/package.json +99 -0
  135. package/assets/api/vendor_modules/call-bound/test/index.js +61 -0
  136. package/assets/api/vendor_modules/call-bound/tsconfig.json +10 -0
  137. package/assets/api/vendor_modules/content-disposition/HISTORY.md +60 -0
  138. package/assets/api/vendor_modules/content-disposition/LICENSE +22 -0
  139. package/assets/api/vendor_modules/content-disposition/README.md +142 -0
  140. package/assets/api/vendor_modules/content-disposition/index.js +458 -0
  141. package/assets/api/vendor_modules/content-disposition/package.json +44 -0
  142. package/assets/api/vendor_modules/content-type/HISTORY.md +29 -0
  143. package/assets/api/vendor_modules/content-type/LICENSE +22 -0
  144. package/assets/api/vendor_modules/content-type/README.md +94 -0
  145. package/assets/api/vendor_modules/content-type/index.js +225 -0
  146. package/assets/api/vendor_modules/content-type/package.json +42 -0
  147. package/assets/api/vendor_modules/cookie/LICENSE +24 -0
  148. package/assets/api/vendor_modules/cookie/README.md +317 -0
  149. package/assets/api/vendor_modules/cookie/SECURITY.md +25 -0
  150. package/assets/api/vendor_modules/cookie/index.js +335 -0
  151. package/assets/api/vendor_modules/cookie/package.json +44 -0
  152. package/assets/api/vendor_modules/cookie-signature/History.md +42 -0
  153. package/assets/api/vendor_modules/cookie-signature/Readme.md +42 -0
  154. package/assets/api/vendor_modules/cookie-signature/index.js +51 -0
  155. package/assets/api/vendor_modules/cookie-signature/package.json +18 -0
  156. package/assets/api/vendor_modules/debug/.coveralls.yml +1 -0
  157. package/assets/api/vendor_modules/debug/.eslintrc +11 -0
  158. package/assets/api/vendor_modules/debug/.travis.yml +14 -0
  159. package/assets/api/vendor_modules/debug/CHANGELOG.md +362 -0
  160. package/assets/api/vendor_modules/debug/LICENSE +19 -0
  161. package/assets/api/vendor_modules/debug/Makefile +50 -0
  162. package/assets/api/vendor_modules/debug/README.md +312 -0
  163. package/assets/api/vendor_modules/debug/component.json +19 -0
  164. package/assets/api/vendor_modules/debug/karma.conf.js +70 -0
  165. package/assets/api/vendor_modules/debug/node.js +1 -0
  166. package/assets/api/vendor_modules/debug/package.json +49 -0
  167. package/assets/api/vendor_modules/debug/src/browser.js +185 -0
  168. package/assets/api/vendor_modules/debug/src/debug.js +202 -0
  169. package/assets/api/vendor_modules/debug/src/index.js +10 -0
  170. package/assets/api/vendor_modules/debug/src/inspector-log.js +15 -0
  171. package/assets/api/vendor_modules/debug/src/node.js +248 -0
  172. package/assets/api/vendor_modules/depd/History.md +103 -0
  173. package/assets/api/vendor_modules/depd/LICENSE +22 -0
  174. package/assets/api/vendor_modules/depd/Readme.md +280 -0
  175. package/assets/api/vendor_modules/depd/index.js +538 -0
  176. package/assets/api/vendor_modules/depd/lib/browser/index.js +77 -0
  177. package/assets/api/vendor_modules/depd/package.json +45 -0
  178. package/assets/api/vendor_modules/destroy/LICENSE +23 -0
  179. package/assets/api/vendor_modules/destroy/README.md +63 -0
  180. package/assets/api/vendor_modules/destroy/index.js +209 -0
  181. package/assets/api/vendor_modules/destroy/package.json +48 -0
  182. package/assets/api/vendor_modules/dunder-proto/.eslintrc +5 -0
  183. package/assets/api/vendor_modules/dunder-proto/.github/FUNDING.yml +12 -0
  184. package/assets/api/vendor_modules/dunder-proto/.nycrc +13 -0
  185. package/assets/api/vendor_modules/dunder-proto/CHANGELOG.md +24 -0
  186. package/assets/api/vendor_modules/dunder-proto/LICENSE +21 -0
  187. package/assets/api/vendor_modules/dunder-proto/README.md +54 -0
  188. package/assets/api/vendor_modules/dunder-proto/get.d.ts +5 -0
  189. package/assets/api/vendor_modules/dunder-proto/get.js +30 -0
  190. package/assets/api/vendor_modules/dunder-proto/package.json +76 -0
  191. package/assets/api/vendor_modules/dunder-proto/set.d.ts +5 -0
  192. package/assets/api/vendor_modules/dunder-proto/set.js +35 -0
  193. package/assets/api/vendor_modules/dunder-proto/test/get.js +34 -0
  194. package/assets/api/vendor_modules/dunder-proto/test/index.js +4 -0
  195. package/assets/api/vendor_modules/dunder-proto/test/set.js +50 -0
  196. package/assets/api/vendor_modules/dunder-proto/tsconfig.json +9 -0
  197. package/assets/api/vendor_modules/ee-first/LICENSE +22 -0
  198. package/assets/api/vendor_modules/ee-first/README.md +80 -0
  199. package/assets/api/vendor_modules/ee-first/index.js +95 -0
  200. package/assets/api/vendor_modules/ee-first/package.json +29 -0
  201. package/assets/api/vendor_modules/encodeurl/LICENSE +22 -0
  202. package/assets/api/vendor_modules/encodeurl/README.md +109 -0
  203. package/assets/api/vendor_modules/encodeurl/index.js +60 -0
  204. package/assets/api/vendor_modules/encodeurl/package.json +40 -0
  205. package/assets/api/vendor_modules/es-define-property/.eslintrc +13 -0
  206. package/assets/api/vendor_modules/es-define-property/.github/FUNDING.yml +12 -0
  207. package/assets/api/vendor_modules/es-define-property/.nycrc +9 -0
  208. package/assets/api/vendor_modules/es-define-property/CHANGELOG.md +29 -0
  209. package/assets/api/vendor_modules/es-define-property/LICENSE +21 -0
  210. package/assets/api/vendor_modules/es-define-property/README.md +49 -0
  211. package/assets/api/vendor_modules/es-define-property/index.d.ts +3 -0
  212. package/assets/api/vendor_modules/es-define-property/index.js +14 -0
  213. package/assets/api/vendor_modules/es-define-property/package.json +81 -0
  214. package/assets/api/vendor_modules/es-define-property/test/index.js +56 -0
  215. package/assets/api/vendor_modules/es-define-property/tsconfig.json +10 -0
  216. package/assets/api/vendor_modules/es-errors/.eslintrc +5 -0
  217. package/assets/api/vendor_modules/es-errors/.github/FUNDING.yml +12 -0
  218. package/assets/api/vendor_modules/es-errors/CHANGELOG.md +40 -0
  219. package/assets/api/vendor_modules/es-errors/LICENSE +21 -0
  220. package/assets/api/vendor_modules/es-errors/README.md +55 -0
  221. package/assets/api/vendor_modules/es-errors/eval.d.ts +3 -0
  222. package/assets/api/vendor_modules/es-errors/eval.js +4 -0
  223. package/assets/api/vendor_modules/es-errors/index.d.ts +3 -0
  224. package/assets/api/vendor_modules/es-errors/index.js +4 -0
  225. package/assets/api/vendor_modules/es-errors/package.json +80 -0
  226. package/assets/api/vendor_modules/es-errors/range.d.ts +3 -0
  227. package/assets/api/vendor_modules/es-errors/range.js +4 -0
  228. package/assets/api/vendor_modules/es-errors/ref.d.ts +3 -0
  229. package/assets/api/vendor_modules/es-errors/ref.js +4 -0
  230. package/assets/api/vendor_modules/es-errors/syntax.d.ts +3 -0
  231. package/assets/api/vendor_modules/es-errors/syntax.js +4 -0
  232. package/assets/api/vendor_modules/es-errors/test/index.js +19 -0
  233. package/assets/api/vendor_modules/es-errors/tsconfig.json +49 -0
  234. package/assets/api/vendor_modules/es-errors/type.d.ts +3 -0
  235. package/assets/api/vendor_modules/es-errors/type.js +4 -0
  236. package/assets/api/vendor_modules/es-errors/uri.d.ts +3 -0
  237. package/assets/api/vendor_modules/es-errors/uri.js +4 -0
  238. package/assets/api/vendor_modules/es-object-atoms/.eslintrc +16 -0
  239. package/assets/api/vendor_modules/es-object-atoms/.github/FUNDING.yml +12 -0
  240. package/assets/api/vendor_modules/es-object-atoms/CHANGELOG.md +44 -0
  241. package/assets/api/vendor_modules/es-object-atoms/LICENSE +21 -0
  242. package/assets/api/vendor_modules/es-object-atoms/README.md +63 -0
  243. package/assets/api/vendor_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
  244. package/assets/api/vendor_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
  245. package/assets/api/vendor_modules/es-object-atoms/ToObject.d.ts +7 -0
  246. package/assets/api/vendor_modules/es-object-atoms/ToObject.js +10 -0
  247. package/assets/api/vendor_modules/es-object-atoms/index.d.ts +3 -0
  248. package/assets/api/vendor_modules/es-object-atoms/index.js +4 -0
  249. package/assets/api/vendor_modules/es-object-atoms/isObject.d.ts +3 -0
  250. package/assets/api/vendor_modules/es-object-atoms/isObject.js +6 -0
  251. package/assets/api/vendor_modules/es-object-atoms/package.json +79 -0
  252. package/assets/api/vendor_modules/es-object-atoms/test/index.js +38 -0
  253. package/assets/api/vendor_modules/es-object-atoms/tsconfig.json +7 -0
  254. package/assets/api/vendor_modules/escape-html/LICENSE +24 -0
  255. package/assets/api/vendor_modules/escape-html/Readme.md +43 -0
  256. package/assets/api/vendor_modules/escape-html/index.js +78 -0
  257. package/assets/api/vendor_modules/escape-html/package.json +24 -0
  258. package/assets/api/vendor_modules/etag/HISTORY.md +83 -0
  259. package/assets/api/vendor_modules/etag/LICENSE +22 -0
  260. package/assets/api/vendor_modules/etag/README.md +159 -0
  261. package/assets/api/vendor_modules/etag/index.js +131 -0
  262. package/assets/api/vendor_modules/etag/package.json +47 -0
  263. package/assets/api/vendor_modules/express/History.md +3676 -0
  264. package/assets/api/vendor_modules/express/LICENSE +24 -0
  265. package/assets/api/vendor_modules/express/Readme.md +260 -0
  266. package/assets/api/vendor_modules/express/index.js +11 -0
  267. package/assets/api/vendor_modules/express/lib/application.js +661 -0
  268. package/assets/api/vendor_modules/express/lib/express.js +116 -0
  269. package/assets/api/vendor_modules/express/lib/middleware/init.js +43 -0
  270. package/assets/api/vendor_modules/express/lib/middleware/query.js +47 -0
  271. package/assets/api/vendor_modules/express/lib/request.js +525 -0
  272. package/assets/api/vendor_modules/express/lib/response.js +1179 -0
  273. package/assets/api/vendor_modules/express/lib/router/index.js +673 -0
  274. package/assets/api/vendor_modules/express/lib/router/layer.js +181 -0
  275. package/assets/api/vendor_modules/express/lib/router/route.js +230 -0
  276. package/assets/api/vendor_modules/express/lib/utils.js +304 -0
  277. package/assets/api/vendor_modules/express/lib/view.js +182 -0
  278. package/assets/api/vendor_modules/express/package.json +102 -0
  279. package/assets/api/vendor_modules/finalhandler/HISTORY.md +216 -0
  280. package/assets/api/vendor_modules/finalhandler/LICENSE +22 -0
  281. package/assets/api/vendor_modules/finalhandler/README.md +147 -0
  282. package/assets/api/vendor_modules/finalhandler/SECURITY.md +25 -0
  283. package/assets/api/vendor_modules/finalhandler/index.js +341 -0
  284. package/assets/api/vendor_modules/finalhandler/package.json +47 -0
  285. package/assets/api/vendor_modules/forwarded/HISTORY.md +21 -0
  286. package/assets/api/vendor_modules/forwarded/LICENSE +22 -0
  287. package/assets/api/vendor_modules/forwarded/README.md +57 -0
  288. package/assets/api/vendor_modules/forwarded/index.js +90 -0
  289. package/assets/api/vendor_modules/forwarded/package.json +45 -0
  290. package/assets/api/vendor_modules/fresh/HISTORY.md +70 -0
  291. package/assets/api/vendor_modules/fresh/LICENSE +23 -0
  292. package/assets/api/vendor_modules/fresh/README.md +119 -0
  293. package/assets/api/vendor_modules/fresh/index.js +137 -0
  294. package/assets/api/vendor_modules/fresh/package.json +46 -0
  295. package/assets/api/vendor_modules/function-bind/.eslintrc +21 -0
  296. package/assets/api/vendor_modules/function-bind/.github/FUNDING.yml +12 -0
  297. package/assets/api/vendor_modules/function-bind/.github/SECURITY.md +3 -0
  298. package/assets/api/vendor_modules/function-bind/.nycrc +13 -0
  299. package/assets/api/vendor_modules/function-bind/CHANGELOG.md +136 -0
  300. package/assets/api/vendor_modules/function-bind/LICENSE +20 -0
  301. package/assets/api/vendor_modules/function-bind/README.md +46 -0
  302. package/assets/api/vendor_modules/function-bind/implementation.js +84 -0
  303. package/assets/api/vendor_modules/function-bind/index.js +5 -0
  304. package/assets/api/vendor_modules/function-bind/package.json +87 -0
  305. package/assets/api/vendor_modules/function-bind/test/.eslintrc +9 -0
  306. package/assets/api/vendor_modules/function-bind/test/index.js +252 -0
  307. package/assets/api/vendor_modules/get-intrinsic/.eslintrc +42 -0
  308. package/assets/api/vendor_modules/get-intrinsic/.github/FUNDING.yml +12 -0
  309. package/assets/api/vendor_modules/get-intrinsic/.nycrc +9 -0
  310. package/assets/api/vendor_modules/get-intrinsic/CHANGELOG.md +186 -0
  311. package/assets/api/vendor_modules/get-intrinsic/LICENSE +21 -0
  312. package/assets/api/vendor_modules/get-intrinsic/README.md +71 -0
  313. package/assets/api/vendor_modules/get-intrinsic/index.js +378 -0
  314. package/assets/api/vendor_modules/get-intrinsic/package.json +97 -0
  315. package/assets/api/vendor_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
  316. package/assets/api/vendor_modules/get-proto/.eslintrc +10 -0
  317. package/assets/api/vendor_modules/get-proto/.github/FUNDING.yml +12 -0
  318. package/assets/api/vendor_modules/get-proto/.nycrc +9 -0
  319. package/assets/api/vendor_modules/get-proto/CHANGELOG.md +21 -0
  320. package/assets/api/vendor_modules/get-proto/LICENSE +21 -0
  321. package/assets/api/vendor_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
  322. package/assets/api/vendor_modules/get-proto/Object.getPrototypeOf.js +6 -0
  323. package/assets/api/vendor_modules/get-proto/README.md +50 -0
  324. package/assets/api/vendor_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
  325. package/assets/api/vendor_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
  326. package/assets/api/vendor_modules/get-proto/index.d.ts +5 -0
  327. package/assets/api/vendor_modules/get-proto/index.js +27 -0
  328. package/assets/api/vendor_modules/get-proto/package.json +81 -0
  329. package/assets/api/vendor_modules/get-proto/test/index.js +68 -0
  330. package/assets/api/vendor_modules/get-proto/tsconfig.json +9 -0
  331. package/assets/api/vendor_modules/gopd/.eslintrc +16 -0
  332. package/assets/api/vendor_modules/gopd/.github/FUNDING.yml +12 -0
  333. package/assets/api/vendor_modules/gopd/CHANGELOG.md +45 -0
  334. package/assets/api/vendor_modules/gopd/LICENSE +21 -0
  335. package/assets/api/vendor_modules/gopd/README.md +40 -0
  336. package/assets/api/vendor_modules/gopd/gOPD.d.ts +1 -0
  337. package/assets/api/vendor_modules/gopd/gOPD.js +4 -0
  338. package/assets/api/vendor_modules/gopd/index.d.ts +5 -0
  339. package/assets/api/vendor_modules/gopd/index.js +15 -0
  340. package/assets/api/vendor_modules/gopd/package.json +77 -0
  341. package/assets/api/vendor_modules/gopd/test/index.js +36 -0
  342. package/assets/api/vendor_modules/gopd/tsconfig.json +9 -0
  343. package/assets/api/vendor_modules/has-symbols/.eslintrc +11 -0
  344. package/assets/api/vendor_modules/has-symbols/.github/FUNDING.yml +12 -0
  345. package/assets/api/vendor_modules/has-symbols/.nycrc +9 -0
  346. package/assets/api/vendor_modules/has-symbols/CHANGELOG.md +91 -0
  347. package/assets/api/vendor_modules/has-symbols/LICENSE +21 -0
  348. package/assets/api/vendor_modules/has-symbols/README.md +46 -0
  349. package/assets/api/vendor_modules/has-symbols/index.d.ts +3 -0
  350. package/assets/api/vendor_modules/has-symbols/index.js +14 -0
  351. package/assets/api/vendor_modules/has-symbols/package.json +111 -0
  352. package/assets/api/vendor_modules/has-symbols/shams.d.ts +3 -0
  353. package/assets/api/vendor_modules/has-symbols/shams.js +45 -0
  354. package/assets/api/vendor_modules/has-symbols/test/index.js +22 -0
  355. package/assets/api/vendor_modules/has-symbols/test/shams/core-js.js +29 -0
  356. package/assets/api/vendor_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
  357. package/assets/api/vendor_modules/has-symbols/test/tests.js +58 -0
  358. package/assets/api/vendor_modules/has-symbols/tsconfig.json +10 -0
  359. package/assets/api/vendor_modules/hasown/.github/FUNDING.yml +12 -0
  360. package/assets/api/vendor_modules/hasown/.nycrc +13 -0
  361. package/assets/api/vendor_modules/hasown/CHANGELOG.md +58 -0
  362. package/assets/api/vendor_modules/hasown/LICENSE +21 -0
  363. package/assets/api/vendor_modules/hasown/README.md +40 -0
  364. package/assets/api/vendor_modules/hasown/eslint.config.mjs +6 -0
  365. package/assets/api/vendor_modules/hasown/index.d.ts +3 -0
  366. package/assets/api/vendor_modules/hasown/index.js +8 -0
  367. package/assets/api/vendor_modules/hasown/package.json +91 -0
  368. package/assets/api/vendor_modules/hasown/tsconfig.json +6 -0
  369. package/assets/api/vendor_modules/http-errors/HISTORY.md +186 -0
  370. package/assets/api/vendor_modules/http-errors/LICENSE +23 -0
  371. package/assets/api/vendor_modules/http-errors/README.md +169 -0
  372. package/assets/api/vendor_modules/http-errors/index.js +290 -0
  373. package/assets/api/vendor_modules/http-errors/package.json +54 -0
  374. package/assets/api/vendor_modules/iconv-lite/Changelog.md +162 -0
  375. package/assets/api/vendor_modules/iconv-lite/LICENSE +21 -0
  376. package/assets/api/vendor_modules/iconv-lite/README.md +156 -0
  377. package/assets/api/vendor_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
  378. package/assets/api/vendor_modules/iconv-lite/encodings/dbcs-data.js +176 -0
  379. package/assets/api/vendor_modules/iconv-lite/encodings/index.js +22 -0
  380. package/assets/api/vendor_modules/iconv-lite/encodings/internal.js +188 -0
  381. package/assets/api/vendor_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
  382. package/assets/api/vendor_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
  383. package/assets/api/vendor_modules/iconv-lite/encodings/sbcs-data.js +174 -0
  384. package/assets/api/vendor_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
  385. package/assets/api/vendor_modules/iconv-lite/encodings/tables/cp936.json +264 -0
  386. package/assets/api/vendor_modules/iconv-lite/encodings/tables/cp949.json +273 -0
  387. package/assets/api/vendor_modules/iconv-lite/encodings/tables/cp950.json +177 -0
  388. package/assets/api/vendor_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
  389. package/assets/api/vendor_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
  390. package/assets/api/vendor_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
  391. package/assets/api/vendor_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
  392. package/assets/api/vendor_modules/iconv-lite/encodings/utf16.js +177 -0
  393. package/assets/api/vendor_modules/iconv-lite/encodings/utf7.js +290 -0
  394. package/assets/api/vendor_modules/iconv-lite/lib/bom-handling.js +52 -0
  395. package/assets/api/vendor_modules/iconv-lite/lib/extend-node.js +217 -0
  396. package/assets/api/vendor_modules/iconv-lite/lib/index.d.ts +24 -0
  397. package/assets/api/vendor_modules/iconv-lite/lib/index.js +153 -0
  398. package/assets/api/vendor_modules/iconv-lite/lib/streams.js +121 -0
  399. package/assets/api/vendor_modules/iconv-lite/package.json +46 -0
  400. package/assets/api/vendor_modules/inherits/LICENSE +16 -0
  401. package/assets/api/vendor_modules/inherits/README.md +42 -0
  402. package/assets/api/vendor_modules/inherits/inherits.js +9 -0
  403. package/assets/api/vendor_modules/inherits/inherits_browser.js +27 -0
  404. package/assets/api/vendor_modules/inherits/package.json +29 -0
  405. package/assets/api/vendor_modules/ipaddr.js/LICENSE +19 -0
  406. package/assets/api/vendor_modules/ipaddr.js/README.md +233 -0
  407. package/assets/api/vendor_modules/ipaddr.js/ipaddr.min.js +1 -0
  408. package/assets/api/vendor_modules/ipaddr.js/lib/ipaddr.js +673 -0
  409. package/assets/api/vendor_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
  410. package/assets/api/vendor_modules/ipaddr.js/package.json +35 -0
  411. package/assets/api/vendor_modules/math-intrinsics/.eslintrc +16 -0
  412. package/assets/api/vendor_modules/math-intrinsics/.github/FUNDING.yml +12 -0
  413. package/assets/api/vendor_modules/math-intrinsics/CHANGELOG.md +24 -0
  414. package/assets/api/vendor_modules/math-intrinsics/LICENSE +21 -0
  415. package/assets/api/vendor_modules/math-intrinsics/README.md +50 -0
  416. package/assets/api/vendor_modules/math-intrinsics/abs.d.ts +1 -0
  417. package/assets/api/vendor_modules/math-intrinsics/abs.js +4 -0
  418. package/assets/api/vendor_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
  419. package/assets/api/vendor_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
  420. package/assets/api/vendor_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
  421. package/assets/api/vendor_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
  422. package/assets/api/vendor_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
  423. package/assets/api/vendor_modules/math-intrinsics/constants/maxValue.js +5 -0
  424. package/assets/api/vendor_modules/math-intrinsics/floor.d.ts +1 -0
  425. package/assets/api/vendor_modules/math-intrinsics/floor.js +4 -0
  426. package/assets/api/vendor_modules/math-intrinsics/isFinite.d.ts +3 -0
  427. package/assets/api/vendor_modules/math-intrinsics/isFinite.js +12 -0
  428. package/assets/api/vendor_modules/math-intrinsics/isInteger.d.ts +3 -0
  429. package/assets/api/vendor_modules/math-intrinsics/isInteger.js +16 -0
  430. package/assets/api/vendor_modules/math-intrinsics/isNaN.d.ts +1 -0
  431. package/assets/api/vendor_modules/math-intrinsics/isNaN.js +6 -0
  432. package/assets/api/vendor_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
  433. package/assets/api/vendor_modules/math-intrinsics/isNegativeZero.js +6 -0
  434. package/assets/api/vendor_modules/math-intrinsics/max.d.ts +1 -0
  435. package/assets/api/vendor_modules/math-intrinsics/max.js +4 -0
  436. package/assets/api/vendor_modules/math-intrinsics/min.d.ts +1 -0
  437. package/assets/api/vendor_modules/math-intrinsics/min.js +4 -0
  438. package/assets/api/vendor_modules/math-intrinsics/mod.d.ts +3 -0
  439. package/assets/api/vendor_modules/math-intrinsics/mod.js +9 -0
  440. package/assets/api/vendor_modules/math-intrinsics/package.json +86 -0
  441. package/assets/api/vendor_modules/math-intrinsics/pow.d.ts +1 -0
  442. package/assets/api/vendor_modules/math-intrinsics/pow.js +4 -0
  443. package/assets/api/vendor_modules/math-intrinsics/round.d.ts +1 -0
  444. package/assets/api/vendor_modules/math-intrinsics/round.js +4 -0
  445. package/assets/api/vendor_modules/math-intrinsics/sign.d.ts +3 -0
  446. package/assets/api/vendor_modules/math-intrinsics/sign.js +11 -0
  447. package/assets/api/vendor_modules/math-intrinsics/test/index.js +192 -0
  448. package/assets/api/vendor_modules/math-intrinsics/tsconfig.json +3 -0
  449. package/assets/api/vendor_modules/media-typer/HISTORY.md +22 -0
  450. package/assets/api/vendor_modules/media-typer/LICENSE +22 -0
  451. package/assets/api/vendor_modules/media-typer/README.md +81 -0
  452. package/assets/api/vendor_modules/media-typer/index.js +270 -0
  453. package/assets/api/vendor_modules/media-typer/package.json +26 -0
  454. package/assets/api/vendor_modules/merge-descriptors/HISTORY.md +21 -0
  455. package/assets/api/vendor_modules/merge-descriptors/LICENSE +23 -0
  456. package/assets/api/vendor_modules/merge-descriptors/README.md +49 -0
  457. package/assets/api/vendor_modules/merge-descriptors/index.js +60 -0
  458. package/assets/api/vendor_modules/merge-descriptors/package.json +39 -0
  459. package/assets/api/vendor_modules/methods/HISTORY.md +29 -0
  460. package/assets/api/vendor_modules/methods/LICENSE +24 -0
  461. package/assets/api/vendor_modules/methods/README.md +51 -0
  462. package/assets/api/vendor_modules/methods/index.js +69 -0
  463. package/assets/api/vendor_modules/methods/package.json +36 -0
  464. package/assets/api/vendor_modules/mime/CHANGELOG.md +164 -0
  465. package/assets/api/vendor_modules/mime/LICENSE +21 -0
  466. package/assets/api/vendor_modules/mime/README.md +90 -0
  467. package/assets/api/vendor_modules/mime/cli.js +8 -0
  468. package/assets/api/vendor_modules/mime/mime.js +108 -0
  469. package/assets/api/vendor_modules/mime/package.json +44 -0
  470. package/assets/api/vendor_modules/mime/src/build.js +53 -0
  471. package/assets/api/vendor_modules/mime/src/test.js +60 -0
  472. package/assets/api/vendor_modules/mime/types.json +1 -0
  473. package/assets/api/vendor_modules/mime-db/HISTORY.md +507 -0
  474. package/assets/api/vendor_modules/mime-db/LICENSE +23 -0
  475. package/assets/api/vendor_modules/mime-db/README.md +100 -0
  476. package/assets/api/vendor_modules/mime-db/db.json +8519 -0
  477. package/assets/api/vendor_modules/mime-db/index.js +12 -0
  478. package/assets/api/vendor_modules/mime-db/package.json +60 -0
  479. package/assets/api/vendor_modules/mime-types/HISTORY.md +397 -0
  480. package/assets/api/vendor_modules/mime-types/LICENSE +23 -0
  481. package/assets/api/vendor_modules/mime-types/README.md +113 -0
  482. package/assets/api/vendor_modules/mime-types/index.js +188 -0
  483. package/assets/api/vendor_modules/mime-types/package.json +44 -0
  484. package/assets/api/vendor_modules/ms/index.js +152 -0
  485. package/assets/api/vendor_modules/ms/license.md +21 -0
  486. package/assets/api/vendor_modules/ms/package.json +37 -0
  487. package/assets/api/vendor_modules/ms/readme.md +51 -0
  488. package/assets/api/vendor_modules/negotiator/HISTORY.md +108 -0
  489. package/assets/api/vendor_modules/negotiator/LICENSE +24 -0
  490. package/assets/api/vendor_modules/negotiator/README.md +203 -0
  491. package/assets/api/vendor_modules/negotiator/index.js +82 -0
  492. package/assets/api/vendor_modules/negotiator/lib/charset.js +169 -0
  493. package/assets/api/vendor_modules/negotiator/lib/encoding.js +184 -0
  494. package/assets/api/vendor_modules/negotiator/lib/language.js +179 -0
  495. package/assets/api/vendor_modules/negotiator/lib/mediaType.js +294 -0
  496. package/assets/api/vendor_modules/negotiator/package.json +42 -0
  497. package/assets/api/vendor_modules/object-inspect/.eslintrc +53 -0
  498. package/assets/api/vendor_modules/object-inspect/.github/FUNDING.yml +12 -0
  499. package/assets/api/vendor_modules/object-inspect/.nycrc +13 -0
  500. package/assets/api/vendor_modules/object-inspect/CHANGELOG.md +424 -0
  501. package/assets/api/vendor_modules/object-inspect/LICENSE +21 -0
  502. package/assets/api/vendor_modules/object-inspect/example/all.js +23 -0
  503. package/assets/api/vendor_modules/object-inspect/example/circular.js +6 -0
  504. package/assets/api/vendor_modules/object-inspect/example/fn.js +5 -0
  505. package/assets/api/vendor_modules/object-inspect/example/inspect.js +10 -0
  506. package/assets/api/vendor_modules/object-inspect/index.js +544 -0
  507. package/assets/api/vendor_modules/object-inspect/package-support.json +20 -0
  508. package/assets/api/vendor_modules/object-inspect/package.json +105 -0
  509. package/assets/api/vendor_modules/object-inspect/readme.markdown +84 -0
  510. package/assets/api/vendor_modules/object-inspect/test/bigint.js +58 -0
  511. package/assets/api/vendor_modules/object-inspect/test/browser/dom.js +15 -0
  512. package/assets/api/vendor_modules/object-inspect/test/circular.js +16 -0
  513. package/assets/api/vendor_modules/object-inspect/test/deep.js +12 -0
  514. package/assets/api/vendor_modules/object-inspect/test/element.js +53 -0
  515. package/assets/api/vendor_modules/object-inspect/test/err.js +48 -0
  516. package/assets/api/vendor_modules/object-inspect/test/fakes.js +29 -0
  517. package/assets/api/vendor_modules/object-inspect/test/fn.js +76 -0
  518. package/assets/api/vendor_modules/object-inspect/test/global.js +17 -0
  519. package/assets/api/vendor_modules/object-inspect/test/has.js +15 -0
  520. package/assets/api/vendor_modules/object-inspect/test/holes.js +15 -0
  521. package/assets/api/vendor_modules/object-inspect/test/indent-option.js +271 -0
  522. package/assets/api/vendor_modules/object-inspect/test/inspect.js +139 -0
  523. package/assets/api/vendor_modules/object-inspect/test/lowbyte.js +12 -0
  524. package/assets/api/vendor_modules/object-inspect/test/number.js +58 -0
  525. package/assets/api/vendor_modules/object-inspect/test/quoteStyle.js +26 -0
  526. package/assets/api/vendor_modules/object-inspect/test/toStringTag.js +40 -0
  527. package/assets/api/vendor_modules/object-inspect/test/undef.js +12 -0
  528. package/assets/api/vendor_modules/object-inspect/test/values.js +261 -0
  529. package/assets/api/vendor_modules/object-inspect/test-core-js.js +26 -0
  530. package/assets/api/vendor_modules/object-inspect/util.inspect.js +1 -0
  531. package/assets/api/vendor_modules/on-finished/HISTORY.md +98 -0
  532. package/assets/api/vendor_modules/on-finished/LICENSE +23 -0
  533. package/assets/api/vendor_modules/on-finished/README.md +162 -0
  534. package/assets/api/vendor_modules/on-finished/index.js +234 -0
  535. package/assets/api/vendor_modules/on-finished/package.json +39 -0
  536. package/assets/api/vendor_modules/parseurl/HISTORY.md +58 -0
  537. package/assets/api/vendor_modules/parseurl/LICENSE +24 -0
  538. package/assets/api/vendor_modules/parseurl/README.md +133 -0
  539. package/assets/api/vendor_modules/parseurl/index.js +158 -0
  540. package/assets/api/vendor_modules/parseurl/package.json +40 -0
  541. package/assets/api/vendor_modules/path-to-regexp/LICENSE +21 -0
  542. package/assets/api/vendor_modules/path-to-regexp/Readme.md +35 -0
  543. package/assets/api/vendor_modules/path-to-regexp/index.js +158 -0
  544. package/assets/api/vendor_modules/path-to-regexp/package.json +30 -0
  545. package/assets/api/vendor_modules/proxy-addr/HISTORY.md +167 -0
  546. package/assets/api/vendor_modules/proxy-addr/LICENSE +22 -0
  547. package/assets/api/vendor_modules/proxy-addr/README.md +139 -0
  548. package/assets/api/vendor_modules/proxy-addr/index.js +359 -0
  549. package/assets/api/vendor_modules/proxy-addr/package.json +51 -0
  550. package/assets/api/vendor_modules/qs/.editorconfig +46 -0
  551. package/assets/api/vendor_modules/qs/.github/FUNDING.yml +12 -0
  552. package/assets/api/vendor_modules/qs/.github/SECURITY.md +11 -0
  553. package/assets/api/vendor_modules/qs/.github/THREAT_MODEL.md +78 -0
  554. package/assets/api/vendor_modules/qs/.nycrc +13 -0
  555. package/assets/api/vendor_modules/qs/CHANGELOG.md +833 -0
  556. package/assets/api/vendor_modules/qs/LICENSE.md +29 -0
  557. package/assets/api/vendor_modules/qs/README.md +758 -0
  558. package/assets/api/vendor_modules/qs/dist/qs.js +141 -0
  559. package/assets/api/vendor_modules/qs/eslint.config.mjs +57 -0
  560. package/assets/api/vendor_modules/qs/lib/formats.js +23 -0
  561. package/assets/api/vendor_modules/qs/lib/index.js +11 -0
  562. package/assets/api/vendor_modules/qs/lib/parse.js +414 -0
  563. package/assets/api/vendor_modules/qs/lib/stringify.js +363 -0
  564. package/assets/api/vendor_modules/qs/lib/utils.js +381 -0
  565. package/assets/api/vendor_modules/qs/package.json +95 -0
  566. package/assets/api/vendor_modules/qs/test/empty-keys-cases.js +267 -0
  567. package/assets/api/vendor_modules/qs/test/parse.js +1933 -0
  568. package/assets/api/vendor_modules/qs/test/stringify.js +1448 -0
  569. package/assets/api/vendor_modules/qs/test/utils.js +626 -0
  570. package/assets/api/vendor_modules/range-parser/HISTORY.md +56 -0
  571. package/assets/api/vendor_modules/range-parser/LICENSE +23 -0
  572. package/assets/api/vendor_modules/range-parser/README.md +84 -0
  573. package/assets/api/vendor_modules/range-parser/index.js +162 -0
  574. package/assets/api/vendor_modules/range-parser/package.json +44 -0
  575. package/assets/api/vendor_modules/raw-body/LICENSE +22 -0
  576. package/assets/api/vendor_modules/raw-body/README.md +223 -0
  577. package/assets/api/vendor_modules/raw-body/index.d.ts +87 -0
  578. package/assets/api/vendor_modules/raw-body/index.js +336 -0
  579. package/assets/api/vendor_modules/raw-body/package.json +47 -0
  580. package/assets/api/vendor_modules/safe-buffer/LICENSE +21 -0
  581. package/assets/api/vendor_modules/safe-buffer/README.md +584 -0
  582. package/assets/api/vendor_modules/safe-buffer/index.d.ts +187 -0
  583. package/assets/api/vendor_modules/safe-buffer/index.js +65 -0
  584. package/assets/api/vendor_modules/safe-buffer/package.json +51 -0
  585. package/assets/api/vendor_modules/safer-buffer/LICENSE +21 -0
  586. package/assets/api/vendor_modules/safer-buffer/Porting-Buffer.md +268 -0
  587. package/assets/api/vendor_modules/safer-buffer/Readme.md +156 -0
  588. package/assets/api/vendor_modules/safer-buffer/dangerous.js +58 -0
  589. package/assets/api/vendor_modules/safer-buffer/package.json +34 -0
  590. package/assets/api/vendor_modules/safer-buffer/safer.js +77 -0
  591. package/assets/api/vendor_modules/safer-buffer/tests.js +406 -0
  592. package/assets/api/vendor_modules/send/HISTORY.md +538 -0
  593. package/assets/api/vendor_modules/send/LICENSE +23 -0
  594. package/assets/api/vendor_modules/send/README.md +327 -0
  595. package/assets/api/vendor_modules/send/SECURITY.md +24 -0
  596. package/assets/api/vendor_modules/send/index.js +1142 -0
  597. package/assets/api/vendor_modules/send/node_modules/ms/index.js +162 -0
  598. package/assets/api/vendor_modules/send/node_modules/ms/license.md +21 -0
  599. package/assets/api/vendor_modules/send/node_modules/ms/package.json +38 -0
  600. package/assets/api/vendor_modules/send/node_modules/ms/readme.md +59 -0
  601. package/assets/api/vendor_modules/send/package.json +62 -0
  602. package/assets/api/vendor_modules/serve-static/HISTORY.md +493 -0
  603. package/assets/api/vendor_modules/serve-static/LICENSE +25 -0
  604. package/assets/api/vendor_modules/serve-static/README.md +257 -0
  605. package/assets/api/vendor_modules/serve-static/index.js +209 -0
  606. package/assets/api/vendor_modules/serve-static/package.json +42 -0
  607. package/assets/api/vendor_modules/serverless-http/LICENSE.txt +33 -0
  608. package/assets/api/vendor_modules/serverless-http/README.md +117 -0
  609. package/assets/api/vendor_modules/serverless-http/lib/finish.js +42 -0
  610. package/assets/api/vendor_modules/serverless-http/lib/framework/get-framework.js +79 -0
  611. package/assets/api/vendor_modules/serverless-http/lib/provider/aws/clean-up-event.js +98 -0
  612. package/assets/api/vendor_modules/serverless-http/lib/provider/aws/create-request.js +110 -0
  613. package/assets/api/vendor_modules/serverless-http/lib/provider/aws/format-response.js +45 -0
  614. package/assets/api/vendor_modules/serverless-http/lib/provider/aws/index.js +15 -0
  615. package/assets/api/vendor_modules/serverless-http/lib/provider/aws/is-binary.js +42 -0
  616. package/assets/api/vendor_modules/serverless-http/lib/provider/aws/sanitize-headers.js +21 -0
  617. package/assets/api/vendor_modules/serverless-http/lib/provider/azure/clean-up-request.js +41 -0
  618. package/assets/api/vendor_modules/serverless-http/lib/provider/azure/create-request.js +45 -0
  619. package/assets/api/vendor_modules/serverless-http/lib/provider/azure/format-response.js +18 -0
  620. package/assets/api/vendor_modules/serverless-http/lib/provider/azure/index.js +13 -0
  621. package/assets/api/vendor_modules/serverless-http/lib/provider/azure/is-binary.js +42 -0
  622. package/assets/api/vendor_modules/serverless-http/lib/provider/azure/sanitize-headers.js +23 -0
  623. package/assets/api/vendor_modules/serverless-http/lib/provider/azure/set-cookie.json +1 -0
  624. package/assets/api/vendor_modules/serverless-http/lib/provider/get-provider.js +17 -0
  625. package/assets/api/vendor_modules/serverless-http/lib/request.js +38 -0
  626. package/assets/api/vendor_modules/serverless-http/lib/response.js +135 -0
  627. package/assets/api/vendor_modules/serverless-http/package.json +93 -0
  628. package/assets/api/vendor_modules/serverless-http/serverless-http.d.ts +41 -0
  629. package/assets/api/vendor_modules/serverless-http/serverless-http.js +23 -0
  630. package/assets/api/vendor_modules/setprototypeof/LICENSE +13 -0
  631. package/assets/api/vendor_modules/setprototypeof/README.md +31 -0
  632. package/assets/api/vendor_modules/setprototypeof/index.d.ts +2 -0
  633. package/assets/api/vendor_modules/setprototypeof/index.js +17 -0
  634. package/assets/api/vendor_modules/setprototypeof/package.json +38 -0
  635. package/assets/api/vendor_modules/setprototypeof/test/index.js +24 -0
  636. package/assets/api/vendor_modules/side-channel/.editorconfig +9 -0
  637. package/assets/api/vendor_modules/side-channel/.eslintrc +12 -0
  638. package/assets/api/vendor_modules/side-channel/.github/FUNDING.yml +12 -0
  639. package/assets/api/vendor_modules/side-channel/.nycrc +13 -0
  640. package/assets/api/vendor_modules/side-channel/CHANGELOG.md +120 -0
  641. package/assets/api/vendor_modules/side-channel/LICENSE +21 -0
  642. package/assets/api/vendor_modules/side-channel/README.md +61 -0
  643. package/assets/api/vendor_modules/side-channel/index.d.ts +14 -0
  644. package/assets/api/vendor_modules/side-channel/index.js +46 -0
  645. package/assets/api/vendor_modules/side-channel/package.json +85 -0
  646. package/assets/api/vendor_modules/side-channel/test/index.js +120 -0
  647. package/assets/api/vendor_modules/side-channel/tsconfig.json +9 -0
  648. package/assets/api/vendor_modules/side-channel-list/.editorconfig +9 -0
  649. package/assets/api/vendor_modules/side-channel-list/.eslintrc +11 -0
  650. package/assets/api/vendor_modules/side-channel-list/.github/FUNDING.yml +12 -0
  651. package/assets/api/vendor_modules/side-channel-list/.nycrc +13 -0
  652. package/assets/api/vendor_modules/side-channel-list/CHANGELOG.md +36 -0
  653. package/assets/api/vendor_modules/side-channel-list/LICENSE +21 -0
  654. package/assets/api/vendor_modules/side-channel-list/README.md +62 -0
  655. package/assets/api/vendor_modules/side-channel-list/index.d.ts +13 -0
  656. package/assets/api/vendor_modules/side-channel-list/index.js +111 -0
  657. package/assets/api/vendor_modules/side-channel-list/list.d.ts +14 -0
  658. package/assets/api/vendor_modules/side-channel-list/package.json +77 -0
  659. package/assets/api/vendor_modules/side-channel-list/test/index.js +154 -0
  660. package/assets/api/vendor_modules/side-channel-list/tsconfig.json +9 -0
  661. package/assets/api/vendor_modules/side-channel-map/.editorconfig +9 -0
  662. package/assets/api/vendor_modules/side-channel-map/.eslintrc +11 -0
  663. package/assets/api/vendor_modules/side-channel-map/.github/FUNDING.yml +12 -0
  664. package/assets/api/vendor_modules/side-channel-map/.nycrc +13 -0
  665. package/assets/api/vendor_modules/side-channel-map/CHANGELOG.md +22 -0
  666. package/assets/api/vendor_modules/side-channel-map/LICENSE +21 -0
  667. package/assets/api/vendor_modules/side-channel-map/README.md +62 -0
  668. package/assets/api/vendor_modules/side-channel-map/index.d.ts +15 -0
  669. package/assets/api/vendor_modules/side-channel-map/index.js +68 -0
  670. package/assets/api/vendor_modules/side-channel-map/package.json +80 -0
  671. package/assets/api/vendor_modules/side-channel-map/test/index.js +114 -0
  672. package/assets/api/vendor_modules/side-channel-map/tsconfig.json +9 -0
  673. package/assets/api/vendor_modules/side-channel-weakmap/.editorconfig +9 -0
  674. package/assets/api/vendor_modules/side-channel-weakmap/.eslintrc +12 -0
  675. package/assets/api/vendor_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
  676. package/assets/api/vendor_modules/side-channel-weakmap/.nycrc +13 -0
  677. package/assets/api/vendor_modules/side-channel-weakmap/CHANGELOG.md +28 -0
  678. package/assets/api/vendor_modules/side-channel-weakmap/LICENSE +21 -0
  679. package/assets/api/vendor_modules/side-channel-weakmap/README.md +62 -0
  680. package/assets/api/vendor_modules/side-channel-weakmap/index.d.ts +15 -0
  681. package/assets/api/vendor_modules/side-channel-weakmap/index.js +84 -0
  682. package/assets/api/vendor_modules/side-channel-weakmap/package.json +87 -0
  683. package/assets/api/vendor_modules/side-channel-weakmap/test/index.js +114 -0
  684. package/assets/api/vendor_modules/side-channel-weakmap/tsconfig.json +9 -0
  685. package/assets/api/vendor_modules/statuses/HISTORY.md +87 -0
  686. package/assets/api/vendor_modules/statuses/LICENSE +23 -0
  687. package/assets/api/vendor_modules/statuses/README.md +139 -0
  688. package/assets/api/vendor_modules/statuses/codes.json +65 -0
  689. package/assets/api/vendor_modules/statuses/index.js +146 -0
  690. package/assets/api/vendor_modules/statuses/package.json +49 -0
  691. package/assets/api/vendor_modules/toidentifier/HISTORY.md +9 -0
  692. package/assets/api/vendor_modules/toidentifier/LICENSE +21 -0
  693. package/assets/api/vendor_modules/toidentifier/README.md +61 -0
  694. package/assets/api/vendor_modules/toidentifier/index.js +32 -0
  695. package/assets/api/vendor_modules/toidentifier/package.json +38 -0
  696. package/assets/api/vendor_modules/type-is/HISTORY.md +259 -0
  697. package/assets/api/vendor_modules/type-is/LICENSE +23 -0
  698. package/assets/api/vendor_modules/type-is/README.md +170 -0
  699. package/assets/api/vendor_modules/type-is/index.js +266 -0
  700. package/assets/api/vendor_modules/type-is/package.json +45 -0
  701. package/assets/api/vendor_modules/unpipe/HISTORY.md +4 -0
  702. package/assets/api/vendor_modules/unpipe/LICENSE +22 -0
  703. package/assets/api/vendor_modules/unpipe/README.md +43 -0
  704. package/assets/api/vendor_modules/unpipe/index.js +69 -0
  705. package/assets/api/vendor_modules/unpipe/package.json +27 -0
  706. package/assets/api/vendor_modules/utils-merge/LICENSE +20 -0
  707. package/assets/api/vendor_modules/utils-merge/README.md +34 -0
  708. package/assets/api/vendor_modules/utils-merge/index.js +23 -0
  709. package/assets/api/vendor_modules/utils-merge/package.json +40 -0
  710. package/assets/api/vendor_modules/vary/HISTORY.md +39 -0
  711. package/assets/api/vendor_modules/vary/LICENSE +22 -0
  712. package/assets/api/vendor_modules/vary/README.md +101 -0
  713. package/assets/api/vendor_modules/vary/index.js +149 -0
  714. package/assets/api/vendor_modules/vary/package.json +43 -0
  715. package/assets/federation-presignup/index.js +108 -0
  716. package/assets/firstadmin/index.js +361 -0
  717. package/assets/headscale-apikey/index.js +140 -0
  718. package/assets/invoke-relay/index.js +96 -0
  719. package/assets/issuer-canary/index.js +71 -0
  720. package/assets/issuer-publish/index.js +87 -0
  721. package/assets/keyminter/index.js +209 -0
  722. package/assets/plugin-authorizer/index.js +1740 -0
  723. package/assets/plugin-catalog/index.js +881 -0
  724. package/assets/reapproval/index.js +3761 -0
  725. package/assets/sg-manager/index.js +176 -0
  726. package/assets/tailnet-resolver/index.js +55 -0
  727. package/assets/web/chunk-2MOGDYK4.js +1 -0
  728. package/assets/web/chunk-2SO4BVIT.js +1 -0
  729. package/assets/web/chunk-2V6RSAAC.js +1 -0
  730. package/assets/web/chunk-32GNBTAL.js +1 -0
  731. package/assets/web/chunk-33SYY2JB.js +1 -0
  732. package/assets/web/chunk-3VWYT7AX.js +1 -0
  733. package/assets/web/chunk-4FG4DAWU.js +4 -0
  734. package/assets/web/chunk-4N2IUS6T.js +1 -0
  735. package/assets/web/chunk-4SK6XQ6C.js +1 -0
  736. package/assets/web/chunk-65WE5MXA.js +8 -0
  737. package/assets/web/chunk-6D7SSSJF.js +1 -0
  738. package/assets/web/chunk-6KFR7DYY.js +1 -0
  739. package/assets/web/chunk-A4WHI3ZG.js +8 -0
  740. package/assets/web/chunk-BNFKRZTP.js +1 -0
  741. package/assets/web/chunk-CG56PH3M.js +1 -0
  742. package/assets/web/chunk-CGO25AIM.js +1 -0
  743. package/assets/web/chunk-CP4XZPOA.js +1 -0
  744. package/assets/web/chunk-CV7EODPO.js +1 -0
  745. package/assets/web/chunk-D7TR2ORJ.js +1 -0
  746. package/assets/web/chunk-DCOFBAKJ.js +1 -0
  747. package/assets/web/chunk-DOLRLYW7.js +1 -0
  748. package/assets/web/chunk-EEJ3X466.js +1 -0
  749. package/assets/web/chunk-EQ4PF25J.js +1 -0
  750. package/assets/web/chunk-EVP5UVDQ.js +1 -0
  751. package/assets/web/chunk-EW2VMNHE.js +1 -0
  752. package/assets/web/chunk-FIUVIKAN.js +1 -0
  753. package/assets/web/chunk-GHEU25TG.js +1 -0
  754. package/assets/web/chunk-GK2T2SMO.js +1 -0
  755. package/assets/web/chunk-GKI3R2JB.js +1 -0
  756. package/assets/web/chunk-GPKKIOHD.js +2 -0
  757. package/assets/web/chunk-H4AVFUDM.js +1 -0
  758. package/assets/web/chunk-H5H727H6.js +1 -0
  759. package/assets/web/chunk-HGVFH6YM.js +1 -0
  760. package/assets/web/chunk-HHPIANBK.js +1 -0
  761. package/assets/web/chunk-HK56COCB.js +1 -0
  762. package/assets/web/chunk-HZUB7LFV.js +1 -0
  763. package/assets/web/chunk-I7NTNTBA.js +1 -0
  764. package/assets/web/chunk-IKK5DQ3Z.js +1 -0
  765. package/assets/web/chunk-IMH56UBX.js +1 -0
  766. package/assets/web/chunk-J3SSPCFV.js +1 -0
  767. package/assets/web/chunk-J4C7C5KO.js +1 -0
  768. package/assets/web/chunk-J57JB4MU.js +1 -0
  769. package/assets/web/chunk-JMBXRK3I.js +4 -0
  770. package/assets/web/chunk-KCCEQIXX.js +1 -0
  771. package/assets/web/chunk-KEBESIXR.js +1 -0
  772. package/assets/web/chunk-KPNHT4MK.js +1 -0
  773. package/assets/web/chunk-LMLXTVZG.js +1 -0
  774. package/assets/web/chunk-M6OAYNRE.js +1 -0
  775. package/assets/web/chunk-M7MGX5I4.js +1 -0
  776. package/assets/web/chunk-MU2VNTNY.js +1 -0
  777. package/assets/web/chunk-NABAVDRL.js +1 -0
  778. package/assets/web/chunk-NO5D6WDF.js +1 -0
  779. package/assets/web/chunk-O4QSFUXB.js +1 -0
  780. package/assets/web/chunk-OATVFQXO.js +1 -0
  781. package/assets/web/chunk-P5WRM37W.js +5 -0
  782. package/assets/web/chunk-PCP6D2SM.js +1 -0
  783. package/assets/web/chunk-PMMBJK7Q.js +1 -0
  784. package/assets/web/chunk-PSMER3HX.js +1 -0
  785. package/assets/web/chunk-QPBWZLCT.js +1 -0
  786. package/assets/web/chunk-QVABVDO5.js +1 -0
  787. package/assets/web/chunk-RI77LE5V.js +1 -0
  788. package/assets/web/chunk-RKGUEXZ2.js +1 -0
  789. package/assets/web/chunk-RMFH2YTZ.js +1 -0
  790. package/assets/web/chunk-RROPCBUH.js +1 -0
  791. package/assets/web/chunk-SJMLX5AT.js +1 -0
  792. package/assets/web/chunk-TKVALOE4.js +2 -0
  793. package/assets/web/chunk-TM43WUKM.js +1 -0
  794. package/assets/web/chunk-VKWV3ANT.js +1 -0
  795. package/assets/web/chunk-VTMYG6YW.js +1 -0
  796. package/assets/web/chunk-VWW4SA5R.js +1 -0
  797. package/assets/web/chunk-WEDAFMID.js +1 -0
  798. package/assets/web/chunk-WFIHWVQO.js +1 -0
  799. package/assets/web/chunk-XJM3HDJQ.js +1 -0
  800. package/assets/web/chunk-YVJV2RUY.js +1 -0
  801. package/assets/web/chunk-Z3KONI7L.js +1 -0
  802. package/assets/web/chunk-ZDCURXPS.js +1 -0
  803. package/assets/web/favicon.ico +0 -0
  804. package/assets/web/index.html +63 -0
  805. package/assets/web/main-S6E3BC5O.js +2 -0
  806. package/assets/web/polyfills-7RSNIJ6J.js +2 -0
  807. package/assets/web/styles-R6ZUWC6K.css +1 -0
  808. package/dist/index.d.ts +27 -0
  809. package/dist/index.js +66 -0
  810. package/dist/lambdacode/api/services/brandingShapes.d.ts +5 -0
  811. package/dist/lambdacode/api/services/brandingShapes.js +15 -0
  812. package/dist/lambdacode/issuer/objects.d.ts +8 -0
  813. package/dist/lambdacode/issuer/objects.js +11 -0
  814. package/dist/lambdacode/network/naming.d.ts +52 -0
  815. package/dist/lambdacode/network/naming.js +67 -0
  816. package/dist/lib/access-portal-hub.d.ts +53 -0
  817. package/dist/lib/access-portal-hub.js +87 -0
  818. package/dist/lib/access-portal.d.ts +32 -0
  819. package/dist/lib/access-portal.js +174 -0
  820. package/dist/lib/audit-log.d.ts +18 -0
  821. package/dist/lib/audit-log.js +25 -0
  822. package/dist/lib/connector-stack.d.ts +28 -0
  823. package/dist/lib/connector-stack.js +81 -0
  824. package/dist/lib/constructs/app-function.d.ts +14 -0
  825. package/dist/lib/constructs/app-function.js +84 -0
  826. package/dist/lib/constructs/app-table.d.ts +12 -0
  827. package/dist/lib/constructs/app-table.js +58 -0
  828. package/dist/lib/constructs/mirrored-image.d.ts +12 -0
  829. package/dist/lib/constructs/mirrored-image.js +80 -0
  830. package/dist/lib/constructs/monitoring.d.ts +21 -0
  831. package/dist/lib/constructs/monitoring.js +133 -0
  832. package/dist/lib/constructs/oidc-issuer.d.ts +44 -0
  833. package/dist/lib/constructs/oidc-issuer.js +234 -0
  834. package/dist/lib/constructs/scratch-tmpfs.d.ts +5 -0
  835. package/dist/lib/constructs/scratch-tmpfs.js +48 -0
  836. package/dist/lib/constructs/sg-manager.d.ts +27 -0
  837. package/dist/lib/constructs/sg-manager.js +88 -0
  838. package/dist/lib/constructs/tailnet-connector.d.ts +29 -0
  839. package/dist/lib/constructs/tailnet-connector.js +177 -0
  840. package/dist/lib/constructs/tailnet-resolver.d.ts +30 -0
  841. package/dist/lib/constructs/tailnet-resolver.js +71 -0
  842. package/dist/lib/constructs/target-account-trust.d.ts +32 -0
  843. package/dist/lib/constructs/target-account-trust.js +81 -0
  844. package/dist/lib/constructs/vending-api.d.ts +103 -0
  845. package/dist/lib/constructs/vending-api.js +203 -0
  846. package/dist/lib/constructs/web-acl.d.ts +61 -0
  847. package/dist/lib/constructs/web-acl.js +213 -0
  848. package/dist/lib/constructs/web-identity.d.ts +49 -0
  849. package/dist/lib/constructs/web-identity.js +116 -0
  850. package/dist/lib/creds-stack.d.ts +151 -0
  851. package/dist/lib/creds-stack.js +592 -0
  852. package/dist/lib/data-stack.d.ts +53 -0
  853. package/dist/lib/data-stack.js +282 -0
  854. package/dist/lib/dimensions-validation.d.ts +20 -0
  855. package/dist/lib/dimensions-validation.js +51 -0
  856. package/dist/lib/federation.d.ts +113 -0
  857. package/dist/lib/federation.js +254 -0
  858. package/dist/lib/managed-login-branding.json +450 -0
  859. package/dist/lib/network-stack.d.ts +58 -0
  860. package/dist/lib/network-stack.js +776 -0
  861. package/dist/lib/network-validation.d.ts +54 -0
  862. package/dist/lib/network-validation.js +220 -0
  863. package/dist/lib/pkg-paths.d.ts +3 -0
  864. package/dist/lib/pkg-paths.js +51 -0
  865. package/dist/lib/plugins/plugin-api.d.ts +40 -0
  866. package/dist/lib/plugins/plugin-api.js +125 -0
  867. package/dist/lib/plugins/plugin-catalog-activation.d.ts +31 -0
  868. package/dist/lib/plugins/plugin-catalog-activation.js +109 -0
  869. package/dist/lib/plugins/registration.d.ts +41 -0
  870. package/dist/lib/plugins/registration.js +121 -0
  871. package/dist/lib/plugins/runtime.d.ts +10 -0
  872. package/dist/lib/plugins/runtime.js +17 -0
  873. package/dist/lib/project-config.d.ts +164 -0
  874. package/dist/lib/project-config.js +2 -0
  875. package/dist/lib/target-account-stack.d.ts +15 -0
  876. package/dist/lib/target-account-stack.js +59 -0
  877. package/dist/lib/target-account-template.d.ts +13 -0
  878. package/dist/lib/target-account-template.js +64 -0
  879. package/dist/lib/web-cert-stack.d.ts +30 -0
  880. package/dist/lib/web-cert-stack.js +90 -0
  881. package/dist/lib/web-stack.d.ts +103 -0
  882. package/dist/lib/web-stack.js +540 -0
  883. package/node_modules/@fntio/infra-client-plugin-sdk/README.md +303 -0
  884. package/node_modules/@fntio/infra-client-plugin-sdk/dist/backend/context.d.ts +31 -0
  885. package/node_modules/@fntio/infra-client-plugin-sdk/dist/backend/context.js +58 -0
  886. package/node_modules/@fntio/infra-client-plugin-sdk/dist/backend/index.d.ts +9 -0
  887. package/node_modules/@fntio/infra-client-plugin-sdk/dist/backend/index.js +26 -0
  888. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/client.d.ts +59 -0
  889. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/client.js +290 -0
  890. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/errors.d.ts +14 -0
  891. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/errors.js +32 -0
  892. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/http.d.ts +72 -0
  893. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/http.js +170 -0
  894. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/index.d.ts +11 -0
  895. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/index.js +28 -0
  896. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/theme-apply.d.ts +22 -0
  897. package/node_modules/@fntio/infra-client-plugin-sdk/dist/browser/theme-apply.js +22 -0
  898. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/access.d.ts +14 -0
  899. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/access.js +41 -0
  900. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/authorizer.d.ts +17 -0
  901. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/authorizer.js +44 -0
  902. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/canonical.d.ts +2 -0
  903. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/canonical.js +21 -0
  904. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/catalog.d.ts +39 -0
  905. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/catalog.js +18 -0
  906. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/discovery.d.ts +78 -0
  907. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/discovery.js +48 -0
  908. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/fields.d.ts +7 -0
  909. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/fields.js +2 -0
  910. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/manifest.d.ts +59 -0
  911. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/manifest.js +19 -0
  912. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/messages.d.ts +111 -0
  913. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/messages.js +109 -0
  914. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/paths.d.ts +20 -0
  915. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/paths.js +49 -0
  916. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/theme.d.ts +21 -0
  917. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/theme.js +60 -0
  918. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/transport.d.ts +14 -0
  919. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/transport.js +10 -0
  920. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/validate.d.ts +27 -0
  921. package/node_modules/@fntio/infra-client-plugin-sdk/dist/contracts/validate.js +321 -0
  922. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/devHost.d.ts +61 -0
  923. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/devHost.js +99 -0
  924. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/fakeDocument.d.ts +12 -0
  925. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/fakeDocument.js +22 -0
  926. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/fakeWindows.d.ts +22 -0
  927. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/fakeWindows.js +46 -0
  928. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/index.d.ts +4 -0
  929. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/index.js +20 -0
  930. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/samples.d.ts +37 -0
  931. package/node_modules/@fntio/infra-client-plugin-sdk/dist/fixtures/samples.js +228 -0
  932. package/node_modules/@fntio/infra-client-plugin-sdk/dist/host/host.d.ts +47 -0
  933. package/node_modules/@fntio/infra-client-plugin-sdk/dist/host/host.js +121 -0
  934. package/node_modules/@fntio/infra-client-plugin-sdk/dist/host/index.d.ts +5 -0
  935. package/node_modules/@fntio/infra-client-plugin-sdk/dist/host/index.js +22 -0
  936. package/node_modules/@fntio/infra-client-plugin-sdk/dist/index.d.ts +10 -0
  937. package/node_modules/@fntio/infra-client-plugin-sdk/dist/index.js +28 -0
  938. package/node_modules/@fntio/infra-client-plugin-sdk/package.json +99 -0
  939. package/openapi.yaml +4284 -0
  940. package/package.json +124 -4
@@ -0,0 +1,776 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.NetworkStack = void 0;
37
+ const cdk = __importStar(require("aws-cdk-lib"));
38
+ const ec2 = __importStar(require("aws-cdk-lib/aws-ec2"));
39
+ const ecs = __importStar(require("aws-cdk-lib/aws-ecs"));
40
+ const efs = __importStar(require("aws-cdk-lib/aws-efs"));
41
+ const elbv2 = __importStar(require("aws-cdk-lib/aws-elasticloadbalancingv2"));
42
+ const s3 = __importStar(require("aws-cdk-lib/aws-s3"));
43
+ const acm = __importStar(require("aws-cdk-lib/aws-certificatemanager"));
44
+ const route53 = __importStar(require("aws-cdk-lib/aws-route53"));
45
+ const targets = __importStar(require("aws-cdk-lib/aws-route53-targets"));
46
+ const logs = __importStar(require("aws-cdk-lib/aws-logs"));
47
+ const iam = __importStar(require("aws-cdk-lib/aws-iam"));
48
+ const events = __importStar(require("aws-cdk-lib/aws-events"));
49
+ const eventsTargets = __importStar(require("aws-cdk-lib/aws-events-targets"));
50
+ const cloudwatch = __importStar(require("aws-cdk-lib/aws-cloudwatch"));
51
+ const cwactions = __importStar(require("aws-cdk-lib/aws-cloudwatch-actions"));
52
+ const cr = __importStar(require("aws-cdk-lib/custom-resources"));
53
+ const app_function_1 = require("./constructs/app-function");
54
+ const scratch_tmpfs_1 = require("./constructs/scratch-tmpfs");
55
+ const mirrored_image_1 = require("./constructs/mirrored-image");
56
+ const naming_1 = require("../lambdacode/network/naming");
57
+ const audit_log_1 = require("./audit-log");
58
+ /** The /api/* block MUST outrank every site's forward rule or Headscale's
59
+ * admin API goes public. Site priorities: stable per-id hashes in 100–989. */
60
+ const BLOCK_ADMIN_PRIORITY = 10;
61
+ const MAX_SITES = 90; // stays inside the ALB's 100-rules-per-listener quota
62
+ /** Self-hosted Headscale, ONE PER SITE, sharing one cluster/EFS/ALB. Control
63
+ * planes never carry user traffic; admin ops via ECS Exec — no admin port. */
64
+ class NetworkStack extends cdk.Stack {
65
+ sites;
66
+ /** Mints DEVICE keys for any site (siteId argument — its only caller, the
67
+ * vending API role, binds userName to the verified JWT). */
68
+ deviceKeyMinter;
69
+ /** Per-site CONNECTOR minters; each ignores input and is pinned to its
70
+ * site's control plane by env. Safe to grant cross-account. */
71
+ connectorKeyMinters = {};
72
+ constructor(scope, id, props) {
73
+ super(scope, id, props);
74
+ const prefix = props.resourcePrefix;
75
+ this.sites = props.sites;
76
+ if (props.sites.length === 0)
77
+ throw new Error("NetworkStack needs ≥1 site.");
78
+ if (props.sites.length > MAX_SITES) {
79
+ throw new Error(`NetworkStack supports at most ${MAX_SITES} sites.`);
80
+ }
81
+ // Public-subnets-only: outbound internet without NAT gateways to pay for.
82
+ const vpc = new ec2.Vpc(this, "Vpc", {
83
+ maxAzs: 2,
84
+ natGateways: 0,
85
+ // Tasks request their public IP explicitly (assignPublicIp); the subnet
86
+ // itself hands none out (Security Hub EC2.15).
87
+ subnetConfiguration: [
88
+ { name: "public", subnetType: ec2.SubnetType.PUBLIC, mapPublicIpOnLaunch: false },
89
+ ],
90
+ // Explicit, so it never depends on the consumer's cdk.json flags (EC2.2).
91
+ restrictDefaultSecurityGroup: true,
92
+ });
93
+ // REJECT-only keeps the volume small; Security Hub EC2.6 asks for no more.
94
+ vpc.addFlowLog("RejectFlowLog", {
95
+ trafficType: ec2.FlowLogTrafficType.REJECT,
96
+ destination: ec2.FlowLogDestination.toCloudWatchLogs(new logs.LogGroup(this, "VpcFlowLogs", {
97
+ retention: logs.RetentionDays.THREE_MONTHS,
98
+ })),
99
+ });
100
+ // Headscale state is SQLite: one shared EFS, one ACCESS POINT PER SITE.
101
+ // Each site's directory is precious — losing it re-enrolls that site.
102
+ const fileSystem = new efs.FileSystem(this, "StateFs", {
103
+ vpc,
104
+ encrypted: true,
105
+ // Security Hub EFS.2/EFS.7 (the state is megabytes). Not for sandboxes:
106
+ // recovery points would outlive the destroyed stack for 35 days.
107
+ enableAutomaticBackups: props.prod,
108
+ removalPolicy: props.prod
109
+ ? cdk.RemovalPolicy.RETAIN
110
+ : cdk.RemovalPolicy.DESTROY,
111
+ });
112
+ const cluster = new ecs.Cluster(this, "Cluster", {
113
+ vpc,
114
+ // Explicit either way, so turning the knob off actually disables it.
115
+ containerInsightsV2: (props.containerInsights ?? props.prod)
116
+ ? ecs.ContainerInsights.ENABLED
117
+ : ecs.ContainerInsights.DISABLED,
118
+ });
119
+ // Private DNS so the key minters/reconciler reach each Headscale WITHOUT
120
+ // the public ALB (where /api/* is 403-blocked below).
121
+ const namespace = cluster.addDefaultCloudMapNamespace({
122
+ name: "tailnet.internal",
123
+ });
124
+ const zone = route53.HostedZone.fromHostedZoneAttributes(this, "Zone", {
125
+ hostedZoneId: props.hostedZoneId,
126
+ zoneName: props.zoneName,
127
+ });
128
+ // One wildcard covers every site — adding one changes no cert, no DNS.
129
+ const certificate = new acm.Certificate(this, "WildcardCert", {
130
+ domainName: `*.${props.subdomain}.${props.zoneName}`,
131
+ validation: acm.CertificateValidation.fromDns(zone),
132
+ });
133
+ // The access-log bucket policy names the Region's ELB delivery account, and
134
+ // a foreign-region connector VPC is placed by comparing Regions.
135
+ if (cdk.Token.isUnresolved(this.region)) {
136
+ throw new Error("NetworkStack needs an explicit env.region (ALB access logs, connector VPC placement).");
137
+ }
138
+ const alb = new elbv2.ApplicationLoadBalancer(this, "Alb", {
139
+ vpc,
140
+ internetFacing: true,
141
+ // Headscale clients long-poll; the default 60s idle would churn them.
142
+ idleTimeout: cdk.Duration.seconds(3600),
143
+ dropInvalidHeaderFields: true, // Security Hub ELB.4
144
+ deletionProtection: props.prod, // ELB.6 — disable before a prod teardown
145
+ });
146
+ // ELB.5. SSE-S3 only: the ELB log-delivery principal cannot use a KMS key.
147
+ const albLogs = new s3.Bucket(this, "AlbAccessLogs", {
148
+ blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL,
149
+ enforceSSL: true,
150
+ encryption: s3.BucketEncryption.S3_MANAGED,
151
+ objectOwnership: s3.ObjectOwnership.BUCKET_OWNER_ENFORCED,
152
+ lifecycleRules: [
153
+ { expiration: cdk.Duration.days(90), abortIncompleteMultipartUploadAfter: cdk.Duration.days(7) },
154
+ ],
155
+ removalPolicy: props.prod ? cdk.RemovalPolicy.RETAIN : cdk.RemovalPolicy.DESTROY,
156
+ autoDeleteObjects: !props.prod,
157
+ // ACL-based delivery into the hub's log bucket: no policy that would
158
+ // reference this bucket from DataStack (a cross-stack cycle).
159
+ serverAccessLogsBucket: props.accessLogsBucket,
160
+ serverAccessLogsPrefix: props.accessLogsBucket && "s3/alb-logs/",
161
+ });
162
+ alb.logAccessLogs(albLogs, "alb");
163
+ // No port-80 listener at all: Security Hub ELB.18 counts even a redirect
164
+ // listener as plaintext, and every client is handed an https URL.
165
+ const listener = alb.addListener("Https", {
166
+ port: 443,
167
+ certificates: [certificate],
168
+ sslPolicy: elbv2.SslPolicy.TLS13_RES, // ELB.17's accepted list; TLS 1.2+ only
169
+ open: true,
170
+ // The wildcard record sends EVERY name here — an explicit 404 turns a
171
+ // mistyped --login-server into a message instead of a hang.
172
+ defaultAction: elbv2.ListenerAction.fixedResponse(404, {
173
+ contentType: "text/plain",
174
+ messageBody: "No site exists at this hostname.",
175
+ }),
176
+ });
177
+ // The admin API must not exist on the internet, for ANY site — admin
178
+ // traffic goes Lambda → Cloud Map → task. Must outrank every site rule.
179
+ listener.addAction("BlockAdminApi", {
180
+ priority: BLOCK_ADMIN_PRIORITY,
181
+ conditions: [elbv2.ListenerCondition.pathPatterns(["/api/*"])],
182
+ action: elbv2.ListenerAction.fixedResponse(403, {
183
+ contentType: "text/plain",
184
+ messageBody: "Forbidden",
185
+ }),
186
+ });
187
+ new route53.ARecord(this, "WildcardAlias", {
188
+ zone,
189
+ recordName: `*.${props.subdomain}`,
190
+ target: route53.RecordTarget.fromAlias(new targets.LoadBalancerTarget(alb)),
191
+ });
192
+ /** siteId → VPC-internal admin API URL (Cloud Map, never the ALB). */
193
+ const apiHostOf = (siteId) => `headscale-${siteId}.${namespace.namespaceName}`;
194
+ const apiUrlOf = (siteId) => `https://${apiHostOf(siteId)}:8080`;
195
+ /** siteId → the SSM parameter the site's task publishes its current TLS certificate to;
196
+ * the Lambdas verify the admin API against it (the pair is self-signed, re-minted per task start). */
197
+ const tlsParamOf = (siteId) => `/${prefix}/headscale-tls-${siteId}`;
198
+ const tlsParamArnOf = (siteId) => this.formatArn({ service: "ssm", resource: "parameter", resourceName: `${prefix}/headscale-tls-${siteId}` });
199
+ const grantTlsRead = (fn, siteIds) => fn.addToRolePolicy(new iam.PolicyStatement({ actions: ["ssm:GetParameter"], resources: siteIds.map(tlsParamArnOf) }));
200
+ /** siteId → the site's Headscale admin API key (Secrets Manager), minted/
201
+ * adopted by this stack's Custom::HeadscaleApiKey. */
202
+ const apiKeyOf = (siteId) => cdk.SecretValue.secretsManager(`${prefix}/headscale-apikey-${siteId}`).unsafeUnwrap();
203
+ const keyRotation = String(this.node.tryGetContext("headscaleKeyRotation") ?? "0");
204
+ const services = {};
205
+ const bootstrapInputs = {};
206
+ for (const site of props.sites) {
207
+ if (site.priority <= BLOCK_ADMIN_PRIORITY) {
208
+ throw new Error(`Site "${site.id}" priority ${site.priority} would outrank the ` +
209
+ `admin-API block rule (${BLOCK_ADMIN_PRIORITY}).`);
210
+ }
211
+ }
212
+ // Pinned: we ship control-plane updates deliberately, never :latest. One mirrored copy serves every site.
213
+ // The -debug variant adds busybox (/busybox/sh): the server container runs
214
+ // its own bootstrap, so no sidecar needs to reach its Unix socket.
215
+ const HEADSCALE = "ghcr.io/juanfont/headscale:v0.26.1-debug";
216
+ // Every container is non-root (distroless `nonroot`) on a read-only root.
217
+ // No shared task volume (a Fargate task volume is root-owned whatever the
218
+ // image says): config and TLS pair sit on the EFS mount, whose
219
+ // access point acts as uid 0 for any container user; the socket on tmpfs.
220
+ // The CLI finds the config through the cwd, so ECS Exec needs no flag.
221
+ const NONROOT = "65532";
222
+ const STATE = "/var/lib/headscale";
223
+ const SCRATCH = "/tmp";
224
+ // Debian slim ships the openssl CLI (via ca-certificates); busybox has none.
225
+ const INIT_IMAGE = "public.ecr.aws/docker/library/python:3.13-slim";
226
+ const headscaleMirror = props.mirrorImages ? (0, mirrored_image_1.mirroredImage)(this, "HeadscaleImage", HEADSCALE) : undefined;
227
+ const headscaleImage = (taskDef) => {
228
+ if (!headscaleMirror)
229
+ return ecs.ContainerImage.fromRegistry(HEADSCALE);
230
+ taskDef.node.addDependency(headscaleMirror.copy);
231
+ return headscaleMirror.image;
232
+ };
233
+ props.sites.forEach((site) => {
234
+ const accessPoint = fileSystem.addAccessPoint(`StateAp-${site.id}`, {
235
+ path: `/headscale-${site.id}`,
236
+ createAcl: { ownerUid: "0", ownerGid: "0", permissions: "755" },
237
+ posixUser: { uid: "0", gid: "0" },
238
+ });
239
+ const taskDef = new ecs.FargateTaskDefinition(this, `TaskDef-${site.id}`, {
240
+ cpu: 256,
241
+ memoryLimitMiB: 512,
242
+ });
243
+ fileSystem.grantRootAccess(taskDef.taskRole);
244
+ taskDef.taskRole.addToPrincipalPolicy(new iam.PolicyStatement({ actions: ["ssm:PutParameter"], resources: [tlsParamArnOf(site.id)] }));
245
+ taskDef.addVolume({
246
+ name: "state",
247
+ efsVolumeConfiguration: {
248
+ fileSystemId: fileSystem.fileSystemId,
249
+ transitEncryption: "ENABLED",
250
+ authorizationConfig: {
251
+ accessPointId: accessPoint.accessPointId,
252
+ iam: "ENABLED",
253
+ },
254
+ },
255
+ });
256
+ // Rendered by an init container at task start — keeps us on the stock
257
+ // image (Headscale has no complete env-var interface).
258
+ const configYaml = [
259
+ `server_url: ${site.controlUrl}`,
260
+ `listen_addr: 0.0.0.0:8080`,
261
+ `metrics_listen_addr: 127.0.0.1:9090`,
262
+ `grpc_listen_addr: 127.0.0.1:50443`,
263
+ `noise:`,
264
+ ` private_key_path: /var/lib/headscale/noise_private.key`,
265
+ `prefixes:`,
266
+ ` v4: 100.64.0.0/10`,
267
+ ` v6: fd7a:115c:a1e0::/48`,
268
+ // Embedded DERP stays DISABLED: it needs UDP/3478 (STUN), which an
269
+ // ALB cannot serve — enabling it would force an NLB redesign.
270
+ `derp:`,
271
+ ` server:`,
272
+ ` enabled: false`,
273
+ ` urls:`,
274
+ ` - https://controlplane.tailscale.com/derpmap/default`,
275
+ ` auto_update_enabled: true`,
276
+ ` update_frequency: 24h`,
277
+ `disable_check_updates: true`,
278
+ `ephemeral_node_inactivity_timeout: 30m`,
279
+ `database:`,
280
+ ` type: sqlite`,
281
+ ` sqlite:`,
282
+ ` path: /var/lib/headscale/db.sqlite`,
283
+ `log:`,
284
+ ` level: info`,
285
+ // ACLs live in Headscale's DB and are PUT by the reconciler — never a
286
+ // hand-edited policy file. Deny-by-default once a policy is set.
287
+ `policy:`,
288
+ ` mode: database`,
289
+ `dns:`,
290
+ ` magic_dns: true`,
291
+ // Distinct per site — also what lets the desktop shell tell its saved
292
+ // tailscale profiles apart when switching sites.
293
+ ` base_domain: ${site.id}.tail.internal`,
294
+ ` nameservers:`,
295
+ ` global:`,
296
+ ` - 1.1.1.1`,
297
+ // Split DNS: PER SITE — overlapping VPCs collide on resolver IPs too.
298
+ ...(Object.keys(site.splitDns).length
299
+ ? [
300
+ ` split:`,
301
+ ...Object.entries(site.splitDns).flatMap(([domain, servers]) => [
302
+ ` ${domain}:`,
303
+ ...servers.map((ip) => ` - ${ip}`),
304
+ ]),
305
+ ]
306
+ : []),
307
+ `unix_socket: ${SCRATCH}/headscale.sock`,
308
+ // Self-signed per task start: the ALB encrypts the hop but never
309
+ // validates a target's certificate (ELB.21/.22); the Lambdas verify
310
+ // against the copy the task publishes to SSM.
311
+ `tls_cert_path: ${STATE}/tls.crt`,
312
+ `tls_key_path: ${STATE}/tls.key`,
313
+ ].join("\n");
314
+ const initContainer = taskDef.addContainer("write-config", {
315
+ image: ecs.ContainerImage.fromRegistry(INIT_IMAGE),
316
+ essential: false,
317
+ command: [
318
+ "sh",
319
+ "-ec",
320
+ `cat > ${STATE}/config.yaml <<'EOF'\n${configYaml}\nEOF\n` +
321
+ `openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -nodes -days 3650 ` +
322
+ `-subj "/CN=${apiHostOf(site.id)}" -addext "subjectAltName=DNS:${apiHostOf(site.id)},DNS:${site.fqdn}" ` +
323
+ `-keyout ${STATE}/tls.key -out ${STATE}/tls.crt`,
324
+ ],
325
+ user: NONROOT,
326
+ readonlyRootFilesystem: true,
327
+ logging: ecs.LogDrivers.awsLogs({
328
+ streamPrefix: `headscale-${site.id}-init`,
329
+ logRetention: logs.RetentionDays.ONE_MONTH,
330
+ }),
331
+ });
332
+ initContainer.addMountPoints({ containerPath: STATE, sourceVolume: "state", readOnly: false });
333
+ // Serve, then — once the socket answers — the fresh-site CLI steps the
334
+ // Custom::HeadscaleApiKey resource reads from this container's log stream
335
+ // ("already exists" on every later start is fine). The trap hands the
336
+ // task's SIGTERM to the server so SQLite closes cleanly.
337
+ const serveScript = [
338
+ "headscale serve &",
339
+ "pid=$!",
340
+ // Re-wait after forwarding: the interrupted wait returns at once and
341
+ // PID 1 exiting would SIGKILL the server before SQLite closes.
342
+ "trap 'kill -TERM $pid; wait $pid' TERM INT",
343
+ "n=0",
344
+ "until headscale users list >/dev/null 2>&1; do",
345
+ ' n=$((n+1)); if [ $n -ge 150 ]; then echo "headscale did not come up"; kill -TERM $pid; wait $pid; exit 1; fi',
346
+ " sleep 2",
347
+ "done",
348
+ "headscale users create infra || true",
349
+ // Marker line the Custom::HeadscaleApiKey handler matches on.
350
+ 'echo "APIKEY=$(headscale apikeys create --expiration 87600h -o json)"',
351
+ "wait $pid",
352
+ ].join("\n");
353
+ const headscale = taskDef.addContainer("headscale", {
354
+ image: headscaleImage(taskDef),
355
+ entryPoint: ["/busybox/sh", "-c", serveScript],
356
+ workingDirectory: STATE,
357
+ user: NONROOT,
358
+ readonlyRootFilesystem: true,
359
+ linuxParameters: (0, scratch_tmpfs_1.scratchTmpfs)(this, `Tmpfs-${site.id}-headscale`, 64),
360
+ // A label (not an env var — cdk-nag ECS2) so the rotation stamp
361
+ // still forces a new task revision, hence a fresh key in the log.
362
+ dockerLabels: { rotation: keyRotation },
363
+ portMappings: [{ containerPort: 8080 }],
364
+ // The CLI answers only once the server serves (no curl in the image);
365
+ // generous so a slow start never trips a restart loop.
366
+ healthCheck: {
367
+ command: ["CMD", "headscale", "users", "list"],
368
+ interval: cdk.Duration.seconds(60),
369
+ timeout: cdk.Duration.seconds(15),
370
+ retries: 5,
371
+ startPeriod: cdk.Duration.seconds(120),
372
+ },
373
+ logging: ecs.LogDrivers.awsLogs({
374
+ streamPrefix: `headscale-${site.id}`,
375
+ logRetention: logs.RetentionDays.ONE_MONTH,
376
+ }),
377
+ });
378
+ headscale.addMountPoints({ containerPath: STATE, sourceVolume: "state", readOnly: false });
379
+ // Publishes the fresh certificate before the server takes traffic, so a
380
+ // Lambda's next call verifies against the pair this task actually serves.
381
+ const publishCert = taskDef.addContainer("publish-cert", {
382
+ image: ecs.ContainerImage.fromRegistry("public.ecr.aws/aws-cli/aws-cli:2.15.17"),
383
+ essential: false,
384
+ // Region as an argument, not an env var (cdk-nag ECS2); the uid has no
385
+ // passwd entry here, which the CLI tolerates (no ~ to read or write).
386
+ command: [
387
+ "--region", this.region,
388
+ "ssm", "put-parameter",
389
+ "--name", tlsParamOf(site.id),
390
+ "--type", "String",
391
+ "--overwrite",
392
+ "--value", `file://${STATE}/tls.crt`,
393
+ ],
394
+ user: NONROOT,
395
+ readonlyRootFilesystem: true,
396
+ linuxParameters: (0, scratch_tmpfs_1.scratchTmpfs)(this, `Tmpfs-${site.id}-publish`, 16),
397
+ logging: ecs.LogDrivers.awsLogs({
398
+ streamPrefix: `headscale-${site.id}-init`,
399
+ logRetention: logs.RetentionDays.ONE_MONTH,
400
+ }),
401
+ });
402
+ publishCert.addMountPoints({ containerPath: STATE, sourceVolume: "state", readOnly: true });
403
+ publishCert.addContainerDependencies({
404
+ container: initContainer,
405
+ condition: ecs.ContainerDependencyCondition.SUCCESS,
406
+ });
407
+ headscale.addContainerDependencies({
408
+ container: publishCert,
409
+ condition: ecs.ContainerDependencyCondition.SUCCESS,
410
+ });
411
+ const service = new ecs.FargateService(this, `Service-${site.id}`, {
412
+ cluster,
413
+ taskDefinition: taskDef,
414
+ desiredCount: 1,
415
+ // SQLite on EFS = exactly one writer, ever: replace, don't overlap.
416
+ minHealthyPercent: 0,
417
+ maxHealthyPercent: 100,
418
+ assignPublicIp: true, // public subnets, no NAT — needed for image pull
419
+ vpcSubnets: { subnetType: ec2.SubnetType.PUBLIC },
420
+ circuitBreaker: { rollback: true },
421
+ enableExecuteCommand: true, // admin CLI access — no admin port exposed
422
+ cloudMapOptions: { name: `headscale-${site.id}` },
423
+ });
424
+ fileSystem.connections.allowDefaultPortFrom(service);
425
+ services[site.id] = service;
426
+ bootstrapInputs[site.id] = {
427
+ logGroup: headscale.logDriverConfig.options["awslogs-group"],
428
+ streamPrefix: `headscale-${site.id}`,
429
+ };
430
+ listener.addTargets(`Headscale-${site.id}`, {
431
+ priority: site.priority,
432
+ conditions: [elbv2.ListenerCondition.hostHeaders([site.fqdn])],
433
+ port: 8080,
434
+ protocol: elbv2.ApplicationProtocol.HTTPS,
435
+ targets: [service],
436
+ healthCheck: { path: "/health", healthyHttpCodes: "200", protocol: elbv2.Protocol.HTTPS },
437
+ deregistrationDelay: cdk.Duration.seconds(30),
438
+ });
439
+ new cdk.CfnOutput(this, `ControlUrl-${site.id}`, {
440
+ value: site.controlUrl,
441
+ });
442
+ });
443
+ const minterBase = {
444
+ timeout: cdk.Duration.seconds(10),
445
+ vpc,
446
+ vpcSubnets: { subnetType: ec2.SubnetType.PUBLIC },
447
+ allowPublicSubnet: true, // no NAT here; the fns need no internet, only VPC DNS
448
+ };
449
+ // CFN re-resolves the secret only when the consuming RESOURCE changes —
450
+ // rotate with `-c headscaleKeyRotation=$(date +%s)` or env keeps the old key.
451
+ /** siteId → {url, key} map the device minter and reconciler read. */
452
+ const sitesEnv = JSON.stringify(Object.fromEntries(props.sites.map((s) => [s.id, { url: apiUrlOf(s.id), certParam: tlsParamOf(s.id), key: apiKeyOf(s.id) }])));
453
+ // Stores each site's server-minted admin API key (adopting a hand-made
454
+ // secret); everything that resolves the secret into env waits on this.
455
+ const bootstrapFn = new app_function_1.AppFunction(this, "HeadscaleApiKeyFn", {
456
+ description: "Deploy-time helper: stores each VPN site's control-server admin API key in Secrets Manager.",
457
+ asset: "headscale-apikey",
458
+ timeout: cdk.Duration.minutes(14),
459
+ });
460
+ const secretArn = (siteId) => `arn:aws:secretsmanager:${this.region}:${this.account}:secret:${prefix}/headscale-apikey-${siteId}-*`;
461
+ bootstrapFn.addToRolePolicy(new iam.PolicyStatement({
462
+ actions: ["ecs:DescribeTasks", "ecs:DescribeServices", "ecs:ListTasks"],
463
+ resources: ["*"],
464
+ }));
465
+ bootstrapFn.addToRolePolicy(new iam.PolicyStatement({
466
+ actions: ["logs:GetLogEvents"],
467
+ resources: props.sites.map((s) => `arn:aws:logs:${this.region}:${this.account}:log-group:${bootstrapInputs[s.id].logGroup}:*`),
468
+ }));
469
+ bootstrapFn.addToRolePolicy(new iam.PolicyStatement({
470
+ actions: [
471
+ "secretsmanager:GetSecretValue",
472
+ "secretsmanager:CreateSecret",
473
+ "secretsmanager:PutSecretValue",
474
+ ],
475
+ resources: props.sites.map((s) => secretArn(s.id)),
476
+ }));
477
+ const bootstrapProvider = new cr.Provider(this, "HeadscaleApiKeyProvider", {
478
+ onEventHandler: bootstrapFn,
479
+ });
480
+ const bootstrapBySite = {};
481
+ for (const site of props.sites) {
482
+ const { logGroup, streamPrefix } = bootstrapInputs[site.id];
483
+ const service = services[site.id];
484
+ const resource = new cdk.CustomResource(this, `HeadscaleBootstrap-${site.id}`, {
485
+ serviceToken: bootstrapProvider.serviceToken,
486
+ resourceType: "Custom::HeadscaleApiKey",
487
+ properties: {
488
+ SiteId: site.id,
489
+ SecretName: `${prefix}/headscale-apikey-${site.id}`,
490
+ ClusterArn: cluster.clusterArn,
491
+ ServiceName: service.serviceName,
492
+ LogGroupName: logGroup,
493
+ StreamPrefix: streamPrefix,
494
+ Rotation: keyRotation,
495
+ },
496
+ });
497
+ // Resource-level edge on purpose: a construct-level one pulls the
498
+ // service SG's ingress (referencing the minters' SGs) into a cycle.
499
+ resource.node.addDependency(service.node.defaultChild);
500
+ bootstrapBySite[site.id] = resource;
501
+ new cdk.CfnOutput(this, `HeadscaleApiKey-${site.id}`, {
502
+ value: resource.getAttString("Source"),
503
+ });
504
+ }
505
+ const bootstraps = Object.values(bootstrapBySite);
506
+ /** Make only a function's own CloudFormation resource wait for the key. */
507
+ const waitForKey = (fn, ...on) => {
508
+ const cfn = fn.node.defaultChild;
509
+ for (const r of on)
510
+ cfn.addResourceDependency(r.node.defaultChild);
511
+ };
512
+ // ONE device minter for all sites: its only caller (the vending API role)
513
+ // binds userName to the verified JWT, and users enroll wherever granted.
514
+ this.deviceKeyMinter = new app_function_1.AppFunction(this, "DeviceKeyMinter", {
515
+ ...minterBase,
516
+ functionName: (0, naming_1.deviceKeyMinterFnName)(prefix),
517
+ asset: "keyminter",
518
+ description: "Mints a one-time VPN enrollment key for a signed-in user's device.",
519
+ handler: "deviceHandler",
520
+ environment: { HEADSCALE_SITES: sitesEnv, HEADSCALE_KEY_ROTATION: keyRotation },
521
+ });
522
+ waitForKey(this.deviceKeyMinter, ...bootstraps);
523
+ grantTlsRead(this.deviceKeyMinter, props.sites.map((s) => s.id));
524
+ // One connector minter PER SITE, env-pinned, input ignored — which site a
525
+ // connector joins = which minter its account may invoke.
526
+ for (const site of props.sites) {
527
+ const minter = new app_function_1.AppFunction(this, `ConnectorKeyMinter-${site.id}`, {
528
+ ...minterBase,
529
+ functionName: (0, naming_1.connectorKeyMinterFnName)(prefix, site.id),
530
+ asset: "keyminter",
531
+ description: `Mints VPN enrollment keys for connectors joining site ${site.id}.`,
532
+ handler: "connectorHandler",
533
+ environment: {
534
+ HEADSCALE_API_URL: apiUrlOf(site.id),
535
+ HEADSCALE_API_KEY: apiKeyOf(site.id),
536
+ HEADSCALE_TLS_PARAM: tlsParamOf(site.id),
537
+ HEADSCALE_USER_ID: "1", // the `infra` machine-owner user
538
+ HEADSCALE_KEY_ROTATION: keyRotation,
539
+ },
540
+ });
541
+ waitForKey(minter, bootstrapBySite[site.id]);
542
+ grantTlsRead(minter, [site.id]);
543
+ this.connectorKeyMinters[site.id] = minter;
544
+ services[site.id].connections.allowFrom(minter, ec2.Port.tcp(8080));
545
+ services[site.id].connections.allowFrom(this.deviceKeyMinter, ec2.Port.tcp(8080));
546
+ new cdk.CfnOutput(this, `ConnectorKeyMinterArn-${site.id}`, {
547
+ value: minter.functionArn,
548
+ });
549
+ }
550
+ const reconcilerRole = new iam.Role(this, "AclReconcilerRole", {
551
+ roleName: (0, naming_1.aclReconcilerRoleName)(prefix),
552
+ assumedBy: new iam.ServicePrincipal("lambda.amazonaws.com"),
553
+ managedPolicies: [
554
+ iam.ManagedPolicy.fromAwsManagedPolicyName("service-role/AWSLambdaVPCAccessExecutionRole"),
555
+ ],
556
+ });
557
+ // Every account's connector VPCs by name and (foreign) region — the reconciler's fan-out targets, and
558
+ // the (account, region) pairs the out-of-VPC relay may address (why a relay: wiki Private Network,
559
+ // "Connector VPCs in another region").
560
+ const connectorVpcs = {};
561
+ // `<account>#<name or empty>` → the routes config declares for that VPC: all the reconciler will approve for it.
562
+ const connectorRoutes = {};
563
+ for (const s of props.sites) {
564
+ for (const [account, list] of Object.entries(s.connectorVpcs)) {
565
+ for (const vpc of list)
566
+ connectorRoutes[`${account}#${vpc.name ?? ""}`] = vpc.routes;
567
+ connectorVpcs[account] = list.map((vpc) => {
568
+ // JSON.stringify drops the undefineds: an unnamed hub-region VPC travels as `{}`.
569
+ return {
570
+ name: vpc.name,
571
+ region: vpc.region && vpc.region !== this.region ? vpc.region : undefined,
572
+ };
573
+ });
574
+ }
575
+ }
576
+ const relayRegions = [
577
+ ...new Set(Object.values(connectorVpcs)
578
+ .flat()
579
+ .map((c) => c.region)
580
+ .filter((r) => Boolean(r))),
581
+ ].sort();
582
+ const reconciler = new app_function_1.AppFunction(this, "AclReconciler", {
583
+ functionName: (0, naming_1.aclReconcilerFnName)(prefix),
584
+ description: "Keeps each VPN site's access rules, routes and security-group rules in line with the portal's grants.",
585
+ asset: "acl-reconciler",
586
+ handler: "handler",
587
+ role: reconcilerRole,
588
+ // Per-site budget: the pass runs the SG-manager AND tailnet-resolver
589
+ // fan-outs (each per-account invoke aborts at 10s) plus up to ~6s of
590
+ // sequential local DNS fallbacks per unresolvable dnsName resource.
591
+ timeout: cdk.Duration.seconds(Math.min(90 * props.sites.length, 900)),
592
+ // One pass at a time: the API kicks a pass on every dev-share create/stop, and two passes racing on
593
+ // the whole-policy PUT could re-publish a rule the later one just removed.
594
+ reservedConcurrentExecutions: 1,
595
+ vpc,
596
+ vpcSubnets: { subnetType: ec2.SubnetType.PUBLIC },
597
+ allowPublicSubnet: true, // like the key minters: needs VPC DNS, not internet
598
+ environment: {
599
+ RESOURCE_PREFIX: prefix, // by-name SG-manager target derivation
600
+ HEADSCALE_SITES: sitesEnv,
601
+ HEADSCALE_KEY_ROTATION: keyRotation,
602
+ // Only this account's names may be resolved from inside this VPC (Cloud Map, plain DNS):
603
+ // another account's private zone can shadow a label of the hub's.
604
+ HUB_ACCOUNT: this.account,
605
+ // accountNumber → siteId: THE site-membership source of truth.
606
+ SITE_ACCOUNTS: JSON.stringify(Object.fromEntries(props.sites.flatMap((s) => s.accounts.map((a) => [a, s.id])))),
607
+ // accountNumber → its connector VPCs ({ name?, region? }; region only outside this region).
608
+ CONNECTOR_VPCS: JSON.stringify(connectorVpcs),
609
+ CONNECTOR_ROUTES: JSON.stringify(connectorRoutes),
610
+ // siteId → displayName: how the activity log names a site.
611
+ SITE_NAMES: JSON.stringify(Object.fromEntries(props.sites.map((s) => [s.id, s.displayName]))),
612
+ RESOURCES_TABLE_NAME: props.resourcesTable.tableName,
613
+ ACCESS_TABLE_NAME: props.accessTable.tableName,
614
+ GROUPS_TABLE_NAME: props.groupsTable.tableName,
615
+ // Resolvers stay reachable on :53 for everyone ON THAT SITE, or
616
+ // name-based access dies before any granted port is tried.
617
+ SPLIT_DNS_BY_SITE: JSON.stringify(Object.fromEntries(props.sites.map((s) => [
618
+ s.id,
619
+ [...new Set(Object.values(s.splitDns).flat())],
620
+ ]))),
621
+ ...(props.auditLog ? (0, audit_log_1.auditLogEnv)(props.auditLog) : {}),
622
+ },
623
+ });
624
+ if (props.auditLog)
625
+ (0, audit_log_1.grantAuditLogWrite)(reconciler, props.auditLog);
626
+ waitForKey(reconciler, ...bootstraps);
627
+ grantTlsRead(reconciler, props.sites.map((s) => s.id));
628
+ for (const site of props.sites) {
629
+ services[site.id].connections.allowFrom(reconciler, ec2.Port.tcp(8080));
630
+ }
631
+ // ReadWrite: the reconciler writes per-site status sentinels into Resources.
632
+ props.resourcesTable.grantReadWriteData(reconciler);
633
+ props.accessTable.grantReadData(reconciler);
634
+ props.groupsTable.grantReadData(reconciler);
635
+ // Cloud Map re-resolution of resource dnsNames (Fargate IP drift):
636
+ // DiscoverInstances has no resource-level scoping.
637
+ reconciler.addToRolePolicy(new iam.PolicyStatement({
638
+ actions: ["servicediscovery:DiscoverInstances"],
639
+ resources: ["*"],
640
+ }));
641
+ // SG-manager and tailnet-resolver invokes by well-known name in ANY account —
642
+ // reaching one still requires that account's resource policy (pinned to this role).
643
+ reconciler.addToRolePolicy(new iam.PolicyStatement({
644
+ actions: ["lambda:InvokeFunction"],
645
+ resources: [
646
+ `arn:aws:lambda:${this.region}:*:function:${(0, naming_1.sgManagerFnName)(prefix)}`,
647
+ // Named connector VPCs suffix the manager; per-site (and per-name)
648
+ // resolvers — the wildcards cover every one.
649
+ `arn:aws:lambda:${this.region}:*:function:${(0, naming_1.sgManagerFnName)(prefix, "*")}`,
650
+ `arn:aws:lambda:${this.region}:*:function:${(0, naming_1.tailnetResolverFnName)(prefix, "*")}`,
651
+ ],
652
+ }));
653
+ // The relay's invoke-only role. Connector accounts in another region pin their trust to it
654
+ // by name, so it exists even without a relay (Lambda validates the principal at permission time).
655
+ const relayRole = new iam.Role(this, "AclReconcilerRelayRole", {
656
+ roleName: (0, naming_1.aclReconcilerRelayRoleName)(prefix),
657
+ assumedBy: new iam.ServicePrincipal("lambda.amazonaws.com"),
658
+ managedPolicies: [
659
+ iam.ManagedPolicy.fromAwsManagedPolicyName("service-role/AWSLambdaBasicExecutionRole"),
660
+ ],
661
+ });
662
+ if (relayRegions.length) {
663
+ relayRole.addToPolicy(new iam.PolicyStatement({
664
+ actions: ["lambda:InvokeFunction"],
665
+ resources: relayRegions.flatMap((region) => [
666
+ `arn:aws:lambda:${region}:*:function:${(0, naming_1.sgManagerFnName)(prefix)}`,
667
+ `arn:aws:lambda:${region}:*:function:${(0, naming_1.sgManagerFnName)(prefix, "*")}`,
668
+ `arn:aws:lambda:${region}:*:function:${(0, naming_1.tailnetResolverFnName)(prefix, "*")}`,
669
+ ]),
670
+ }));
671
+ const relay = new app_function_1.AppFunction(this, "InvokeRelay", {
672
+ functionName: (0, naming_1.aclReconcilerRelayFnName)(prefix),
673
+ description: "Forwards the VPN reconciler's calls to connector functions in other regions.",
674
+ asset: "invoke-relay",
675
+ handler: "handler",
676
+ role: relayRole,
677
+ // The reconciler's per-target budget (INVOKE_TIMEOUT_MS) plus this function's own start.
678
+ timeout: cdk.Duration.seconds(12),
679
+ environment: {
680
+ RESOURCE_PREFIX: prefix,
681
+ CONNECTOR_VPCS: JSON.stringify(connectorVpcs),
682
+ },
683
+ });
684
+ reconciler.addToRolePolicy(new iam.PolicyStatement({
685
+ actions: ["lambda:InvokeFunction"],
686
+ resources: [relay.functionArn],
687
+ }));
688
+ }
689
+ // The Lambdas have no internet path — DiscoverInstances needs Cloud Map's
690
+ // data endpoint. One subnet = one ENI (~$8/mo) serving the whole VPC.
691
+ vpc.addInterfaceEndpoint("CloudMapDataEndpoint", {
692
+ service: new ec2.InterfaceVpcEndpointAwsService("data-servicediscovery"),
693
+ subnets: { subnets: [vpc.publicSubnets[0]] },
694
+ });
695
+ // Lambda invokes (the SG-managers) need Lambda's API from this
696
+ // no-internet VPC — same one-ENI pattern as the Cloud Map endpoint.
697
+ vpc.addInterfaceEndpoint("LambdaEndpoint", {
698
+ service: ec2.InterfaceVpcEndpointAwsService.LAMBDA,
699
+ subnets: { subnets: [vpc.publicSubnets[0]] },
700
+ });
701
+ // The minters and the reconciler read each site's TLS certificate from
702
+ // SSM before calling Headscale; without this endpoint that read hangs.
703
+ vpc.addInterfaceEndpoint("SsmEndpoint", {
704
+ service: ec2.InterfaceVpcEndpointAwsService.SSM,
705
+ subnets: { subnets: [vpc.publicSubnets[0]] },
706
+ });
707
+ // DynamoDB from inside the VPC without internet: free gateway endpoint.
708
+ vpc.addGatewayEndpoint("DynamoDbEndpoint", {
709
+ service: ec2.GatewayVpcEndpointAwsService.DYNAMODB,
710
+ });
711
+ new events.Rule(this, "ReconcileSchedule", {
712
+ schedule: events.Schedule.rate(cdk.Duration.minutes(5)),
713
+ targets: [new eventsTargets.LambdaFunction(reconciler)],
714
+ });
715
+ // A broken reconciler freezes reachability INCLUDING revocations; one
716
+ // failure self-heals next pass, so alarm on two consecutive.
717
+ if (props.alertTopic) {
718
+ const notify = new cwactions.SnsAction(props.alertTopic);
719
+ const alarm = new cloudwatch.Alarm(this, "ReconcilerErrors", {
720
+ metric: reconciler.metricErrors({ period: cdk.Duration.minutes(15) }),
721
+ threshold: 2,
722
+ evaluationPeriods: 1,
723
+ comparisonOperator: cloudwatch.ComparisonOperator.GREATER_THAN_OR_EQUAL_TO_THRESHOLD,
724
+ treatMissingData: cloudwatch.TreatMissingData.NOT_BREACHING,
725
+ alarmDescription: "The ACL reconciler has failed 2+ consecutive passes — tailnet " +
726
+ "reachability is frozen at the last synced state, so grant changes " +
727
+ "AND revocations are not taking effect. Check its CloudWatch logs " +
728
+ "and the Headscale services.",
729
+ });
730
+ alarm.addAlarmAction(notify);
731
+ alarm.addOkAction(notify);
732
+ // Zombie: "online" but silent — forwards on STALE rules and never
733
+ // learns new device keys. EMF metric from the reconciler, summed.
734
+ const staleAlarm = new cloudwatch.Alarm(this, "StaleConnectors", {
735
+ metric: new cloudwatch.Metric({
736
+ namespace: "InfraClient/Network",
737
+ metricName: "StaleConnectors",
738
+ statistic: "Maximum",
739
+ period: cdk.Duration.minutes(15),
740
+ }),
741
+ threshold: 1,
742
+ evaluationPeriods: 1,
743
+ comparisonOperator: cloudwatch.ComparisonOperator.GREATER_THAN_OR_EQUAL_TO_THRESHOLD,
744
+ treatMissingData: cloudwatch.TreatMissingData.NOT_BREACHING,
745
+ alarmDescription: "A connector node with approved routes has been OFFLINE 15+ " +
746
+ "minutes (zombie): it enforces stale rules and won't learn " +
747
+ "re-enrolled devices. Restart it: aws ecs update-service " +
748
+ "--force-new-deployment on the connector service; the reconciler " +
749
+ "auto-approves the replacement's routes.",
750
+ });
751
+ staleAlarm.addAlarmAction(notify);
752
+ staleAlarm.addOkAction(notify);
753
+ }
754
+ new cdk.CfnOutput(this, "ClusterName", { value: cluster.clusterName });
755
+ new cdk.CfnOutput(this, "DeviceKeyMinterArn", {
756
+ value: this.deviceKeyMinter.functionArn,
757
+ });
758
+ }
759
+ /** Grant invoke on ONE SITE's connector minter (machine keys only — never
760
+ * the device minter). Prefer a task-role ARN over a whole-account id. */
761
+ grantConnectorAccount(siteId, connectorPrincipal) {
762
+ const minter = this.connectorKeyMinters[siteId];
763
+ if (!minter)
764
+ throw new Error(`No such site: ${siteId}`);
765
+ const principal = connectorPrincipal.includes(":")
766
+ ? new iam.ArnPrincipal(connectorPrincipal) // specific role ARN (preferred)
767
+ : new iam.AccountPrincipal(connectorPrincipal); // whole account (coarser)
768
+ // Construct ids must be alphanumeric; keep them stable + unique per grant.
769
+ const suffix = connectorPrincipal.replace(/[^a-zA-Z0-9]/g, "").slice(-24);
770
+ minter.addPermission(`ConnectorInvoke${suffix}`, {
771
+ principal,
772
+ action: "lambda:InvokeFunction",
773
+ });
774
+ }
775
+ }
776
+ exports.NetworkStack = NetworkStack;