@harperfast/harper 5.2.10 → 5.3.0-alpha.1

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 (554) hide show
  1. package/agent/mcpTools.ts +1 -1
  2. package/agent/session.ts +25 -14
  3. package/bin/cliOperations.ts +46 -9
  4. package/bin/copyDb.ts +282 -59
  5. package/bin/deploySetup.ts +16 -5
  6. package/bin/harper.ts +1 -1
  7. package/bin/help.ts +4 -1
  8. package/bin/lite.ts +4 -1
  9. package/bin/restart.ts +59 -3
  10. package/bin/run.ts +6 -11
  11. package/bin/upgrade.js +7 -3
  12. package/bin/workloadIdentity.ts +119 -0
  13. package/components/Application.ts +2414 -242
  14. package/components/ApplicationScope.ts +8 -0
  15. package/components/EntryHandler.ts +59 -39
  16. package/components/OptionsWatcher.ts +150 -74
  17. package/components/RuntimeModuleTracker.ts +38 -7
  18. package/components/Scope.ts +37 -15
  19. package/components/awaitRestart.ts +84 -0
  20. package/components/componentLoader.ts +340 -30
  21. package/components/componentPreparationLock.ts +16 -5
  22. package/components/mcp/adapters/harperHttp.ts +4 -0
  23. package/components/mcp/listChanged.ts +4 -0
  24. package/components/mcp/toolRegistry.ts +2 -0
  25. package/components/mcp/tools/operations.ts +9 -0
  26. package/components/mcp/tools/schemas/operationDescriptions.ts +2 -2
  27. package/components/operations.js +270 -78
  28. package/components/operationsValidation.js +49 -1
  29. package/components/status/ComponentStatusRegistry.ts +59 -0
  30. package/config/RootConfigWatcher.ts +80 -34
  31. package/config/configUtils.ts +291 -34
  32. package/config/harperConfigEnvVars.ts +170 -27
  33. package/config-root.schema.json +29 -0
  34. package/dataLayer/blobBackup.ts +160 -50
  35. package/dataLayer/delete.ts +6 -1
  36. package/dataLayer/harperBridge/ResourceBridge.ts +52 -8
  37. package/dataLayer/harperBridge/lmdbBridge/lmdbMethods/DeleteAuditLogsBeforeResults.js +3 -1
  38. package/dataLayer/hdbInfoController.ts +34 -1
  39. package/dataLayer/insert.ts +44 -1
  40. package/dataLayer/rocksdbBackup.ts +53 -10
  41. package/dataLayer/schema.ts +11 -1
  42. package/dataLayer/schemaDescribe.ts +8 -1
  43. package/dist/agent/mcpTools.js +1 -1
  44. package/dist/agent/mcpTools.js.map +1 -1
  45. package/dist/agent/session.d.ts +22 -0
  46. package/dist/agent/session.js +26 -15
  47. package/dist/agent/session.js.map +1 -1
  48. package/dist/bin/cliOperations.js +48 -9
  49. package/dist/bin/cliOperations.js.map +1 -1
  50. package/dist/bin/copyDb.d.ts +12 -1
  51. package/dist/bin/copyDb.js +248 -60
  52. package/dist/bin/copyDb.js.map +1 -1
  53. package/dist/bin/deploySetup.d.ts +2 -0
  54. package/dist/bin/deploySetup.js +11 -3
  55. package/dist/bin/deploySetup.js.map +1 -1
  56. package/dist/bin/harper.js +1 -1
  57. package/dist/bin/harper.js.map +1 -1
  58. package/dist/bin/help.js +4 -1
  59. package/dist/bin/help.js.map +1 -1
  60. package/dist/bin/lite.js +4 -1
  61. package/dist/bin/lite.js.map +1 -1
  62. package/dist/bin/restart.js +54 -5
  63. package/dist/bin/restart.js.map +1 -1
  64. package/dist/bin/run.js +4 -10
  65. package/dist/bin/run.js.map +1 -1
  66. package/dist/bin/upgrade.js +4 -3
  67. package/dist/bin/upgrade.js.map +1 -1
  68. package/dist/bin/workloadIdentity.d.ts +18 -0
  69. package/dist/bin/workloadIdentity.js +100 -0
  70. package/dist/bin/workloadIdentity.js.map +1 -0
  71. package/dist/components/Application.d.ts +139 -16
  72. package/dist/components/Application.js +2215 -267
  73. package/dist/components/Application.js.map +1 -1
  74. package/dist/components/ApplicationScope.d.ts +8 -0
  75. package/dist/components/ApplicationScope.js +7 -0
  76. package/dist/components/ApplicationScope.js.map +1 -1
  77. package/dist/components/EntryHandler.js +26 -10
  78. package/dist/components/EntryHandler.js.map +1 -1
  79. package/dist/components/OptionsWatcher.d.ts +1 -0
  80. package/dist/components/OptionsWatcher.js +141 -74
  81. package/dist/components/OptionsWatcher.js.map +1 -1
  82. package/dist/components/RuntimeModuleTracker.js +40 -6
  83. package/dist/components/RuntimeModuleTracker.js.map +1 -1
  84. package/dist/components/Scope.js +38 -13
  85. package/dist/components/Scope.js.map +1 -1
  86. package/dist/components/awaitRestart.d.ts +33 -0
  87. package/dist/components/awaitRestart.js +61 -0
  88. package/dist/components/awaitRestart.js.map +1 -0
  89. package/dist/components/componentLoader.d.ts +38 -1
  90. package/dist/components/componentLoader.js +279 -22
  91. package/dist/components/componentLoader.js.map +1 -1
  92. package/dist/components/componentPreparationLock.d.ts +5 -0
  93. package/dist/components/componentPreparationLock.js +14 -6
  94. package/dist/components/componentPreparationLock.js.map +1 -1
  95. package/dist/components/mcp/adapters/harperHttp.js +4 -0
  96. package/dist/components/mcp/adapters/harperHttp.js.map +1 -1
  97. package/dist/components/mcp/listChanged.js +5 -0
  98. package/dist/components/mcp/listChanged.js.map +1 -1
  99. package/dist/components/mcp/toolRegistry.d.ts +1 -0
  100. package/dist/components/mcp/toolRegistry.js.map +1 -1
  101. package/dist/components/mcp/tools/operations.d.ts +5 -0
  102. package/dist/components/mcp/tools/operations.js +9 -0
  103. package/dist/components/mcp/tools/operations.js.map +1 -1
  104. package/dist/components/mcp/tools/schemas/operationDescriptions.js +2 -2
  105. package/dist/components/mcp/tools/schemas/operationDescriptions.js.map +1 -1
  106. package/dist/components/operations.js +231 -77
  107. package/dist/components/operations.js.map +1 -1
  108. package/dist/components/operationsValidation.js +49 -1
  109. package/dist/components/operationsValidation.js.map +1 -1
  110. package/dist/components/status/ComponentStatusRegistry.d.ts +0 -4
  111. package/dist/components/status/ComponentStatusRegistry.js +63 -0
  112. package/dist/components/status/ComponentStatusRegistry.js.map +1 -1
  113. package/dist/config/RootConfigWatcher.d.ts +7 -1
  114. package/dist/config/RootConfigWatcher.js +64 -27
  115. package/dist/config/RootConfigWatcher.js.map +1 -1
  116. package/dist/config/configUtils.d.ts +9 -1
  117. package/dist/config/configUtils.js +254 -33
  118. package/dist/config/configUtils.js.map +1 -1
  119. package/dist/config/harperConfigEnvVars.d.ts +16 -0
  120. package/dist/config/harperConfigEnvVars.js +162 -25
  121. package/dist/config/harperConfigEnvVars.js.map +1 -1
  122. package/dist/dataLayer/blobBackup.d.ts +49 -20
  123. package/dist/dataLayer/blobBackup.js +139 -50
  124. package/dist/dataLayer/blobBackup.js.map +1 -1
  125. package/dist/dataLayer/delete.js +1 -1
  126. package/dist/dataLayer/delete.js.map +1 -1
  127. package/dist/dataLayer/harperBridge/ResourceBridge.d.ts +14 -1
  128. package/dist/dataLayer/harperBridge/ResourceBridge.js +51 -10
  129. package/dist/dataLayer/harperBridge/ResourceBridge.js.map +1 -1
  130. package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/DeleteAuditLogsBeforeResults.d.ts +3 -1
  131. package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/DeleteAuditLogsBeforeResults.js +3 -1
  132. package/dist/dataLayer/harperBridge/lmdbBridge/lmdbMethods/DeleteAuditLogsBeforeResults.js.map +1 -1
  133. package/dist/dataLayer/hdbInfoController.d.ts +10 -0
  134. package/dist/dataLayer/hdbInfoController.js +30 -1
  135. package/dist/dataLayer/hdbInfoController.js.map +1 -1
  136. package/dist/dataLayer/insert.d.ts +9 -1
  137. package/dist/dataLayer/insert.js +30 -0
  138. package/dist/dataLayer/insert.js.map +1 -1
  139. package/dist/dataLayer/rocksdbBackup.d.ts +2 -2
  140. package/dist/dataLayer/rocksdbBackup.js +45 -8
  141. package/dist/dataLayer/rocksdbBackup.js.map +1 -1
  142. package/dist/dataLayer/schema.js +8 -0
  143. package/dist/dataLayer/schema.js.map +1 -1
  144. package/dist/dataLayer/schemaDescribe.js +8 -1
  145. package/dist/dataLayer/schemaDescribe.js.map +1 -1
  146. package/dist/index.d.ts +1 -1
  147. package/dist/index.js.map +1 -1
  148. package/dist/json/systemSchema.json +52 -0
  149. package/dist/resources/DatabaseTransaction.d.ts +55 -3
  150. package/dist/resources/DatabaseTransaction.js +460 -134
  151. package/dist/resources/DatabaseTransaction.js.map +1 -1
  152. package/dist/resources/LMDBTransaction.js +22 -4
  153. package/dist/resources/LMDBTransaction.js.map +1 -1
  154. package/dist/resources/PrimaryRocksDatabase.d.ts +1 -0
  155. package/dist/resources/PrimaryRocksDatabase.js +30 -2
  156. package/dist/resources/PrimaryRocksDatabase.js.map +1 -1
  157. package/dist/resources/RecordEncoder.d.ts +20 -0
  158. package/dist/resources/RecordEncoder.js +94 -9
  159. package/dist/resources/RecordEncoder.js.map +1 -1
  160. package/dist/resources/RequestTarget.d.ts +2 -0
  161. package/dist/resources/RequestTarget.js.map +1 -1
  162. package/dist/resources/Resource.js +20 -11
  163. package/dist/resources/Resource.js.map +1 -1
  164. package/dist/resources/ResourceInterface.d.ts +20 -1
  165. package/dist/resources/ResourceInterface.js.map +1 -1
  166. package/dist/resources/RocksIndexStore.d.ts +6 -1
  167. package/dist/resources/RocksIndexStore.js +24 -10
  168. package/dist/resources/RocksIndexStore.js.map +1 -1
  169. package/dist/resources/RocksTransactionLogStore.d.ts +14 -1
  170. package/dist/resources/RocksTransactionLogStore.js +57 -17
  171. package/dist/resources/RocksTransactionLogStore.js.map +1 -1
  172. package/dist/resources/Table.d.ts +112 -8
  173. package/dist/resources/Table.js +1071 -197
  174. package/dist/resources/Table.js.map +1 -1
  175. package/dist/resources/auditStore.d.ts +11 -2
  176. package/dist/resources/auditStore.js +183 -18
  177. package/dist/resources/auditStore.js.map +1 -1
  178. package/dist/resources/blob.d.ts +129 -9
  179. package/dist/resources/blob.js +992 -114
  180. package/dist/resources/blob.js.map +1 -1
  181. package/dist/resources/branchDatabase.d.ts +48 -0
  182. package/dist/resources/branchDatabase.js +892 -0
  183. package/dist/resources/branchDatabase.js.map +1 -0
  184. package/dist/resources/crdt.js +50 -12
  185. package/dist/resources/crdt.js.map +1 -1
  186. package/dist/resources/databases.d.ts +150 -9
  187. package/dist/resources/databases.js +1247 -525
  188. package/dist/resources/databases.js.map +1 -1
  189. package/dist/resources/defineTable.d.ts +10 -2
  190. package/dist/resources/defineTable.js +9 -1
  191. package/dist/resources/defineTable.js.map +1 -1
  192. package/dist/resources/graphql.d.ts +1 -1
  193. package/dist/resources/graphql.js +50 -15
  194. package/dist/resources/graphql.js.map +1 -1
  195. package/dist/resources/indexes/HierarchicalNavigableSmallWorld.d.ts +1 -0
  196. package/dist/resources/indexes/HierarchicalNavigableSmallWorld.js +6 -2
  197. package/dist/resources/indexes/HierarchicalNavigableSmallWorld.js.map +1 -1
  198. package/dist/resources/longLivedTransactions.d.ts +71 -0
  199. package/dist/resources/longLivedTransactions.js +358 -0
  200. package/dist/resources/longLivedTransactions.js.map +1 -0
  201. package/dist/resources/models/backendRegistry.d.ts +26 -0
  202. package/dist/resources/models/backendRegistry.js +60 -2
  203. package/dist/resources/models/backendRegistry.js.map +1 -1
  204. package/dist/resources/models/bootstrap.d.ts +33 -1
  205. package/dist/resources/models/bootstrap.js +416 -31
  206. package/dist/resources/models/bootstrap.js.map +1 -1
  207. package/dist/resources/recordLock.d.ts +80 -0
  208. package/dist/resources/recordLock.js +184 -0
  209. package/dist/resources/recordLock.js.map +1 -0
  210. package/dist/resources/replayLogs.d.ts +14 -1
  211. package/dist/resources/replayLogs.js +152 -24
  212. package/dist/resources/replayLogs.js.map +1 -1
  213. package/dist/resources/replayLogsGuards.d.ts +94 -7
  214. package/dist/resources/replayLogsGuards.js +111 -7
  215. package/dist/resources/replayLogsGuards.js.map +1 -1
  216. package/dist/resources/search.js +158 -32
  217. package/dist/resources/search.js.map +1 -1
  218. package/dist/resources/transactionBroadcast.d.ts +1 -1
  219. package/dist/resources/transactionBroadcast.js +2 -2
  220. package/dist/resources/transactionBroadcast.js.map +1 -1
  221. package/dist/security/auth.js +61 -30
  222. package/dist/security/auth.js.map +1 -1
  223. package/dist/security/authn/oidc/claims.d.ts +22 -0
  224. package/dist/security/authn/oidc/claims.js +71 -0
  225. package/dist/security/authn/oidc/claims.js.map +1 -0
  226. package/dist/security/authn/oidc/identityToken.d.ts +27 -0
  227. package/dist/security/authn/oidc/identityToken.js +111 -0
  228. package/dist/security/authn/oidc/identityToken.js.map +1 -0
  229. package/dist/security/authn/oidc/jwks.d.ts +25 -0
  230. package/dist/security/authn/oidc/jwks.js +261 -0
  231. package/dist/security/authn/oidc/jwks.js.map +1 -0
  232. package/dist/security/authn/oidc/providers/generic.d.ts +13 -0
  233. package/dist/security/authn/oidc/providers/generic.js +34 -0
  234. package/dist/security/authn/oidc/providers/generic.js.map +1 -0
  235. package/dist/security/authn/oidc/providers/githubActions.d.ts +11 -0
  236. package/dist/security/authn/oidc/providers/githubActions.js +129 -0
  237. package/dist/security/authn/oidc/providers/githubActions.js.map +1 -0
  238. package/dist/security/authn/oidc/providers/index.d.ts +37 -0
  239. package/dist/security/authn/oidc/providers/index.js +24 -0
  240. package/dist/security/authn/oidc/providers/index.js.map +1 -0
  241. package/dist/security/authn/oidc/tokenExchange.d.ts +12 -0
  242. package/dist/security/authn/oidc/tokenExchange.js +306 -0
  243. package/dist/security/authn/oidc/tokenExchange.js.map +1 -0
  244. package/dist/security/authn/oidc/trustPolicyOperations.d.ts +49 -0
  245. package/dist/security/authn/oidc/trustPolicyOperations.js +358 -0
  246. package/dist/security/authn/oidc/trustPolicyOperations.js.map +1 -0
  247. package/dist/security/authn/oidc/types.d.ts +38 -0
  248. package/dist/security/authn/oidc/types.js +6 -0
  249. package/dist/security/authn/oidc/types.js.map +1 -0
  250. package/dist/security/certificateVerification/index.js +40 -11
  251. package/dist/security/certificateVerification/index.js.map +1 -1
  252. package/dist/security/certificateVerification/trustedIssuers.d.ts +24 -0
  253. package/dist/security/certificateVerification/trustedIssuers.js +79 -0
  254. package/dist/security/certificateVerification/trustedIssuers.js.map +1 -0
  255. package/dist/security/certificateVerification/types.d.ts +1 -0
  256. package/dist/security/credentialProvenance.d.ts +35 -0
  257. package/dist/security/credentialProvenance.js +51 -0
  258. package/dist/security/credentialProvenance.js.map +1 -0
  259. package/dist/security/credentialRejection.d.ts +4 -0
  260. package/dist/security/credentialRejection.js +24 -0
  261. package/dist/security/credentialRejection.js.map +1 -0
  262. package/dist/security/deferredAuthentication.d.ts +36 -0
  263. package/dist/security/deferredAuthentication.js +70 -0
  264. package/dist/security/deferredAuthentication.js.map +1 -0
  265. package/dist/security/impersonation.d.ts +21 -0
  266. package/dist/security/impersonation.js +108 -9
  267. package/dist/security/impersonation.js.map +1 -1
  268. package/dist/security/jsLoader.d.ts +6 -0
  269. package/dist/security/jsLoader.js +75 -15
  270. package/dist/security/jsLoader.js.map +1 -1
  271. package/dist/security/keys.js +301 -71
  272. package/dist/security/keys.js.map +1 -1
  273. package/dist/security/operationScope.d.ts +21 -0
  274. package/dist/security/operationScope.js +36 -0
  275. package/dist/security/operationScope.js.map +1 -0
  276. package/dist/security/permissionsTranslator.js +21 -0
  277. package/dist/security/permissionsTranslator.js.map +1 -1
  278. package/dist/security/tokenAuthentication.d.ts +19 -1
  279. package/dist/security/tokenAuthentication.js +191 -10
  280. package/dist/security/tokenAuthentication.js.map +1 -1
  281. package/dist/security/user.js +4 -3
  282. package/dist/security/user.js.map +1 -1
  283. package/dist/server/DurableSubscriptionsSession.d.ts +2 -2
  284. package/dist/server/DurableSubscriptionsSession.js +67 -10
  285. package/dist/server/DurableSubscriptionsSession.js.map +1 -1
  286. package/dist/server/REST.js +73 -0
  287. package/dist/server/REST.js.map +1 -1
  288. package/dist/server/graphqlQuerying.js +4 -0
  289. package/dist/server/graphqlQuerying.js.map +1 -1
  290. package/dist/server/http.d.ts +11 -0
  291. package/dist/server/http.js +88 -15
  292. package/dist/server/http.js.map +1 -1
  293. package/dist/server/itc/serverHandlers.js +8 -1
  294. package/dist/server/itc/serverHandlers.js.map +1 -1
  295. package/dist/server/jobs/jobProcess.js +6 -2
  296. package/dist/server/jobs/jobProcess.js.map +1 -1
  297. package/dist/server/jobs/jobs.js +4 -1
  298. package/dist/server/jobs/jobs.js.map +1 -1
  299. package/dist/server/liveSubscriptionAuth.d.ts +26 -4
  300. package/dist/server/liveSubscriptionAuth.js +105 -39
  301. package/dist/server/liveSubscriptionAuth.js.map +1 -1
  302. package/dist/server/loadRootComponents.js +49 -10
  303. package/dist/server/loadRootComponents.js.map +1 -1
  304. package/dist/server/mqtt.d.ts +2 -0
  305. package/dist/server/mqtt.js +165 -30
  306. package/dist/server/mqtt.js.map +1 -1
  307. package/dist/server/nodeName.d.ts +2 -0
  308. package/dist/server/nodeName.js +107 -23
  309. package/dist/server/nodeName.js.map +1 -1
  310. package/dist/server/serverHelpers/Headers.d.ts +25 -0
  311. package/dist/server/serverHelpers/Headers.js +139 -1
  312. package/dist/server/serverHelpers/Headers.js.map +1 -1
  313. package/dist/server/serverHelpers/contentTypes.d.ts +9 -0
  314. package/dist/server/serverHelpers/contentTypes.js +32 -25
  315. package/dist/server/serverHelpers/contentTypes.js.map +1 -1
  316. package/dist/server/serverHelpers/deployValidationState.d.ts +3 -0
  317. package/dist/server/serverHelpers/deployValidationState.js +9 -19
  318. package/dist/server/serverHelpers/deployValidationState.js.map +1 -1
  319. package/dist/server/serverHelpers/operationAuthorizationState.d.ts +12 -0
  320. package/dist/server/serverHelpers/operationAuthorizationState.js +24 -2
  321. package/dist/server/serverHelpers/operationAuthorizationState.js.map +1 -1
  322. package/dist/server/serverHelpers/registeredOperations.d.ts +5 -4
  323. package/dist/server/serverHelpers/registeredOperations.js +74 -21
  324. package/dist/server/serverHelpers/registeredOperations.js.map +1 -1
  325. package/dist/server/serverHelpers/requestSanitization.d.ts +11 -0
  326. package/dist/server/serverHelpers/requestSanitization.js +20 -0
  327. package/dist/server/serverHelpers/requestSanitization.js.map +1 -0
  328. package/dist/server/serverHelpers/serverHandlers.js +6 -3
  329. package/dist/server/serverHelpers/serverHandlers.js.map +1 -1
  330. package/dist/server/serverHelpers/serverUtilities.d.ts +18 -0
  331. package/dist/server/serverHelpers/serverUtilities.js +90 -20
  332. package/dist/server/serverHelpers/serverUtilities.js.map +1 -1
  333. package/dist/server/serverHelpers/sharedMessageEncoding.d.ts +67 -0
  334. package/dist/server/serverHelpers/sharedMessageEncoding.js +280 -0
  335. package/dist/server/serverHelpers/sharedMessageEncoding.js.map +1 -0
  336. package/dist/server/serverHelpers/uwsServer.js +19 -1
  337. package/dist/server/serverHelpers/uwsServer.js.map +1 -1
  338. package/dist/server/static.js +24 -28
  339. package/dist/server/static.js.map +1 -1
  340. package/dist/server/storageReclamation.d.ts +5 -0
  341. package/dist/server/storageReclamation.js +16 -0
  342. package/dist/server/storageReclamation.js.map +1 -1
  343. package/dist/server/threads/itc.d.ts +7 -2
  344. package/dist/server/threads/itc.js +5 -1
  345. package/dist/server/threads/itc.js.map +1 -1
  346. package/dist/server/threads/manageThreads.d.ts +26 -4
  347. package/dist/server/threads/manageThreads.js +517 -72
  348. package/dist/server/threads/manageThreads.js.map +1 -1
  349. package/dist/server/threads/socketRouter.js +89 -26
  350. package/dist/server/threads/socketRouter.js.map +1 -1
  351. package/dist/server/threads/threadHeapMemory.d.ts +2 -0
  352. package/dist/server/threads/threadHeapMemory.js +31 -0
  353. package/dist/server/threads/threadHeapMemory.js.map +1 -0
  354. package/dist/server/threads/threadServer.js +46 -15
  355. package/dist/server/threads/threadServer.js.map +1 -1
  356. package/dist/sqlEngine/config.d.ts +1 -3
  357. package/dist/sqlEngine/config.js +19 -16
  358. package/dist/sqlEngine/config.js.map +1 -1
  359. package/dist/sqlTranslator/index.d.ts +1 -1
  360. package/dist/sqlTranslator/index.js +30 -7
  361. package/dist/sqlTranslator/index.js.map +1 -1
  362. package/dist/upgrade/directives/5-3-0.d.ts +7 -0
  363. package/dist/upgrade/directives/5-3-0.js +148 -0
  364. package/dist/upgrade/directives/5-3-0.js.map +1 -0
  365. package/dist/upgrade/directives/directivesController.js +2 -1
  366. package/dist/upgrade/directives/directivesController.js.map +1 -1
  367. package/dist/utility/OperationFunctionCaller.js +2 -1
  368. package/dist/utility/OperationFunctionCaller.js.map +1 -1
  369. package/dist/utility/common_utils.d.ts +16 -0
  370. package/dist/utility/common_utils.js +32 -6
  371. package/dist/utility/common_utils.js.map +1 -1
  372. package/dist/utility/componentNames.d.ts +8 -0
  373. package/dist/utility/componentNames.js +12 -1
  374. package/dist/utility/componentNames.js.map +1 -1
  375. package/dist/utility/environment/environmentManager.js +3 -6
  376. package/dist/utility/environment/environmentManager.js.map +1 -1
  377. package/dist/utility/environment/systemInformation.d.ts +1 -0
  378. package/dist/utility/environment/systemInformation.js +1 -0
  379. package/dist/utility/environment/systemInformation.js.map +1 -1
  380. package/dist/utility/errors/commonErrors.d.ts +2 -0
  381. package/dist/utility/errors/commonErrors.js +2 -0
  382. package/dist/utility/errors/commonErrors.js.map +1 -1
  383. package/dist/utility/errors/hdbError.d.ts +17 -0
  384. package/dist/utility/errors/hdbError.js +30 -1
  385. package/dist/utility/errors/hdbError.js.map +1 -1
  386. package/dist/utility/globalSchema.d.ts +18 -0
  387. package/dist/utility/hdbTerms.d.ts +16 -0
  388. package/dist/utility/hdbTerms.js +18 -2
  389. package/dist/utility/hdbTerms.js.map +1 -1
  390. package/dist/utility/logging/harper_logger.d.ts +2 -0
  391. package/dist/utility/logging/harper_logger.js +91 -14
  392. package/dist/utility/logging/harper_logger.js.map +1 -1
  393. package/dist/utility/logging/logRotator.js +76 -49
  394. package/dist/utility/logging/logRotator.js.map +1 -1
  395. package/dist/utility/nodeIdentity.d.ts +9 -0
  396. package/dist/utility/nodeIdentity.js +58 -0
  397. package/dist/utility/nodeIdentity.js.map +1 -0
  398. package/dist/utility/npmUtilities.js +9 -7
  399. package/dist/utility/npmUtilities.js.map +1 -1
  400. package/dist/utility/operationPermissions.d.ts +3 -1
  401. package/dist/utility/operationPermissions.js +16 -1
  402. package/dist/utility/operationPermissions.js.map +1 -1
  403. package/dist/utility/operation_authorization.d.ts +10 -7
  404. package/dist/utility/operation_authorization.js +212 -41
  405. package/dist/utility/operation_authorization.js.map +1 -1
  406. package/dist/utility/watchPath.d.ts +29 -0
  407. package/dist/utility/watchPath.js +68 -0
  408. package/dist/utility/watchPath.js.map +1 -0
  409. package/dist/utility/watcherFallback.d.ts +86 -0
  410. package/dist/utility/watcherFallback.js +278 -1
  411. package/dist/utility/watcherFallback.js.map +1 -1
  412. package/dist/validation/configValidator.d.ts +12 -0
  413. package/dist/validation/configValidator.js +199 -72
  414. package/dist/validation/configValidator.js.map +1 -1
  415. package/dist/validation/installValidator.js +12 -0
  416. package/dist/validation/installValidator.js.map +1 -1
  417. package/dist/validation/validationWrapper.d.ts +11 -0
  418. package/dist/validation/validationWrapper.js +16 -3
  419. package/dist/validation/validationWrapper.js.map +1 -1
  420. package/index.ts +2 -0
  421. package/json/systemSchema.json +52 -0
  422. package/npm-shrinkwrap.json +235 -233
  423. package/package.json +8 -7
  424. package/resources/DESIGN.md +114 -52
  425. package/resources/DatabaseTransaction.ts +522 -130
  426. package/resources/LMDBTransaction.ts +26 -4
  427. package/resources/PrimaryRocksDatabase.ts +29 -3
  428. package/resources/RecordEncoder.ts +103 -8
  429. package/resources/RequestTarget.ts +2 -0
  430. package/resources/Resource.ts +17 -9
  431. package/resources/ResourceInterface.ts +23 -0
  432. package/resources/RocksIndexStore.ts +30 -10
  433. package/resources/RocksTransactionLogStore.ts +78 -21
  434. package/resources/Table.ts +1107 -164
  435. package/resources/auditStore.ts +187 -21
  436. package/resources/blob.ts +1029 -110
  437. package/resources/branchDatabase.ts +941 -0
  438. package/resources/crdt.ts +76 -12
  439. package/resources/databases.ts +1354 -522
  440. package/resources/defineTable.ts +18 -2
  441. package/resources/graphql.ts +70 -16
  442. package/resources/indexes/HierarchicalNavigableSmallWorld.ts +6 -2
  443. package/resources/longLivedTransactions.ts +360 -0
  444. package/resources/models/backendRegistry.ts +84 -2
  445. package/resources/models/bootstrap.ts +473 -28
  446. package/resources/recordLock.ts +253 -0
  447. package/resources/replayLogs.ts +147 -26
  448. package/resources/replayLogsGuards.ts +171 -8
  449. package/resources/search.ts +154 -32
  450. package/resources/transactionBroadcast.ts +3 -3
  451. package/security/auth.ts +68 -29
  452. package/security/authn/oidc/claims.ts +72 -0
  453. package/security/authn/oidc/identityToken.ts +129 -0
  454. package/security/authn/oidc/jwks.ts +260 -0
  455. package/security/authn/oidc/providers/generic.ts +40 -0
  456. package/security/authn/oidc/providers/githubActions.ts +137 -0
  457. package/security/authn/oidc/providers/index.ts +52 -0
  458. package/security/authn/oidc/tokenExchange.ts +300 -0
  459. package/security/authn/oidc/trustPolicyOperations.ts +343 -0
  460. package/security/authn/oidc/types.ts +41 -0
  461. package/security/certificateVerification/index.ts +54 -13
  462. package/security/certificateVerification/trustedIssuers.ts +76 -0
  463. package/security/certificateVerification/types.ts +1 -0
  464. package/security/credentialProvenance.ts +47 -0
  465. package/security/credentialRejection.ts +22 -0
  466. package/security/deferredAuthentication.ts +71 -0
  467. package/security/impersonation.ts +117 -12
  468. package/security/jsLoader.ts +81 -18
  469. package/security/keys.ts +298 -72
  470. package/security/operationScope.ts +33 -0
  471. package/security/permissionsTranslator.js +23 -0
  472. package/security/tokenAuthentication.ts +233 -12
  473. package/security/user.ts +4 -3
  474. package/server/DESIGN.md +183 -16
  475. package/server/DurableSubscriptionsSession.ts +71 -11
  476. package/server/REST.ts +79 -1
  477. package/server/graphqlQuerying.ts +4 -0
  478. package/server/http.ts +99 -18
  479. package/server/itc/serverHandlers.js +8 -1
  480. package/server/jobs/jobProcess.ts +8 -2
  481. package/server/jobs/jobs.ts +4 -1
  482. package/server/liveSubscriptionAuth.ts +129 -46
  483. package/server/loadRootComponents.js +50 -8
  484. package/server/mqtt.ts +179 -38
  485. package/server/nodeName.ts +103 -21
  486. package/server/serverHelpers/Headers.ts +131 -0
  487. package/server/serverHelpers/contentTypes.ts +29 -21
  488. package/server/serverHelpers/deployValidationState.ts +24 -13
  489. package/server/serverHelpers/operationAuthorizationState.ts +34 -3
  490. package/server/serverHelpers/registeredOperations.ts +79 -22
  491. package/server/serverHelpers/requestSanitization.ts +15 -0
  492. package/server/serverHelpers/serverHandlers.js +6 -3
  493. package/server/serverHelpers/serverUtilities.ts +104 -31
  494. package/server/serverHelpers/sharedMessageEncoding.ts +307 -0
  495. package/server/serverHelpers/uwsServer.ts +17 -2
  496. package/server/static.ts +23 -29
  497. package/server/storageReclamation.ts +13 -0
  498. package/server/threads/itc.js +11 -1
  499. package/server/threads/manageThreads.js +526 -63
  500. package/server/threads/socketRouter.ts +81 -26
  501. package/server/threads/threadHeapMemory.ts +26 -0
  502. package/server/threads/threadServer.js +43 -15
  503. package/sqlTranslator/index.ts +31 -8
  504. package/studio/web/assets/{Chat-Br06zdMA.js → Chat-BnCBegQz.js} +1 -1
  505. package/studio/web/assets/{FloatingChat-BWImX5fA.js → FloatingChat-CoDW1ySS.js} +3 -3
  506. package/studio/web/assets/{apiToken-DN0nmDsq.js → apiToken-Bwk5BLXW.js} +1 -1
  507. package/studio/web/assets/{applications-kSxVoyeU.js → applications-DHxGi7JH.js} +1 -1
  508. package/studio/web/assets/{cssMode-C1JeufH5.js → cssMode-s0cWI-_M.js} +1 -1
  509. package/studio/web/assets/{editor-qoo9CrGO.js → editor-DNcRHK54.js} +1 -1
  510. package/studio/web/assets/{html-Dt4IIy04.js → html-Bdssedlg.js} +1 -1
  511. package/studio/web/assets/{htmlMode-DXgKKr4C.js → htmlMode-CoDlJ3fw.js} +1 -1
  512. package/studio/web/assets/{index-6onkYFOG.js → index-D6sxmFLR.js} +5 -5
  513. package/studio/web/assets/{index.lazy-BrCFnpNJ.js → index.lazy-tmU5BS8s.js} +1 -1
  514. package/studio/web/assets/{javascript-DNCQGUBc.js → javascript-B8meVSTH.js} +1 -1
  515. package/studio/web/assets/{jsonMode-CR6HWruP.js → jsonMode-DpIPd35T.js} +1 -1
  516. package/studio/web/assets/{languageServices-BM4fI4rS.js → languageServices-C_5FMJzQ.js} +1 -1
  517. package/studio/web/assets/{lspLanguageFeatures-DSa1ttcD.js → lspLanguageFeatures-BIzNBzPK.js} +1 -1
  518. package/studio/web/assets/{notifications-BHXLnh6x.js → notifications-CQf18QKb.js} +1 -1
  519. package/studio/web/assets/{notifications-CUmtIA6z.js → notifications-CvZivSbh.js} +1 -1
  520. package/studio/web/assets/{profile-8BeFSF3j.js → profile-DdOwtntb.js} +1 -1
  521. package/studio/web/assets/{regions-C8qR0HhD.js → regions-n69fwagr.js} +1 -1
  522. package/studio/web/assets/{register-B4n5i0SD.js → register-PfWTCXWB.js} +2 -2
  523. package/studio/web/assets/{setComponentFile-g0_B0lgX.js → setComponentFile-Bg6O7X0S.js} +1 -1
  524. package/studio/web/assets/{setup-B0CTj_Q5.js → setup-CUx_aUDl.js} +2 -2
  525. package/studio/web/assets/{status-C6Yib7-K.js → status-D7BVKqX9.js} +1 -1
  526. package/studio/web/assets/{toggleHighContrast-Dgta7bVi.js → toggleHighContrast-DBSyXzMr.js} +1 -1
  527. package/studio/web/assets/{tsMode-CH_jHvU-.js → tsMode-BByKCjBS.js} +1 -1
  528. package/studio/web/assets/{typescript-Co9LCXd5.js → typescript-DDLnLpw9.js} +1 -1
  529. package/studio/web/assets/{useEntityRestURL-wKC8NsC_.js → useEntityRestURL-31CHGaHk.js} +1 -1
  530. package/studio/web/assets/{workers-CWeLxCXA.js → workers-pR3jRY9D.js} +1 -1
  531. package/studio/web/assets/{xml-BadC-0Rk.js → xml-2iRnMhQO.js} +1 -1
  532. package/studio/web/assets/{yaml-BiUfxPbC.js → yaml-Bf92gJpd.js} +1 -1
  533. package/studio/web/index.html +1 -1
  534. package/upgrade/directives/5-3-0.ts +132 -0
  535. package/upgrade/directives/directivesController.ts +2 -1
  536. package/utility/OperationFunctionCaller.ts +2 -1
  537. package/utility/common_utils.ts +30 -5
  538. package/utility/componentNames.ts +12 -0
  539. package/utility/environment/environmentManager.ts +3 -7
  540. package/utility/environment/systemInformation.ts +7 -0
  541. package/utility/errors/commonErrors.ts +4 -0
  542. package/utility/errors/hdbError.ts +29 -0
  543. package/utility/hdbTerms.ts +17 -0
  544. package/utility/logging/harper_logger.ts +87 -14
  545. package/utility/logging/logRotator.ts +72 -45
  546. package/utility/nodeIdentity.ts +45 -0
  547. package/utility/npmUtilities.ts +10 -8
  548. package/utility/operationPermissions.ts +18 -1
  549. package/utility/operation_authorization.ts +231 -42
  550. package/utility/watchPath.ts +63 -0
  551. package/utility/watcherFallback.ts +270 -0
  552. package/validation/configValidator.ts +209 -72
  553. package/validation/installValidator.ts +15 -0
  554. package/validation/validationWrapper.ts +18 -4
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Issuer-agnostic claim matching and constraint validation (#2171).
3
+ *
4
+ * Pure — no network, no storage, and nothing that knows which issuer a token came from. Rules that
5
+ * depend on the issuer live in providers/.
6
+ */
7
+ import type { ClaimConstraint, TokenClaims } from './types.ts';
8
+ /**
9
+ * Returns undefined on a match, or the first failure's reason — for the log, never the caller.
10
+ *
11
+ * A constrained claim absent from the token fails rather than passes, so a policy cannot be weakened
12
+ * by an issuer that stops emitting a claim.
13
+ */
14
+ export declare function matchTrustPolicyClaims(claims: TokenClaims, policyClaims: Record<string, ClaimConstraint>): string | undefined;
15
+ /**
16
+ * Validates the *shape* of a policy's constraints — that each is a usable set of comparable values.
17
+ * Whether the set is specific enough to be safe depends on the issuer; that is the provider profile's
18
+ * assertPolicyIsSpecific.
19
+ *
20
+ * Throws ClientError naming the first problem; the reader is an administrator writing a policy.
21
+ */
22
+ export declare function validateClaimConstraintShape(policyClaims: unknown): asserts policyClaims is Record<string, ClaimConstraint>;
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ /**
3
+ * Issuer-agnostic claim matching and constraint validation (#2171).
4
+ *
5
+ * Pure — no network, no storage, and nothing that knows which issuer a token came from. Rules that
6
+ * depend on the issuer live in providers/.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.matchTrustPolicyClaims = matchTrustPolicyClaims;
10
+ exports.validateClaimConstraintShape = validateClaimConstraintShape;
11
+ const hdbError_ts_1 = require("../../../utility/errors/hdbError.js");
12
+ /** Issuers may encode a numeric id as a JSON number; anything non-scalar is not comparable. */
13
+ function claimToString(value) {
14
+ if (typeof value === 'string')
15
+ return value;
16
+ if (typeof value === 'number' && Number.isFinite(value))
17
+ return String(value);
18
+ return undefined;
19
+ }
20
+ /**
21
+ * Returns undefined on a match, or the first failure's reason — for the log, never the caller.
22
+ *
23
+ * A constrained claim absent from the token fails rather than passes, so a policy cannot be weakened
24
+ * by an issuer that stops emitting a claim.
25
+ */
26
+ function matchTrustPolicyClaims(claims, policyClaims) {
27
+ const constraints = Object.entries(policyClaims);
28
+ // validateClaimConstraintShape rejects this at write time; this backstops a row that reached the
29
+ // table another way, such as replication from a peer.
30
+ if (constraints.length === 0)
31
+ return 'policy constrains no claims';
32
+ for (const [claimName, constraint] of constraints) {
33
+ const actual = claimToString(claims[claimName]);
34
+ if (actual === undefined || actual === '')
35
+ return `token has no usable ${claimName} claim`;
36
+ const accepted = Array.isArray(constraint) ? constraint : [constraint];
37
+ // Exact membership, deliberately — never a prefix, wildcard, or regex. Relaxing this to
38
+ // something like `startsWith` is the classic trusted-publishing escalation: a policy pinning
39
+ // `HarperFast/my-app` would then also admit `HarperFast/my-app-evil`, a repository anyone can
40
+ // create. unitTests/security/authn/oidc/claims.test.js pins both argument orders.
41
+ if (!accepted.includes(actual))
42
+ return `${claimName} does not match the policy`;
43
+ }
44
+ return undefined;
45
+ }
46
+ /**
47
+ * Validates the *shape* of a policy's constraints — that each is a usable set of comparable values.
48
+ * Whether the set is specific enough to be safe depends on the issuer; that is the provider profile's
49
+ * assertPolicyIsSpecific.
50
+ *
51
+ * Throws ClientError naming the first problem; the reader is an administrator writing a policy.
52
+ */
53
+ function validateClaimConstraintShape(policyClaims) {
54
+ if (!policyClaims || typeof policyClaims !== 'object' || Array.isArray(policyClaims)) {
55
+ throw new hdbError_ts_1.ClientError('claims must be an object of claim constraints');
56
+ }
57
+ const entries = Object.entries(policyClaims);
58
+ if (entries.length === 0)
59
+ throw new hdbError_ts_1.ClientError('claims must constrain at least one claim');
60
+ for (const [claimName, constraint] of entries) {
61
+ const values = Array.isArray(constraint) ? constraint : [constraint];
62
+ if (values.length === 0)
63
+ throw new hdbError_ts_1.ClientError(`claims.${claimName} must accept at least one value`);
64
+ for (const value of values) {
65
+ if (typeof value !== 'string' || value === '') {
66
+ throw new hdbError_ts_1.ClientError(`claims.${claimName} must be a non-empty string or an array of non-empty strings`);
67
+ }
68
+ }
69
+ }
70
+ }
71
+ //# sourceMappingURL=claims.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claims.js","sourceRoot":"","sources":["../../../../security/authn/oidc/claims.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAkBH,wDAoBC;AASD,oEAmBC;AAhED,qEAAkE;AAGlE,+FAA+F;AAC/F,SAAS,aAAa,CAAC,KAAc;IACpC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9E,OAAO,SAAS,CAAC;AAClB,CAAC;AAED;;;;;GAKG;AACH,SAAgB,sBAAsB,CACrC,MAAmB,EACnB,YAA6C;IAE7C,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACjD,iGAAiG;IACjG,sDAAsD;IACtD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,6BAA6B,CAAC;IAEnE,KAAK,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,WAAW,EAAE,CAAC;QACnD,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;QAChD,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,EAAE;YAAE,OAAO,uBAAuB,SAAS,QAAQ,CAAC;QAC3F,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU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by the configured issuer and is addressed to this instance.
5
+ * Matching it against a policy's claim constraints is separate (claims.ts), because one verification
6
+ * serves every policy sharing an issuer and audience.
7
+ */
8
+ import type { KeyObject } from 'node:crypto';
9
+ import type { TokenClaims } from './types.ts';
10
+ export interface VerifyTokenTarget {
11
+ issuer: string;
12
+ audience: string;
13
+ }
14
+ export interface VerifyTokenOptions {
15
+ /** Overridable for tests; defaults to the network-backed JWKS lookup. */
16
+ getSigningKey?: (issuer: string, kid: unknown) => Promise<KeyObject>;
17
+ /** Seconds since the epoch to evaluate expiry against; defaults to the real clock. */
18
+ clockTimestamp?: number;
19
+ }
20
+ /**
21
+ * Refuses a token. Shared with the exchange so both halves fail identically: the endpoint is
22
+ * unauthenticated, and a caller told exactly which check failed can probe a policy one claim at a
23
+ * time. The reason goes to the log instead.
24
+ */
25
+ export declare function rejectToken(detail: string): never;
26
+ /** Verifies a CI identity token against one issuer/audience pair and returns its normalized claims. */
27
+ export declare function verifyIdentityToken(token: unknown, target: VerifyTokenTarget, options?: VerifyTokenOptions): Promise<TokenClaims>;
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ /**
3
+ * Identity-token verification for OIDC trusted publishing (#2171).
4
+ *
5
+ * Verifies that a token was signed by the configured issuer and is addressed to this instance.
6
+ * Matching it against a policy's claim constraints is separate (claims.ts), because one verification
7
+ * serves every policy sharing an issuer and audience.
8
+ */
9
+ var __importDefault = (this && this.__importDefault) || function (mod) {
10
+ return (mod && mod.__esModule) ? mod : { "default": mod };
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.rejectToken = rejectToken;
14
+ exports.verifyIdentityToken = verifyIdentityToken;
15
+ const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
16
+ const hdbError_ts_1 = require("../../../utility/errors/hdbError.js");
17
+ const logger_ts_1 = require("../../../utility/logging/logger.js");
18
+ const jwks_ts_1 = require("./jwks.js");
19
+ const index_ts_1 = require("./providers/index.js");
20
+ const logger = (0, logger_ts_1.loggerWithTag)('oidc-trust');
21
+ /**
22
+ * Asymmetric signatures only. Passing this to jwt.verify is what prevents algorithm confusion: an
23
+ * `alg: none` token, or one HMAC-signed with a public key as the secret, is rejected before the
24
+ * signature is considered.
25
+ */
26
+ const ALLOWED_ALGORITHMS = [
27
+ 'RS256',
28
+ 'RS384',
29
+ 'RS512',
30
+ 'ES256',
31
+ 'ES384',
32
+ 'ES512',
33
+ 'PS256',
34
+ 'PS384',
35
+ 'PS512',
36
+ ];
37
+ const CLOCK_TOLERANCE_SECONDS = 60;
38
+ /** CI identity tokens are minted per job and live minutes; a far-future expiry is not one to honor. */
39
+ const MAX_TOKEN_LIFETIME_SECONDS = 3_600;
40
+ /**
41
+ * Refuses a token. Shared with the exchange so both halves fail identically: the endpoint is
42
+ * unauthenticated, and a caller told exactly which check failed can probe a policy one claim at a
43
+ * time. The reason goes to the log instead.
44
+ */
45
+ function rejectToken(detail) {
46
+ logger.warn?.(`Rejecting identity token: ${detail}`);
47
+ throw new hdbError_ts_1.ClientError('Identity token was rejected', 401);
48
+ }
49
+ /** Verifies a CI identity token against one issuer/audience pair and returns its normalized claims. */
50
+ async function verifyIdentityToken(token, target, options = {}) {
51
+ if (typeof token !== 'string' || token === '')
52
+ throw new hdbError_ts_1.ClientError('token is required');
53
+ const issuer = (0, jwks_ts_1.normalizeIssuer)(target.issuer);
54
+ if (typeof target.audience !== 'string' || target.audience === '') {
55
+ throw new hdbError_ts_1.ClientError('audience is required');
56
+ }
57
+ const decoded = jsonwebtoken_1.default.decode(token, { complete: true });
58
+ if (!decoded)
59
+ rejectToken('token is not a well-formed JWT');
60
+ // Checked before resolving a key so a garbage header costs no outbound request.
61
+ if (!ALLOWED_ALGORITHMS.includes(decoded.header.alg)) {
62
+ rejectToken(`unsupported algorithm ${decoded.header.alg}`);
63
+ }
64
+ const getSigningKey = options.getSigningKey ?? jwks_ts_1.getSigningKey;
65
+ const key = await getSigningKey(issuer, decoded.header.kid);
66
+ let payload;
67
+ try {
68
+ payload = jsonwebtoken_1.default.verify(token, key, {
69
+ algorithms: ALLOWED_ALGORITHMS,
70
+ // Both spellings, because `issuer` here is normalized (trailing slash stripped) while
71
+ // jsonwebtoken compares it byte-for-byte against the raw `iss`. Azure AD v1 emits
72
+ // `https://sts.windows.net/<tenant>/`, which would otherwise never authenticate — and the
73
+ // generic profile exists precisely to serve issuers like it with no provider code. This
74
+ // cannot widen trust: normalizeIssuer already maps the two forms to one value, which is
75
+ // what keys the JWKS cache, the discovery check, and the policy lookup.
76
+ issuer: [issuer, `${issuer}/`],
77
+ audience: target.audience,
78
+ clockTolerance: CLOCK_TOLERANCE_SECONDS,
79
+ ...(options.clockTimestamp === undefined ? {} : { clockTimestamp: options.clockTimestamp }),
80
+ });
81
+ }
82
+ catch (error) {
83
+ rejectToken(error.message);
84
+ }
85
+ // jsonwebtoken only enforces `exp` when present, so a token without one never expires.
86
+ if (typeof payload.exp !== 'number')
87
+ rejectToken('token has no exp claim');
88
+ // `iat` is REQUIRED by OIDC, and required here rather than treated as optional: skipping the
89
+ // ceiling when it is absent means a token carrying a distant `exp` and no `iat` is unbounded —
90
+ // the ceiling would silently not apply to exactly the token that most needs it.
91
+ if (typeof payload.iat !== 'number')
92
+ rejectToken('token has no iat claim');
93
+ // Bounded against the verification clock, not only as `exp - iat`. jsonwebtoken validates `exp`
94
+ // and `nbf` but never rejects a future `iat`, so an issuer that shifts the whole pair forward
95
+ // keeps a small delta and still hands out a token valid far longer than the ceiling. Both the
96
+ // delta and the absolute distance to `exp` are checked; the tolerance mirrors the one given to
97
+ // jwt.verify so genuine clock skew is not treated as an attack.
98
+ const now = options.clockTimestamp ?? Math.floor(Date.now() / 1000);
99
+ if (payload.iat > now + CLOCK_TOLERANCE_SECONDS)
100
+ rejectToken('token iat is in the future');
101
+ if (payload.exp - payload.iat > MAX_TOKEN_LIFETIME_SECONDS) {
102
+ rejectToken(`token lifetime exceeds ${MAX_TOKEN_LIFETIME_SECONDS}s`);
103
+ }
104
+ if (payload.exp - now > MAX_TOKEN_LIFETIME_SECONDS + CLOCK_TOLERANCE_SECONDS) {
105
+ rejectToken(`token expires more than ${MAX_TOKEN_LIFETIME_SECONDS}s from now`);
106
+ }
107
+ // No `jti` requirement: not every issuer emits one (Azure uses `uti`, others omit it), and the
108
+ // exchange keys replay on a hash of the token itself, which is universal.
109
+ return (0, index_ts_1.profileForIssuer)(issuer).normalizeClaims(payload);
110
+ }
111
+ //# sourceMappingURL=identityToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identityToken.js","sourceRoot":"","sources":["../../../../security/authn/oidc/identityToken.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;AAmDH,kCAGC;AAGD,kDAiEC;AAxHD,gEAAoE;AAEpE,qEAAkE;AAClE,kEAAmE;AACnE,uCAAmF;AACnF,mDAAwD;AAGxD,MAAM,MAAM,GAAG,IAAA,yBAAa,EAAC,YAAY,CAAC,CAAC;AAE3C;;;;GAIG;AACH,MAAM,kBAAkB,GAAgB;IACvC,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;CACP,CAAC;AAEF,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEnC,uGAAuG;AACvG,MAAM,0BAA0B,GAAG,KAAK,CAAC;AAczC;;;;GAIG;AACH,SAAgB,WAAW,CAAC,MAAc;IACzC,MAAM,CAAC,IAAI,EAAE,CAAC,6BAA6B,MAAM,EAAE,CAAC,CAAC;IACrD,MAAM,IAAI,yBAAW,CAAC,6BAA6B,EAAE,GAAG,CAAC,CAAC;AAC3D,CAAC;AAED,uGAAuG;AAChG,KAAK,UAAU,mBAAmB,CACxC,KAAc,EACd,MAAyB,EACzB,UAA8B,EAAE;IAEhC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,EAAE;QAAE,MAAM,IAAI,yBAAW,CAAC,mBAAmB,CAAC,CAAC;IAC1F,MAAM,MAAM,GAA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SAC3F,CAAe,CAAC;IAClB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,WAAW,CAAE,KAAe,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;IAED,uFAAuF;IACvF,IAAI,OAAO,OAAO,CAAC,GAAG,KAAK,QAAQ;QAAE,WAAW,CAAC,wBAAwB,CAAC,CAAC;IAC3E,6FAA6F;IAC7F,+FAA+F;IAC/F,gFAAgF;IAChF,IAAI,OAAO,OAAO,CAAC,GAAG,KAAK,QAAQ;QAAE,WAAW,CAAC,wBAAwB,CAAC,CAAC;IAE3E,gGAAgG;IAChG,8FAA8F;IAC9F,8FAA8F;IAC9F,+FAA+F;IAC/F,gEAAgE;IAChE,MAAM,GAAG,GAAG,OAAO,CAAC,cAAc,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;IACpE,IAAI,OAAO,CAAC,GAAG,GAAG,GAAG,GAAG,uBAAuB;QAAE,WAAW,CAAC,4BAA4B,CAAC,CAAC;IAC3F,IAAI,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,GAAG,0BAA0B,EAAE,CAAC;QAC5D,WAAW,CAAC,0BAA0B,0BAA0B,GAAG,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,OAAO,CAAC,GAAG,GAAG,GAAG,GAAG,0BAA0B,GAAG,uBAAuB,EAAE,CAAC;QAC9E,WAAW,CAAC,2BAA2B,0BAA0B,YAAY,CAAC,CAAC;IAChF,CAAC;IACD,+FAA+F;IAC/F,0EAA0E;IAE1E,OAAO,IAAA,2BAAgB,EAAC,MAAM,CAAC,CAAC,eAAe,CAAC,OAAsB,CAAC,CAAC;AACzE,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * OIDC discovery and JWKS retrieval for trusted publishing (#2171).
3
+ *
4
+ * The issuer's signing keys are the root of trust for an exchanged token, and the endpoint that
5
+ * reaches them is unauthenticated — hence HTTPS only, bounded body, bounded time, and a rate limit
6
+ * on the refetch an unrecognized `kid` triggers, without which forged `kid`s become one outbound
7
+ * fetch per request.
8
+ */
9
+ import { type KeyObject } from 'node:crypto';
10
+ /** Drops all cached key sets. Exported for tests and for an operator forcing a re-read. */
11
+ export declare function clearJwksCache(): void;
12
+ /**
13
+ * Canonicalizes an issuer URL. The result is both the cache key and the discovery base, so a policy
14
+ * stored with a trailing slash and one without must not become two entries for the same issuer.
15
+ */
16
+ export declare function normalizeIssuer(issuer: unknown): string;
17
+ /** Resolves the public key an issuer used to sign a token, by `kid`. */
18
+ /**
19
+ * `now` exists so the two time-based bounds below can be tested — the cache TTL and, more
20
+ * importantly, the STALE_KEY_GRACE_MS ceiling that stops a pulled key being honored forever through
21
+ * a prolonged outage. Reaching either otherwise needs a cache aged past an hour, and this repo bars
22
+ * new fake timers. Mirrors the `clockTimestamp` seam verifyIdentityToken already takes, rather than
23
+ * inventing a second convention. Callers in production pass nothing.
24
+ */
25
+ export declare function getSigningKey(issuer: string, kid: unknown, now?: number): Promise<KeyObject>;
@@ -0,0 +1,261 @@
1
+ "use strict";
2
+ /**
3
+ * OIDC discovery and JWKS retrieval for trusted publishing (#2171).
4
+ *
5
+ * The issuer's signing keys are the root of trust for an exchanged token, and the endpoint that
6
+ * reaches them is unauthenticated — hence HTTPS only, bounded body, bounded time, and a rate limit
7
+ * on the refetch an unrecognized `kid` triggers, without which forged `kid`s become one outbound
8
+ * fetch per request.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.clearJwksCache = clearJwksCache;
12
+ exports.normalizeIssuer = normalizeIssuer;
13
+ exports.getSigningKey = getSigningKey;
14
+ const node_crypto_1 = require("node:crypto");
15
+ const logger_ts_1 = require("../../../utility/logging/logger.js");
16
+ const hdbError_ts_1 = require("../../../utility/errors/hdbError.js");
17
+ const logger = (0, logger_ts_1.loggerWithTag)('oidc-trust');
18
+ const DISCOVERY_PATH = '/.well-known/openid-configuration';
19
+ /** How long a fetched key set is served without revalidation. */
20
+ const JWKS_CACHE_TTL_MS = 3_600_000;
21
+ /** Floor between refetches triggered by an unrecognized `kid`. */
22
+ const MIN_REFETCH_INTERVAL_MS = 60_000;
23
+ /**
24
+ * How long a cached key set survives a failed refetch. Bounded, so a network blip does not break
25
+ * deploys but a pulled key does not stay honored forever.
26
+ */
27
+ const STALE_KEY_GRACE_MS = 86_400_000;
28
+ const FETCH_TIMEOUT_MS = 5_000;
29
+ const MAX_RESPONSE_BYTES = 1_048_576;
30
+ /** Asymmetric only: an `oct` key in a JWKS is the setup for algorithm confusion. */
31
+ const SUPPORTED_KEY_TYPES = ['RSA', 'EC'];
32
+ const issuerKeyCache = new Map();
33
+ const inFlightLoads = new Map();
34
+ /**
35
+ * When an unrecognized `kid` last drove a refetch, per issuer. Outside the cache entry on purpose:
36
+ * every successful fetch replaces that entry, and a rate limit that resets whenever it fires is not
37
+ * a rate limit. Separating them also lets a genuine key rotation be picked up on first use.
38
+ */
39
+ const unknownKidRefetchAt = new Map();
40
+ /**
41
+ * When a refresh for an issuer last FAILED, per issuer. Tracked separately from `fetchedAt`, which a
42
+ * failed fetch does not advance — so without this, every request wave arriving after the cache went
43
+ * stale starts discovery again and rides the same timeout before falling back to the same stale key.
44
+ * The exchange is unauthenticated and picks its issuer from an unverified JWT, and issuer key ids are
45
+ * public, so an anonymous caller could keep that cycle running for the length of an issuer outage:
46
+ * exactly when the stale-key grace is supposed to be absorbing load, not generating it.
47
+ */
48
+ const failedRefreshAt = new Map();
49
+ /** How long a failed refresh suppresses the next one, while a usable stale key is still on hand. */
50
+ const FAILED_REFRESH_BACKOFF_MS = 30_000;
51
+ /**
52
+ * Bumped by every clear. A fetch that was already in flight when the cache was cleared must not
53
+ * write its now-stale result back: clearing drops `inFlightLoads`, but the orphaned fetch still
54
+ * holds a reference and would repopulate the entry an operator just discarded — which for a clear
55
+ * issued precisely because the cached key is wrong means the re-read silently does nothing.
56
+ */
57
+ let cacheGeneration = 0;
58
+ /** Drops all cached key sets. Exported for tests and for an operator forcing a re-read. */
59
+ function clearJwksCache() {
60
+ cacheGeneration++;
61
+ issuerKeyCache.clear();
62
+ inFlightLoads.clear();
63
+ unknownKidRefetchAt.clear();
64
+ failedRefreshAt.clear();
65
+ }
66
+ /**
67
+ * Canonicalizes an issuer URL. The result is both the cache key and the discovery base, so a policy
68
+ * stored with a trailing slash and one without must not become two entries for the same issuer.
69
+ */
70
+ function normalizeIssuer(issuer) {
71
+ if (typeof issuer !== 'string' || issuer === '')
72
+ throw new hdbError_ts_1.ClientError('issuer is required');
73
+ let url;
74
+ try {
75
+ url = new URL(issuer);
76
+ }
77
+ catch {
78
+ throw new hdbError_ts_1.ClientError(`issuer is not a valid URL: ${issuer}`);
79
+ }
80
+ if (url.protocol !== 'https:')
81
+ throw new hdbError_ts_1.ClientError('issuer must be an https URL');
82
+ if (url.search !== '' || url.hash !== '')
83
+ throw new hdbError_ts_1.ClientError('issuer must not carry a query or fragment');
84
+ return url.origin + (url.pathname === '/' ? '' : url.pathname.replace(/\/$/, ''));
85
+ }
86
+ /**
87
+ * `content-length` is checked first as a cheap rejection, then the body is counted as it streams —
88
+ * the header is advisory, and a hostile endpoint can simply omit it.
89
+ */
90
+ async function readBoundedJson(response, url) {
91
+ const declaredLength = Number(response.headers.get('content-length'));
92
+ if (Number.isFinite(declaredLength) && declaredLength > MAX_RESPONSE_BYTES) {
93
+ throw new hdbError_ts_1.ServerError(`Response from ${url} exceeds ${MAX_RESPONSE_BYTES} bytes`);
94
+ }
95
+ const chunks = [];
96
+ let total = 0;
97
+ if (response.body) {
98
+ for await (const chunk of response.body) {
99
+ total += chunk.length;
100
+ if (total > MAX_RESPONSE_BYTES) {
101
+ throw new hdbError_ts_1.ServerError(`Response from ${url} exceeds ${MAX_RESPONSE_BYTES} bytes`);
102
+ }
103
+ chunks.push(Buffer.from(chunk));
104
+ }
105
+ }
106
+ try {
107
+ return JSON.parse(Buffer.concat(chunks).toString('utf8'));
108
+ }
109
+ catch (error) {
110
+ throw new hdbError_ts_1.ServerError(`Response from ${url} is not valid JSON: ${error.message}`);
111
+ }
112
+ }
113
+ async function fetchJson(url) {
114
+ let response;
115
+ try {
116
+ response = await fetch(url, {
117
+ signal: AbortSignal.timeout(FETCH_TIMEOUT_MS),
118
+ headers: { accept: 'application/json' },
119
+ redirect: 'error',
120
+ });
121
+ }
122
+ catch (error) {
123
+ throw new hdbError_ts_1.ServerError(`Could not reach ${url}: ${error.message}`);
124
+ }
125
+ if (!response.ok)
126
+ throw new hdbError_ts_1.ServerError(`${url} responded ${response.status}`);
127
+ return readBoundedJson(response, url);
128
+ }
129
+ /**
130
+ * The discovery document's own `issuer` must equal the one we asked about — the spec requires it,
131
+ * and it stops a misdirected document from quietly re-pointing an issuer we trust.
132
+ */
133
+ async function discoverJwksUri(issuer) {
134
+ const document = await fetchJson(issuer + DISCOVERY_PATH);
135
+ // Swallowed rather than propagated: normalizeIssuer raises ClientError, the wrong shape for a
136
+ // malformed *server* response.
137
+ let declaredIssuer;
138
+ try {
139
+ declaredIssuer = normalizeIssuer(document?.issuer);
140
+ }
141
+ catch {
142
+ declaredIssuer = undefined;
143
+ }
144
+ if (declaredIssuer !== issuer) {
145
+ throw new hdbError_ts_1.ServerError(`Discovery document at ${issuer} declares a different issuer`);
146
+ }
147
+ const jwksUri = document?.jwks_uri;
148
+ if (typeof jwksUri !== 'string' || !jwksUri.startsWith('https://')) {
149
+ throw new hdbError_ts_1.ServerError(`Discovery document at ${issuer} has no https jwks_uri`);
150
+ }
151
+ return jwksUri;
152
+ }
153
+ /**
154
+ * Undefined for a key we will not honor. One unusable entry must not poison the set: issuers publish
155
+ * keys for other purposes, and an unknown future type should degrade rather than fail the fetch.
156
+ */
157
+ function toSigningKey(jwk) {
158
+ if (!jwk || typeof jwk !== 'object')
159
+ return undefined;
160
+ if (typeof jwk.kid !== 'string' || jwk.kid === '')
161
+ return undefined;
162
+ if (jwk.use !== undefined && jwk.use !== 'sig')
163
+ return undefined;
164
+ if (!SUPPORTED_KEY_TYPES.includes(jwk.kty))
165
+ return undefined;
166
+ try {
167
+ return (0, node_crypto_1.createPublicKey)({ key: jwk, format: 'jwk' });
168
+ }
169
+ catch (error) {
170
+ logger.warn?.(`Skipping unusable JWK ${jwk.kid}: ${error.message}`);
171
+ return undefined;
172
+ }
173
+ }
174
+ async function fetchIssuerKeys(issuer) {
175
+ // Sampled before the first await, so any clear during the fetch is detectable at the end.
176
+ const generation = cacheGeneration;
177
+ const jwksUri = await discoverJwksUri(issuer);
178
+ const jwks = await fetchJson(jwksUri);
179
+ if (!Array.isArray(jwks?.keys))
180
+ throw new hdbError_ts_1.ServerError(`JWKS at ${jwksUri} has no keys array`);
181
+ const keys = new Map();
182
+ for (const jwk of jwks.keys) {
183
+ const key = toSigningKey(jwk);
184
+ if (key)
185
+ keys.set(jwk.kid, key);
186
+ }
187
+ if (keys.size === 0)
188
+ throw new hdbError_ts_1.ServerError(`JWKS at ${jwksUri} contains no usable signing keys`);
189
+ const entry = { keys, fetchedAt: Date.now() };
190
+ // Still returned to the caller that asked for it — it is freshly fetched and valid — but only
191
+ // cached if no clear happened while this was in flight.
192
+ if (generation === cacheGeneration)
193
+ issuerKeyCache.set(issuer, entry);
194
+ logger.debug?.(`Loaded ${keys.size} signing key(s) for ${issuer}`);
195
+ return entry;
196
+ }
197
+ /** Loads an issuer's keys, collapsing concurrent callers onto one fetch. */
198
+ function loadIssuerKeys(issuer) {
199
+ const existing = inFlightLoads.get(issuer);
200
+ if (existing)
201
+ return existing;
202
+ const load = fetchIssuerKeys(issuer).finally(() => inFlightLoads.delete(issuer));
203
+ inFlightLoads.set(issuer, load);
204
+ return load;
205
+ }
206
+ /** Resolves the public key an issuer used to sign a token, by `kid`. */
207
+ /**
208
+ * `now` exists so the two time-based bounds below can be tested — the cache TTL and, more
209
+ * importantly, the STALE_KEY_GRACE_MS ceiling that stops a pulled key being honored forever through
210
+ * a prolonged outage. Reaching either otherwise needs a cache aged past an hour, and this repo bars
211
+ * new fake timers. Mirrors the `clockTimestamp` seam verifyIdentityToken already takes, rather than
212
+ * inventing a second convention. Callers in production pass nothing.
213
+ */
214
+ async function getSigningKey(issuer, kid, now = Date.now()) {
215
+ if (typeof kid !== 'string' || kid === '')
216
+ throw new hdbError_ts_1.ClientError('Token has no key id', 401);
217
+ const normalizedIssuer = normalizeIssuer(issuer);
218
+ const cached = issuerKeyCache.get(normalizedIssuer);
219
+ if (cached && now - cached.fetchedAt < JWKS_CACHE_TTL_MS) {
220
+ const key = cached.keys.get(kid);
221
+ if (key)
222
+ return key;
223
+ // Unknown kid against a still-fresh set: refetch once, then hold the line for the window. The
224
+ // timestamp is recorded before the fetch so a failing issuer is rate-limited like a succeeding one.
225
+ if (now - (unknownKidRefetchAt.get(normalizedIssuer) ?? 0) < MIN_REFETCH_INTERVAL_MS) {
226
+ throw new hdbError_ts_1.ClientError('Token signing key is not recognized', 401);
227
+ }
228
+ unknownKidRefetchAt.set(normalizedIssuer, now);
229
+ }
230
+ // A usable stale key, if the cache is expired but still inside the grace window.
231
+ const staleKey = cached && now - cached.fetchedAt < STALE_KEY_GRACE_MS ? cached.keys.get(kid) : undefined;
232
+ // Skip the fetch entirely while a recent one is known to have failed. Not gated on having a stale
233
+ // key: the fetch is the expensive part, and the issuer we have NEVER cached is the worse case —
234
+ // there is nothing to fall back to, so without this every request rides the full discovery and
235
+ // timeout. Refusing for the backoff interval bounds what an anonymous caller can drive, at the
236
+ // cost of a legitimate first exchange waiting out that interval after a blip. Fails closed.
237
+ if (now - (failedRefreshAt.get(normalizedIssuer) ?? 0) < FAILED_REFRESH_BACKOFF_MS) {
238
+ if (staleKey)
239
+ return staleKey;
240
+ throw new hdbError_ts_1.ServerError(`Signing keys for ${normalizedIssuer} are temporarily unavailable; a recent refresh failed`);
241
+ }
242
+ let refreshed;
243
+ try {
244
+ refreshed = await loadIssuerKeys(normalizedIssuer);
245
+ }
246
+ catch (error) {
247
+ // Recorded whether or not a stale key rescues this request, so the backoff also covers the
248
+ // issuer whose keys we have never held.
249
+ failedRefreshAt.set(normalizedIssuer, now);
250
+ if (!staleKey)
251
+ throw error;
252
+ logger.warn?.(`Using cached signing key for ${normalizedIssuer}; refresh failed: ${error.message}`);
253
+ return staleKey;
254
+ }
255
+ failedRefreshAt.delete(normalizedIssuer);
256
+ const key = refreshed.keys.get(kid);
257
+ if (!key)
258
+ throw new hdbError_ts_1.ClientError('Token signing key is not recognized', 401);
259
+ return key;
260
+ }
261
+ //# sourceMappingURL=jwks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jwks.js","sourceRoot":"","sources":["../../../../security/authn/oidc/jwks.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AA2DH,wCAMC;AAMD,0CAWC;AA6HD,sCA6CC;AA1PD,6CAA8D;AAC9D,kEAAmE;AACnE,qEAA+E;AAE/E,MAAM,MAAM,GAAG,IAAA,yBAAa,EAAC,YAAY,CAAC,CAAC;AAE3C,MAAM,cAAc,GAAG,mCAAmC,CAAC;AAC3D,iEAAiE;AACjE,MAAM,iBAAiB,GAAG,SAAS,CAAC;AACpC,kEAAkE;AAClE,MAAM,uBAAuB,GAAG,MAAM,CAAC;AACvC;;;GAGG;AACH,MAAM,kBAAkB,GAAG,UAAU,CAAC;AACtC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,MAAM,kBAAkB,GAAG,SAAS,CAAC;AACrC,oFAAoF;AACpF,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AAO1C,MAAM,cAAc,GAAG,IAAI,GAAG,EAAsB,CAAC;AACrD,MAAM,aAAa,GAAG,IAAI,GAAG,EAA+B,CAAC;AAC7D;;;;GAIG;AACH,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAkB,CAAC;AAEtD;;;;;;;GAOG;AACH,MAAM,eAAe,GAAG,IAAI,GAAG,EAAkB,CAAC;AAElD,oGAAoG;AACpG,MAAM,yBAAyB,GAAG,MAAM,CAAC;AAEzC;;;;;GAKG;AACH,IA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CAAC,CAAC;QAC/G,OAAO,QAAQ,CAAC;IACjB,CAAC;IACD,eAAe,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAEzC,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpC,IAAI,CAAC,GAAG;QAAE,MAAM,IAAI,yBAAW,CAAC,qCAAqC,EAAE,GAAG,CAAC,CAAC;IAC5E,OAAO,GAAG,CAAC;AACZ,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Fallback profile for issuers with no registered provider profile (#2171).
3
+ *
4
+ * Strict rather than permissive: the policy must pin `sub`. That is what makes workload identity work
5
+ * with zero provider code — a Kubernetes service-account token
6
+ * (`system:serviceaccount:<namespace>:<name>`), a GCP service account, and a SPIFFE SVID all carry a
7
+ * stable canonical subject, so pinning it identifies exactly one principal.
8
+ *
9
+ * GitHub Actions needs its own profile precisely because its `sub` is the one claim you should not
10
+ * pin: it varies by trigger, and its format changed for repositories created after 2026-07-15.
11
+ */
12
+ import type { IdentityProviderProfile } from './index.ts';
13
+ export declare const genericProfile: IdentityProviderProfile;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ /**
3
+ * Fallback profile for issuers with no registered provider profile (#2171).
4
+ *
5
+ * Strict rather than permissive: the policy must pin `sub`. That is what makes workload identity work
6
+ * with zero provider code — a Kubernetes service-account token
7
+ * (`system:serviceaccount:<namespace>:<name>`), a GCP service account, and a SPIFFE SVID all carry a
8
+ * stable canonical subject, so pinning it identifies exactly one principal.
9
+ *
10
+ * GitHub Actions needs its own profile precisely because its `sub` is the one claim you should not
11
+ * pin: it varies by trigger, and its format changed for repositories created after 2026-07-15.
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.genericProfile = void 0;
15
+ const hdbError_ts_1 = require("../../../../utility/errors/hdbError.js");
16
+ exports.genericProfile = {
17
+ name: 'generic OIDC',
18
+ assertPolicyIsSpecific(policyClaims) {
19
+ if (policyClaims.sub === undefined) {
20
+ throw new hdbError_ts_1.ClientError('claims must pin `sub` for an issuer with no registered provider profile — it is the only ' +
21
+ 'claim every OIDC issuer defines as identifying a single principal. Register a provider ' +
22
+ 'profile if this issuer needs richer rules.');
23
+ }
24
+ },
25
+ // No known shared default audience; the required `sub` pin already binds the policy to one principal.
26
+ assertAudienceIsSpecific() { },
27
+ normalizeClaims(payload) {
28
+ return { ...payload };
29
+ },
30
+ describePrincipal(claims) {
31
+ return typeof claims.sub === 'string' ? claims.sub : 'unknown principal';
32
+ },
33
+ };
34
+ //# sourceMappingURL=generic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generic.js","sourceRoot":"","sources":["../../../../../security/authn/oidc/providers/generic.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,wEAAqE;AAIxD,QAAA,cAAc,GAA4B;IACtD,IAAI,EAAE,cAAc;IAEpB,sBAAsB,CAAC,YAA6C;QACnE,IAAI,YAAY,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;YACpC,MAAM,IAAI,yBAAW,CACpB,2FAA2F;gBAC1F,yFAAyF;gBACzF,4CAA4C,CAC7C,CAAC;QACH,CAAC;IACF,CAAC;IAED,sGAAsG;IACtG,wBAAwB,KAAU,CAAC;IAEnC,eAAe,CAAC,OAAoB;QACnC,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC;IACvB,CAAC;IAED,iBAAiB,CAAC,MAAmB;QACpC,OAAO,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,mBAAmB,CAAC;IAC1E,CAAC;CACD,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * GitHub Actions provider profile (#2171).
3
+ *
4
+ * The only module that should know anything about GitHub. Its rules are deliberately stricter than
5
+ * npm's trusted-publishing model, and scoping them here means that strictness never constrains
6
+ * another issuer.
7
+ */
8
+ import type { IdentityProviderProfile } from './index.ts';
9
+ /** Returns undefined rather than guessing when the value is not a ref-qualified reference. */
10
+ export declare function splitWorkflowPath(workflowRef: unknown): string | undefined;
11
+ export declare const githubActionsProfile: IdentityProviderProfile;