@decaf-ts/integrations 0.1.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 (376) hide show
  1. package/.dockerignore +0 -0
  2. package/.gitlab-ci.yml +197 -0
  3. package/.prettierrc +9 -0
  4. package/.snyk +12 -0
  5. package/LICENSE.md +21 -0
  6. package/README.md +22 -0
  7. package/dist/integrations.cjs +2 -0
  8. package/dist/integrations.cjs.map +1 -0
  9. package/dist/integrations.js +2 -0
  10. package/dist/integrations.js.map +1 -0
  11. package/docker/1password-compose.yml +24 -0
  12. package/docker/aws-compose.yml +24 -0
  13. package/docker/azure-compose.yml +23 -0
  14. package/docker/compose.integration.yml +164 -0
  15. package/docker/gcp-compose.yml +16 -0
  16. package/docker/keycloak-compose.yml +24 -0
  17. package/docker/kibana-compose.yml +67 -0
  18. package/docker/vault-compose.yml +25 -0
  19. package/eslint.config.js +32 -0
  20. package/jest.config.cjs +48 -0
  21. package/lib/cjs/docker/DockerComposeService.cjs +152 -0
  22. package/lib/cjs/docker/DockerComposeService.cjs.map +1 -0
  23. package/lib/cjs/docker/index.cjs +24 -0
  24. package/lib/cjs/docker/index.cjs.map +1 -0
  25. package/lib/cjs/index.cjs +29 -0
  26. package/lib/cjs/index.cjs.map +1 -0
  27. package/lib/cjs/keycloak/index.cjs +26 -0
  28. package/lib/cjs/keycloak/index.cjs.map +1 -0
  29. package/lib/cjs/keycloak/services/KeycloakAuthService.cjs +189 -0
  30. package/lib/cjs/keycloak/services/KeycloakAuthService.cjs.map +1 -0
  31. package/lib/cjs/keycloak/services/KeycloakClientService.cjs +245 -0
  32. package/lib/cjs/keycloak/services/KeycloakClientService.cjs.map +1 -0
  33. package/lib/cjs/keycloak/services/KeycloakIdentityProviderService.cjs +234 -0
  34. package/lib/cjs/keycloak/services/KeycloakIdentityProviderService.cjs.map +1 -0
  35. package/lib/cjs/keycloak/services/KeycloakRealmService.cjs +202 -0
  36. package/lib/cjs/keycloak/services/KeycloakRealmService.cjs.map +1 -0
  37. package/lib/cjs/keycloak/services/KeycloakRoleService.cjs +249 -0
  38. package/lib/cjs/keycloak/services/KeycloakRoleService.cjs.map +1 -0
  39. package/lib/cjs/keycloak/services/KeycloakService.cjs +225 -0
  40. package/lib/cjs/keycloak/services/KeycloakService.cjs.map +1 -0
  41. package/lib/cjs/keycloak/services/KeycloakUserService.cjs +279 -0
  42. package/lib/cjs/keycloak/services/KeycloakUserService.cjs.map +1 -0
  43. package/lib/cjs/keycloak/services/index.cjs +30 -0
  44. package/lib/cjs/keycloak/services/index.cjs.map +1 -0
  45. package/lib/cjs/keycloak/types.cjs +4 -0
  46. package/lib/cjs/keycloak/types.cjs.map +1 -0
  47. package/lib/cjs/kibana/helpers.cjs +62 -0
  48. package/lib/cjs/kibana/helpers.cjs.map +1 -0
  49. package/lib/cjs/kibana/index.cjs +27 -0
  50. package/lib/cjs/kibana/index.cjs.map +1 -0
  51. package/lib/cjs/kibana/services/KibanaAuthService.cjs +148 -0
  52. package/lib/cjs/kibana/services/KibanaAuthService.cjs.map +1 -0
  53. package/lib/cjs/kibana/services/KibanaDashboardService.cjs +228 -0
  54. package/lib/cjs/kibana/services/KibanaDashboardService.cjs.map +1 -0
  55. package/lib/cjs/kibana/services/KibanaDataViewService.cjs +216 -0
  56. package/lib/cjs/kibana/services/KibanaDataViewService.cjs.map +1 -0
  57. package/lib/cjs/kibana/services/KibanaRoleService.cjs +184 -0
  58. package/lib/cjs/kibana/services/KibanaRoleService.cjs.map +1 -0
  59. package/lib/cjs/kibana/services/KibanaService.cjs +167 -0
  60. package/lib/cjs/kibana/services/KibanaService.cjs.map +1 -0
  61. package/lib/cjs/kibana/services/KibanaSpaceService.cjs +179 -0
  62. package/lib/cjs/kibana/services/KibanaSpaceService.cjs.map +1 -0
  63. package/lib/cjs/kibana/services/KibanaUserService.cjs +198 -0
  64. package/lib/cjs/kibana/services/KibanaUserService.cjs.map +1 -0
  65. package/lib/cjs/kibana/services/index.cjs +24 -0
  66. package/lib/cjs/kibana/services/index.cjs.map +1 -0
  67. package/lib/cjs/kibana/types.cjs +4 -0
  68. package/lib/cjs/kibana/types.cjs.map +1 -0
  69. package/lib/cjs/nest/authService.cjs +37 -0
  70. package/lib/cjs/nest/authService.cjs.map +1 -0
  71. package/lib/cjs/nest/index.cjs +29 -0
  72. package/lib/cjs/nest/index.cjs.map +1 -0
  73. package/lib/cjs/nest/keycloakAuthHandler.cjs +44 -0
  74. package/lib/cjs/nest/keycloakAuthHandler.cjs.map +1 -0
  75. package/lib/cjs/nest/keycloakModule.cjs +25 -0
  76. package/lib/cjs/nest/keycloakModule.cjs.map +1 -0
  77. package/lib/cjs/nest/types.cjs +4 -0
  78. package/lib/cjs/nest/types.cjs.map +1 -0
  79. package/lib/cjs/nest/utils.cjs +68 -0
  80. package/lib/cjs/nest/utils.cjs.map +1 -0
  81. package/lib/cjs/secrets/aws/AwsSecretService.cjs +307 -0
  82. package/lib/cjs/secrets/aws/AwsSecretService.cjs.map +1 -0
  83. package/lib/cjs/secrets/aws/AwsSecretServiceConfig.cjs +4 -0
  84. package/lib/cjs/secrets/aws/AwsSecretServiceConfig.cjs.map +1 -0
  85. package/lib/cjs/secrets/aws/index.cjs +25 -0
  86. package/lib/cjs/secrets/aws/index.cjs.map +1 -0
  87. package/lib/cjs/secrets/azure/AzureKeyVaultSecretService.cjs +245 -0
  88. package/lib/cjs/secrets/azure/AzureKeyVaultSecretService.cjs.map +1 -0
  89. package/lib/cjs/secrets/azure/AzureKeyVaultSecretServiceConfig.cjs +4 -0
  90. package/lib/cjs/secrets/azure/AzureKeyVaultSecretServiceConfig.cjs.map +1 -0
  91. package/lib/cjs/secrets/azure/index.cjs +25 -0
  92. package/lib/cjs/secrets/azure/index.cjs.map +1 -0
  93. package/lib/cjs/secrets/core/SecretErrors.cjs +70 -0
  94. package/lib/cjs/secrets/core/SecretErrors.cjs.map +1 -0
  95. package/lib/cjs/secrets/core/SecretName.cjs +54 -0
  96. package/lib/cjs/secrets/core/SecretName.cjs.map +1 -0
  97. package/lib/cjs/secrets/core/SecretReference.cjs +51 -0
  98. package/lib/cjs/secrets/core/SecretReference.cjs.map +1 -0
  99. package/lib/cjs/secrets/core/SecretSerialization.cjs +52 -0
  100. package/lib/cjs/secrets/core/SecretSerialization.cjs.map +1 -0
  101. package/lib/cjs/secrets/core/SecretService.cjs +19 -0
  102. package/lib/cjs/secrets/core/SecretService.cjs.map +1 -0
  103. package/lib/cjs/secrets/core/SecretTypes.cjs +4 -0
  104. package/lib/cjs/secrets/core/SecretTypes.cjs.map +1 -0
  105. package/lib/cjs/secrets/core/index.cjs +29 -0
  106. package/lib/cjs/secrets/core/index.cjs.map +1 -0
  107. package/lib/cjs/secrets/gcp/GcpSecretManagerService.cjs +332 -0
  108. package/lib/cjs/secrets/gcp/GcpSecretManagerService.cjs.map +1 -0
  109. package/lib/cjs/secrets/gcp/GcpSecretManagerServiceConfig.cjs +4 -0
  110. package/lib/cjs/secrets/gcp/GcpSecretManagerServiceConfig.cjs.map +1 -0
  111. package/lib/cjs/secrets/gcp/index.cjs +25 -0
  112. package/lib/cjs/secrets/gcp/index.cjs.map +1 -0
  113. package/lib/cjs/secrets/index.cjs +25 -0
  114. package/lib/cjs/secrets/index.cjs.map +1 -0
  115. package/lib/cjs/secrets/model/ModelSecretCrypto.cjs +80 -0
  116. package/lib/cjs/secrets/model/ModelSecretCrypto.cjs.map +1 -0
  117. package/lib/cjs/secrets/model/ModelSecretService.cjs +271 -0
  118. package/lib/cjs/secrets/model/ModelSecretService.cjs.map +1 -0
  119. package/lib/cjs/secrets/model/ModelSecretServiceConfig.cjs +4 -0
  120. package/lib/cjs/secrets/model/ModelSecretServiceConfig.cjs.map +1 -0
  121. package/lib/cjs/secrets/model/Secret.cjs +49 -0
  122. package/lib/cjs/secrets/model/Secret.cjs.map +1 -0
  123. package/lib/cjs/secrets/model/index.cjs +26 -0
  124. package/lib/cjs/secrets/model/index.cjs.map +1 -0
  125. package/lib/cjs/secrets/onepassword/OnePasswordSecretService.cjs +402 -0
  126. package/lib/cjs/secrets/onepassword/OnePasswordSecretService.cjs.map +1 -0
  127. package/lib/cjs/secrets/onepassword/OnePasswordSecretServiceConfig.cjs +4 -0
  128. package/lib/cjs/secrets/onepassword/OnePasswordSecretServiceConfig.cjs.map +1 -0
  129. package/lib/cjs/secrets/onepassword/index.cjs +25 -0
  130. package/lib/cjs/secrets/onepassword/index.cjs.map +1 -0
  131. package/lib/cjs/secrets/vault/VaultSecretService.cjs +318 -0
  132. package/lib/cjs/secrets/vault/VaultSecretService.cjs.map +1 -0
  133. package/lib/cjs/secrets/vault/VaultSecretServiceConfig.cjs +4 -0
  134. package/lib/cjs/secrets/vault/VaultSecretServiceConfig.cjs.map +1 -0
  135. package/lib/cjs/secrets/vault/index.cjs +25 -0
  136. package/lib/cjs/secrets/vault/index.cjs.map +1 -0
  137. package/lib/cjs/utils.cjs +43 -0
  138. package/lib/cjs/utils.cjs.map +1 -0
  139. package/lib/esm/docker/DockerComposeService.js +140 -0
  140. package/lib/esm/docker/DockerComposeService.js.map +1 -0
  141. package/lib/esm/docker/index.js +7 -0
  142. package/lib/esm/docker/index.js.map +1 -0
  143. package/lib/esm/index.js +11 -0
  144. package/lib/esm/index.js.map +1 -0
  145. package/lib/esm/keycloak/index.js +9 -0
  146. package/lib/esm/keycloak/index.js.map +1 -0
  147. package/lib/esm/keycloak/services/KeycloakAuthService.js +148 -0
  148. package/lib/esm/keycloak/services/KeycloakAuthService.js.map +1 -0
  149. package/lib/esm/keycloak/services/KeycloakClientService.js +204 -0
  150. package/lib/esm/keycloak/services/KeycloakClientService.js.map +1 -0
  151. package/lib/esm/keycloak/services/KeycloakIdentityProviderService.js +193 -0
  152. package/lib/esm/keycloak/services/KeycloakIdentityProviderService.js.map +1 -0
  153. package/lib/esm/keycloak/services/KeycloakRealmService.js +161 -0
  154. package/lib/esm/keycloak/services/KeycloakRealmService.js.map +1 -0
  155. package/lib/esm/keycloak/services/KeycloakRoleService.js +208 -0
  156. package/lib/esm/keycloak/services/KeycloakRoleService.js.map +1 -0
  157. package/lib/esm/keycloak/services/KeycloakService.js +180 -0
  158. package/lib/esm/keycloak/services/KeycloakService.js.map +1 -0
  159. package/lib/esm/keycloak/services/KeycloakUserService.js +238 -0
  160. package/lib/esm/keycloak/services/KeycloakUserService.js.map +1 -0
  161. package/lib/esm/keycloak/services/index.js +13 -0
  162. package/lib/esm/keycloak/services/index.js.map +1 -0
  163. package/lib/esm/keycloak/types.js +2 -0
  164. package/lib/esm/keycloak/types.js.map +1 -0
  165. package/lib/esm/kibana/helpers.js +56 -0
  166. package/lib/esm/kibana/helpers.js.map +1 -0
  167. package/lib/esm/kibana/index.js +10 -0
  168. package/lib/esm/kibana/index.js.map +1 -0
  169. package/lib/esm/kibana/services/KibanaAuthService.js +107 -0
  170. package/lib/esm/kibana/services/KibanaAuthService.js.map +1 -0
  171. package/lib/esm/kibana/services/KibanaDashboardService.js +182 -0
  172. package/lib/esm/kibana/services/KibanaDashboardService.js.map +1 -0
  173. package/lib/esm/kibana/services/KibanaDataViewService.js +170 -0
  174. package/lib/esm/kibana/services/KibanaDataViewService.js.map +1 -0
  175. package/lib/esm/kibana/services/KibanaRoleService.js +138 -0
  176. package/lib/esm/kibana/services/KibanaRoleService.js.map +1 -0
  177. package/lib/esm/kibana/services/KibanaService.js +126 -0
  178. package/lib/esm/kibana/services/KibanaService.js.map +1 -0
  179. package/lib/esm/kibana/services/KibanaSpaceService.js +133 -0
  180. package/lib/esm/kibana/services/KibanaSpaceService.js.map +1 -0
  181. package/lib/esm/kibana/services/KibanaUserService.js +152 -0
  182. package/lib/esm/kibana/services/KibanaUserService.js.map +1 -0
  183. package/lib/esm/kibana/services/index.js +13 -0
  184. package/lib/esm/kibana/services/index.js.map +1 -0
  185. package/lib/esm/kibana/types.js +2 -0
  186. package/lib/esm/kibana/types.js.map +1 -0
  187. package/lib/esm/nest/authService.js +32 -0
  188. package/lib/esm/nest/authService.js.map +1 -0
  189. package/lib/esm/nest/index.js +12 -0
  190. package/lib/esm/nest/index.js.map +1 -0
  191. package/lib/esm/nest/keycloakAuthHandler.js +39 -0
  192. package/lib/esm/nest/keycloakAuthHandler.js.map +1 -0
  193. package/lib/esm/nest/keycloakModule.js +19 -0
  194. package/lib/esm/nest/keycloakModule.js.map +1 -0
  195. package/lib/esm/nest/types.js +2 -0
  196. package/lib/esm/nest/types.js.map +1 -0
  197. package/lib/esm/nest/utils.js +60 -0
  198. package/lib/esm/nest/utils.js.map +1 -0
  199. package/lib/esm/secrets/aws/AwsSecretService.js +302 -0
  200. package/lib/esm/secrets/aws/AwsSecretService.js.map +1 -0
  201. package/lib/esm/secrets/aws/AwsSecretServiceConfig.js +2 -0
  202. package/lib/esm/secrets/aws/AwsSecretServiceConfig.js.map +1 -0
  203. package/lib/esm/secrets/aws/index.js +8 -0
  204. package/lib/esm/secrets/aws/index.js.map +1 -0
  205. package/lib/esm/secrets/azure/AzureKeyVaultSecretService.js +240 -0
  206. package/lib/esm/secrets/azure/AzureKeyVaultSecretService.js.map +1 -0
  207. package/lib/esm/secrets/azure/AzureKeyVaultSecretServiceConfig.js +2 -0
  208. package/lib/esm/secrets/azure/AzureKeyVaultSecretServiceConfig.js.map +1 -0
  209. package/lib/esm/secrets/azure/index.js +8 -0
  210. package/lib/esm/secrets/azure/index.js.map +1 -0
  211. package/lib/esm/secrets/core/SecretErrors.js +61 -0
  212. package/lib/esm/secrets/core/SecretErrors.js.map +1 -0
  213. package/lib/esm/secrets/core/SecretName.js +49 -0
  214. package/lib/esm/secrets/core/SecretName.js.map +1 -0
  215. package/lib/esm/secrets/core/SecretReference.js +45 -0
  216. package/lib/esm/secrets/core/SecretReference.js.map +1 -0
  217. package/lib/esm/secrets/core/SecretSerialization.js +47 -0
  218. package/lib/esm/secrets/core/SecretSerialization.js.map +1 -0
  219. package/lib/esm/secrets/core/SecretService.js +14 -0
  220. package/lib/esm/secrets/core/SecretService.js.map +1 -0
  221. package/lib/esm/secrets/core/SecretTypes.js +2 -0
  222. package/lib/esm/secrets/core/SecretTypes.js.map +1 -0
  223. package/lib/esm/secrets/core/index.js +12 -0
  224. package/lib/esm/secrets/core/index.js.map +1 -0
  225. package/lib/esm/secrets/gcp/GcpSecretManagerService.js +294 -0
  226. package/lib/esm/secrets/gcp/GcpSecretManagerService.js.map +1 -0
  227. package/lib/esm/secrets/gcp/GcpSecretManagerServiceConfig.js +2 -0
  228. package/lib/esm/secrets/gcp/GcpSecretManagerServiceConfig.js.map +1 -0
  229. package/lib/esm/secrets/gcp/index.js +8 -0
  230. package/lib/esm/secrets/gcp/index.js.map +1 -0
  231. package/lib/esm/secrets/index.js +8 -0
  232. package/lib/esm/secrets/index.js.map +1 -0
  233. package/lib/esm/secrets/model/ModelSecretCrypto.js +73 -0
  234. package/lib/esm/secrets/model/ModelSecretCrypto.js.map +1 -0
  235. package/lib/esm/secrets/model/ModelSecretService.js +266 -0
  236. package/lib/esm/secrets/model/ModelSecretService.js.map +1 -0
  237. package/lib/esm/secrets/model/ModelSecretServiceConfig.js +2 -0
  238. package/lib/esm/secrets/model/ModelSecretServiceConfig.js.map +1 -0
  239. package/lib/esm/secrets/model/Secret.js +39 -0
  240. package/lib/esm/secrets/model/Secret.js.map +1 -0
  241. package/lib/esm/secrets/model/index.js +9 -0
  242. package/lib/esm/secrets/model/index.js.map +1 -0
  243. package/lib/esm/secrets/onepassword/OnePasswordSecretService.js +397 -0
  244. package/lib/esm/secrets/onepassword/OnePasswordSecretService.js.map +1 -0
  245. package/lib/esm/secrets/onepassword/OnePasswordSecretServiceConfig.js +2 -0
  246. package/lib/esm/secrets/onepassword/OnePasswordSecretServiceConfig.js.map +1 -0
  247. package/lib/esm/secrets/onepassword/index.js +8 -0
  248. package/lib/esm/secrets/onepassword/index.js.map +1 -0
  249. package/lib/esm/secrets/vault/VaultSecretService.js +312 -0
  250. package/lib/esm/secrets/vault/VaultSecretService.js.map +1 -0
  251. package/lib/esm/secrets/vault/VaultSecretServiceConfig.js +2 -0
  252. package/lib/esm/secrets/vault/VaultSecretServiceConfig.js.map +1 -0
  253. package/lib/esm/secrets/vault/index.js +8 -0
  254. package/lib/esm/secrets/vault/index.js.map +1 -0
  255. package/lib/esm/utils.js +39 -0
  256. package/lib/esm/utils.js.map +1 -0
  257. package/lib/types/docker/DockerComposeService.d.cts +53 -0
  258. package/lib/types/docker/DockerComposeService.d.mts +53 -0
  259. package/lib/types/docker/index.d.cts +6 -0
  260. package/lib/types/docker/index.d.mts +6 -0
  261. package/lib/types/index.d.cts +10 -0
  262. package/lib/types/index.d.mts +10 -0
  263. package/lib/types/keycloak/index.d.cts +8 -0
  264. package/lib/types/keycloak/index.d.mts +8 -0
  265. package/lib/types/keycloak/services/KeycloakAuthService.d.cts +20 -0
  266. package/lib/types/keycloak/services/KeycloakAuthService.d.mts +20 -0
  267. package/lib/types/keycloak/services/KeycloakClientService.d.cts +25 -0
  268. package/lib/types/keycloak/services/KeycloakClientService.d.mts +25 -0
  269. package/lib/types/keycloak/services/KeycloakIdentityProviderService.d.cts +23 -0
  270. package/lib/types/keycloak/services/KeycloakIdentityProviderService.d.mts +23 -0
  271. package/lib/types/keycloak/services/KeycloakRealmService.d.cts +31 -0
  272. package/lib/types/keycloak/services/KeycloakRealmService.d.mts +31 -0
  273. package/lib/types/keycloak/services/KeycloakRoleService.d.cts +29 -0
  274. package/lib/types/keycloak/services/KeycloakRoleService.d.mts +29 -0
  275. package/lib/types/keycloak/services/KeycloakService.d.cts +38 -0
  276. package/lib/types/keycloak/services/KeycloakService.d.mts +38 -0
  277. package/lib/types/keycloak/services/KeycloakUserService.d.cts +46 -0
  278. package/lib/types/keycloak/services/KeycloakUserService.d.mts +46 -0
  279. package/lib/types/keycloak/services/index.d.cts +12 -0
  280. package/lib/types/keycloak/services/index.d.mts +12 -0
  281. package/lib/types/keycloak/types.d.cts +103 -0
  282. package/lib/types/keycloak/types.d.mts +103 -0
  283. package/lib/types/kibana/helpers.d.cts +9 -0
  284. package/lib/types/kibana/helpers.d.mts +9 -0
  285. package/lib/types/kibana/index.d.cts +9 -0
  286. package/lib/types/kibana/index.d.mts +9 -0
  287. package/lib/types/kibana/services/KibanaAuthService.d.cts +16 -0
  288. package/lib/types/kibana/services/KibanaAuthService.d.mts +16 -0
  289. package/lib/types/kibana/services/KibanaDashboardService.d.cts +31 -0
  290. package/lib/types/kibana/services/KibanaDashboardService.d.mts +31 -0
  291. package/lib/types/kibana/services/KibanaDataViewService.d.cts +23 -0
  292. package/lib/types/kibana/services/KibanaDataViewService.d.mts +23 -0
  293. package/lib/types/kibana/services/KibanaRoleService.d.cts +19 -0
  294. package/lib/types/kibana/services/KibanaRoleService.d.mts +19 -0
  295. package/lib/types/kibana/services/KibanaService.d.cts +55 -0
  296. package/lib/types/kibana/services/KibanaService.d.mts +55 -0
  297. package/lib/types/kibana/services/KibanaSpaceService.d.cts +20 -0
  298. package/lib/types/kibana/services/KibanaSpaceService.d.mts +20 -0
  299. package/lib/types/kibana/services/KibanaUserService.d.cts +19 -0
  300. package/lib/types/kibana/services/KibanaUserService.d.mts +19 -0
  301. package/lib/types/kibana/services/index.d.cts +12 -0
  302. package/lib/types/kibana/services/index.d.mts +12 -0
  303. package/lib/types/kibana/types.d.cts +75 -0
  304. package/lib/types/kibana/types.d.mts +75 -0
  305. package/lib/types/nest/authService.d.cts +9 -0
  306. package/lib/types/nest/authService.d.mts +9 -0
  307. package/lib/types/nest/index.d.cts +11 -0
  308. package/lib/types/nest/index.d.mts +11 -0
  309. package/lib/types/nest/keycloakAuthHandler.d.cts +7 -0
  310. package/lib/types/nest/keycloakAuthHandler.d.mts +7 -0
  311. package/lib/types/nest/keycloakModule.d.cts +15 -0
  312. package/lib/types/nest/keycloakModule.d.mts +15 -0
  313. package/lib/types/nest/types.d.cts +48 -0
  314. package/lib/types/nest/types.d.mts +48 -0
  315. package/lib/types/nest/utils.d.cts +11 -0
  316. package/lib/types/nest/utils.d.mts +11 -0
  317. package/lib/types/secrets/aws/AwsSecretService.d.cts +19 -0
  318. package/lib/types/secrets/aws/AwsSecretService.d.mts +19 -0
  319. package/lib/types/secrets/aws/AwsSecretServiceConfig.d.cts +16 -0
  320. package/lib/types/secrets/aws/AwsSecretServiceConfig.d.mts +16 -0
  321. package/lib/types/secrets/aws/index.d.cts +7 -0
  322. package/lib/types/secrets/aws/index.d.mts +7 -0
  323. package/lib/types/secrets/azure/AzureKeyVaultSecretService.d.cts +20 -0
  324. package/lib/types/secrets/azure/AzureKeyVaultSecretService.d.mts +20 -0
  325. package/lib/types/secrets/azure/AzureKeyVaultSecretServiceConfig.d.cts +11 -0
  326. package/lib/types/secrets/azure/AzureKeyVaultSecretServiceConfig.d.mts +11 -0
  327. package/lib/types/secrets/azure/index.d.cts +7 -0
  328. package/lib/types/secrets/azure/index.d.mts +7 -0
  329. package/lib/types/secrets/core/SecretErrors.d.cts +15 -0
  330. package/lib/types/secrets/core/SecretErrors.d.mts +15 -0
  331. package/lib/types/secrets/core/SecretName.d.cts +2 -0
  332. package/lib/types/secrets/core/SecretName.d.mts +2 -0
  333. package/lib/types/secrets/core/SecretReference.d.cts +13 -0
  334. package/lib/types/secrets/core/SecretReference.d.mts +13 -0
  335. package/lib/types/secrets/core/SecretSerialization.d.cts +3 -0
  336. package/lib/types/secrets/core/SecretSerialization.d.mts +3 -0
  337. package/lib/types/secrets/core/SecretService.d.cts +22 -0
  338. package/lib/types/secrets/core/SecretService.d.mts +22 -0
  339. package/lib/types/secrets/core/SecretTypes.d.cts +76 -0
  340. package/lib/types/secrets/core/SecretTypes.d.mts +76 -0
  341. package/lib/types/secrets/core/index.d.cts +11 -0
  342. package/lib/types/secrets/core/index.d.mts +11 -0
  343. package/lib/types/secrets/gcp/GcpSecretManagerService.d.cts +20 -0
  344. package/lib/types/secrets/gcp/GcpSecretManagerService.d.mts +20 -0
  345. package/lib/types/secrets/gcp/GcpSecretManagerServiceConfig.d.cts +15 -0
  346. package/lib/types/secrets/gcp/GcpSecretManagerServiceConfig.d.mts +15 -0
  347. package/lib/types/secrets/gcp/index.d.cts +7 -0
  348. package/lib/types/secrets/gcp/index.d.mts +7 -0
  349. package/lib/types/secrets/index.d.cts +7 -0
  350. package/lib/types/secrets/index.d.mts +7 -0
  351. package/lib/types/secrets/model/ModelSecretCrypto.d.cts +11 -0
  352. package/lib/types/secrets/model/ModelSecretCrypto.d.mts +11 -0
  353. package/lib/types/secrets/model/ModelSecretService.d.cts +21 -0
  354. package/lib/types/secrets/model/ModelSecretService.d.mts +21 -0
  355. package/lib/types/secrets/model/ModelSecretServiceConfig.d.cts +10 -0
  356. package/lib/types/secrets/model/ModelSecretServiceConfig.d.mts +10 -0
  357. package/lib/types/secrets/model/Secret.d.cts +24 -0
  358. package/lib/types/secrets/model/Secret.d.mts +24 -0
  359. package/lib/types/secrets/model/index.d.cts +8 -0
  360. package/lib/types/secrets/model/index.d.mts +8 -0
  361. package/lib/types/secrets/onepassword/OnePasswordSecretService.d.cts +22 -0
  362. package/lib/types/secrets/onepassword/OnePasswordSecretService.d.mts +22 -0
  363. package/lib/types/secrets/onepassword/OnePasswordSecretServiceConfig.d.cts +13 -0
  364. package/lib/types/secrets/onepassword/OnePasswordSecretServiceConfig.d.mts +13 -0
  365. package/lib/types/secrets/onepassword/index.d.cts +7 -0
  366. package/lib/types/secrets/onepassword/index.d.mts +7 -0
  367. package/lib/types/secrets/vault/VaultSecretService.d.cts +37 -0
  368. package/lib/types/secrets/vault/VaultSecretService.d.mts +37 -0
  369. package/lib/types/secrets/vault/VaultSecretServiceConfig.d.cts +13 -0
  370. package/lib/types/secrets/vault/VaultSecretServiceConfig.d.mts +13 -0
  371. package/lib/types/secrets/vault/index.d.cts +7 -0
  372. package/lib/types/secrets/vault/index.d.mts +7 -0
  373. package/lib/types/utils.d.cts +7 -0
  374. package/lib/types/utils.d.mts +7 -0
  375. package/package.json +192 -0
  376. package/renovate.json +21 -0
package/.dockerignore ADDED
File without changes
package/.gitlab-ci.yml ADDED
@@ -0,0 +1,197 @@
1
+ variables:
2
+ FF_USE_FASTZIP: 1
3
+ CACHE_COMPRESSION_LEVEL: "fastest"
4
+ ARTIFACT_COMPRESSION_LEVEL: "fast"
5
+ CACHE_REQUEST_TIMEOUT: 5
6
+ # Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
7
+ DOCKER_HOST: tcp://docker:2375
8
+ DOCKER_TLS_CERTDIR: ""
9
+
10
+ cache:
11
+ - key: apt-$CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
12
+ paths:
13
+ - apt-cache/
14
+
15
+ default:
16
+ image: node:20
17
+ before_script:
18
+ - |
19
+ if [[ ! -f package.json ]]; then
20
+ echo "No package.json found! A package.json file is required to publish a package to GitLab's NPM registry."
21
+ echo 'For more information, see https://docs.gitlab.com/ee/user/packages/npm_registry/#creating-a-project'
22
+ exit 1
23
+ fi
24
+ - NPM_PACKAGE_NAME=$(node -p "require('./package.json').name")
25
+ - NPM_PACKAGE_VERSION=$(node -p "require('./package.json').version")
26
+ - export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
27
+ - apt-get update -yq && apt-get -o dir::cache::archives="$APT_CACHE_DIR" install wget libgbm-dev libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev libasound2 -qy
28
+
29
+ stages:
30
+ - dependencies
31
+ - build
32
+ - test
33
+ - publish
34
+
35
+ install:
36
+ stage: dependencies
37
+ cache:
38
+ - key: dependencies-$CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
39
+ paths:
40
+ - node_modules/
41
+ - .npm/
42
+ script:
43
+ - npm ci --cache .npm --prefer-offline
44
+ interruptible: true
45
+ only:
46
+ changes:
47
+ - package-lock.json
48
+ - .gitlab-ci.yml
49
+ retry:
50
+ max: 2
51
+ when:
52
+ - runner_system_failure
53
+ - stuck_or_timeout_failure
54
+
55
+ build:
56
+ stage: build
57
+ cache:
58
+ - key: dependencies-$CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
59
+ paths:
60
+ - node_modules/
61
+ - .npm/
62
+ policy: pull
63
+ - key: build-$CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
64
+ paths:
65
+ - lib/
66
+ - dist/
67
+ policy: push
68
+ script:
69
+ - npm run build:prod
70
+ rules:
71
+ - if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_MESSAGE =~ /-no-ci/'
72
+ when: never
73
+ - if: '$CI_COMMIT_BRANCH == "master"'
74
+ changes:
75
+ - src/**/*
76
+ - tests/**/*
77
+ - package-lock.json
78
+ - tsconfig.json
79
+ - .gitlab-ci.yml
80
+ - if: '$CI_COMMIT_TAG'
81
+ interruptible: true
82
+
83
+ tests:
84
+ stage: test
85
+ needs: ["build"]
86
+ script:
87
+ - npm run coverage
88
+ cache:
89
+ - key: dependencies-$CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
90
+ paths:
91
+ - node_modules/
92
+ - .npm/
93
+ policy: pull
94
+ - key: build-$CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
95
+ paths:
96
+ - lib/
97
+ - dist/
98
+ policy: pull
99
+ - key: test-$CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
100
+ paths:
101
+ - workdocs/coverage/
102
+ - workdocs/badges/
103
+ policy: push
104
+ rules:
105
+ - if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_MESSAGE =~ /-no-ci/'
106
+ when: never
107
+ - if: '$CI_COMMIT_BRANCH == "master"'
108
+ changes:
109
+ - src/**/*
110
+ - tests/**/*
111
+ - package-lock.json
112
+ - tsconfig.json
113
+ - .gitlab-ci.yml
114
+ - if: '$CI_COMMIT_TAG'
115
+ artifacts:
116
+ when: always
117
+ reports:
118
+ junit:
119
+ - workdocs/coverage/junit-report.xml
120
+ coverage: '/^Statements.*?:.*?(\d+\.\d+)%/'
121
+ interruptible: true
122
+
123
+ npm-publish:
124
+ stage: publish
125
+ needs: ["tests", "build"]
126
+ cache:
127
+ - key: dependencies-$CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
128
+ paths:
129
+ - node_modules/
130
+ - .npm/
131
+ policy: pull
132
+ - key: build-$CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
133
+ paths:
134
+ - lib/
135
+ - dist/
136
+ policy: pull
137
+ script:
138
+ - echo "Attempting to publish package ${NPM_PACKAGE_NAME} version ${NPM_PACKAGE_VERSION} to GitLab's NPM registry."
139
+ - TOKEN=${CI_JOB_TOKEN} npm publish
140
+ rules:
141
+ - if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_MESSAGE =~ /-no-ci/'
142
+ when: never
143
+ - if: '$CI_COMMIT_TAG'
144
+ when: always
145
+
146
+ docker-publish:
147
+ stage: publish
148
+ needs: [ "tests", "build" ]
149
+ image: docker:20.10.21-dind
150
+ services:
151
+ - docker:20.10.21-dind
152
+ variables:
153
+ BASE_NAME: ts-workspace
154
+ LATEST_NAME: ${BASE_NAME}-latest
155
+ before_script:
156
+ - apk add jq
157
+ - VERSION=$(cat package.json | jq -r '.version')
158
+ - IMAGE_NAME="${IMAGE_BASE_NAME}-${VERSION}"
159
+ - echo "Image name is ${IMAGE_NAME}"
160
+ - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
161
+ script:
162
+ - echo "Building docker image to be published on $CI_REGISTRY."
163
+ - docker build --network host -t $CI_REGISTRY/decaf-ts/ts-workspace:${IMAGE_NAME} -t $CI_REGISTRY/decaf-ts/ts-workspace:${LATEST_NAME} -f Dockerfile .
164
+ - docker push $CI_REGISTRY/decaf-ts/ts-workspace:${IMAGE_NAME}
165
+ - docker push $CI_REGISTRY/decaf-ts/ts-workspace:${LATEST_NAME}
166
+ rules:
167
+ - if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_MESSAGE =~ /-no-ci/'
168
+ when: never
169
+ - if: '$CI_COMMIT_BRANCH == "master"'
170
+ changes:
171
+ - Dockerfile
172
+
173
+ pages:
174
+ stage: publish
175
+ cache:
176
+ - key: dependencies-$CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
177
+ paths:
178
+ - node_modules/
179
+ - .npm/
180
+ policy: pull
181
+ - key: test-$CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
182
+ paths:
183
+ - workdocs/coverage/
184
+ - workdocs/badges/
185
+ policy: pull
186
+ script:
187
+ - npm run docs
188
+ - mv docs public
189
+ artifacts:
190
+ paths:
191
+ - public
192
+ rules:
193
+ - if: '$CI_COMMIT_BRANCH == "master"'
194
+ changes:
195
+ - workdocs/**/*
196
+ - if: '$CI_COMMIT_TAG'
197
+ interruptible: true
package/.prettierrc ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "trailingComma": "es5",
3
+ "max-len": {
4
+ "tabWidth": 2,
5
+ "code": 100,
6
+ "ignoreComments": true,
7
+ "ignoreTrailingComments": true
8
+ }
9
+ }
package/.snyk ADDED
@@ -0,0 +1,12 @@
1
+ ignore: {}
2
+ patch: {}
3
+ exclude:
4
+ global:
5
+ - dist/**
6
+ - lib/**
7
+ - node_modules/**
8
+ - tests/**
9
+ - workdocs/**
10
+ - gulpfile.js
11
+ - eslint.config.js
12
+ - jest.config.ts
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Tiago Venceslau
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # Decaf Integrations
2
+
3
+ `@decaf-ts/integrations` centralizes reusable helpers for Keycloak, Kibana, and Nest-style auth.
4
+
5
+ ## Exports
6
+
7
+ - `@decaf-ts/integrations`
8
+ - `@decaf-ts/integrations/keycloak`
9
+ - `@decaf-ts/integrations/kibana`
10
+ - `@decaf-ts/integrations/nest`
11
+
12
+ ## Included Modules
13
+
14
+ - Keycloak provisioning helpers for realms, users, roles, identity providers, and client-scoped role wiring.
15
+ - Kibana provisioning helpers for spaces, data views, dashboards, and realm-specific access control.
16
+ - Nest-style JWT helpers for extracting Keycloak roles and user context from access tokens.
17
+
18
+ ## Notes
19
+
20
+ - Each subpath can be imported independently.
21
+ - Peer dependencies are marked optional so consumers only install what they actually use.
22
+ - The package is intended to be consumed from the Decaf workspace, but it is self-contained at the source level.
@@ -0,0 +1,2 @@
1
+ var e,o;e=this,o=(e,o,r,t)=>{"use strict";e.COMMIT="9134d75",e.FULL_VERSION="0.1.0-9134d75",e.PACKAGE_NAME="@decaf-ts/integrations",e.VERSION="0.1.0",e.execWithLogging=async(e,d,i,s=r.LogLevel.info)=>(i.debug("Executing: "+e),new Promise((r,c)=>{const n=o.exec(e,d);let a="",l="";n.stdout?.on("data",e=>{a+=e,i[s](e.trim())}),n.stderr?.on("data",e=>{l+=e,i.error(e.trim())}),n.on("close",e=>{0===e?(i.silly("Command completed successfully"),r({stdout:a,stderr:l})):(i.critical("Command failed with code "+e,l),c(new t.InternalError(`Command failed with code ${e}: ${l}`)))}),n.on("error",e=>{i.critical("Command execution error",e),c(e)})}))},"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("child_process"),require("@decaf-ts/logging"),require("@decaf-ts/db-decorators")):"function"==typeof define&&define.amd?define(["exports","child_process","@decaf-ts/logging","@decaf-ts/db-decorators"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).integrations={},e.childProcess,e.decafTsLogging,e.decafTsDbDecorators);
2
+ //# sourceMappingURL=integrations.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integrations.cjs","sources":["../src/index.ts","../src/utils.ts"],"sourcesContent":[null,null],"names":["async","command","options","log","level","LogLevel","info","debug","Promise","resolve","reject","child","exec","stdout","stderr","on","data","trim","error","code","silly","critical","InternalError","err"],"mappings":"mDASsB,4BAEM,kCAEQ,wBANL,gCCExBA,MACLC,EACAC,EACAC,EACAC,EAAkBC,EAAAA,SAASC,QAE3BH,EAAII,MAAM,cAAcN,GAEjB,IAAIO,QAAQ,CAACC,EAASC,KAC3B,MAAMC,EAAQC,EAAAA,KAAKX,EAASC,GAE5B,IAAIW,EAAS,GACTC,EAAS,GAEbH,EAAME,QAAQE,GAAG,OAASC,IACxBH,GAAUG,EACVb,EAAIC,GAAOY,EAAKC,UAGlBN,EAAMG,QAAQC,GAAG,OAASC,IACxBF,GAAUE,EACVb,EAAIe,MAAMF,EAAKC,UAGjBN,EAAMI,GAAG,QAAUI,IACJ,IAATA,GACFhB,EAAIiB,MAAM,kCACVX,EAAQ,CAAEI,SAAQC,aAElBX,EAAIkB,SAAS,4BAA4BF,EAAQL,GACjDJ,EACE,IAAIY,EAAAA,cAAc,4BAA4BH,MAASL,SAK7DH,EAAMI,GAAG,QAAUQ,IACjBpB,EAAIkB,SAAS,0BAA2BE,GACxCb,EAAOa"}
@@ -0,0 +1,2 @@
1
+ import{exec as o}from"child_process";import{LogLevel as r}from"@decaf-ts/logging";import{InternalError as t}from"@decaf-ts/db-decorators";async function e(e,c,d,i=r.info){return d.debug("Executing: "+e),new Promise((r,n)=>{const m=o(e,c);let s="",a="";m.stdout?.on("data",o=>{s+=o,d[i](o.trim())}),m.stderr?.on("data",o=>{a+=o,d.error(o.trim())}),m.on("close",o=>{0===o?(d.silly("Command completed successfully"),r({stdout:s,stderr:a})):(d.critical("Command failed with code "+o,a),n(new t(`Command failed with code ${o}: ${a}`)))}),m.on("error",o=>{d.critical("Command execution error",o),n(o)})})}const c="##VERSION##",d="##COMMIT##",i="##FULL_VERSION##",n="##PACKAGE##";export{d as COMMIT,i as FULL_VERSION,n as PACKAGE_NAME,c as VERSION,e as execWithLogging};
2
+ //# sourceMappingURL=integrations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integrations.js","sources":["../src/utils.ts","../src/index.ts"],"sourcesContent":[null,null],"names":["async","execWithLogging","command","options","log","level","LogLevel","info","debug","Promise","resolve","reject","child","exec","stdout","stderr","on","data","trim","error","code","silly","critical","InternalError","err","VERSION","COMMIT","FULL_VERSION","PACKAGE_NAME"],"mappings":"0IASOA,eAAeC,EACpBC,EACAC,EACAC,EACAC,EAAkBC,EAASC,MAI3B,OAFAH,EAAII,MAAM,cAAcN,GAEjB,IAAIO,QAAQ,CAACC,EAASC,KAC3B,MAAMC,EAAQC,EAAKX,EAASC,GAE5B,IAAIW,EAAS,GACTC,EAAS,GAEbH,EAAME,QAAQE,GAAG,OAASC,IACxBH,GAAUG,EACVb,EAAIC,GAAOY,EAAKC,UAGlBN,EAAMG,QAAQC,GAAG,OAASC,IACxBF,GAAUE,EACVb,EAAIe,MAAMF,EAAKC,UAGjBN,EAAMI,GAAG,QAAUI,IACJ,IAATA,GACFhB,EAAIiB,MAAM,kCACVX,EAAQ,CAAEI,SAAQC,aAElBX,EAAIkB,SAAS,4BAA4BF,EAAQL,GACjDJ,EACE,IAAIY,EAAc,4BAA4BH,MAASL,SAK7DH,EAAMI,GAAG,QAAUQ,IACjBpB,EAAIkB,SAAS,0BAA2BE,GACxCb,EAAOa,MAGb,CC3CO,MAAMC,EAAkB,cAElBC,EAAS,aAETC,EAAe,mBAEfC,EAAuB"}
@@ -0,0 +1,24 @@
1
+ version: "3.8"
2
+
3
+ services:
4
+ 1password:
5
+ image: none
6
+ build:
7
+ context: .
8
+ dockerfile: Dockerfile.1password
9
+ container_name: 1password-cli
10
+ restart: unless-stopped
11
+ volumes:
12
+ - op-data:/home/op/.1password
13
+ environment:
14
+ - OP_ACCOUNT_ID=
15
+ - OP_SESSION=
16
+ healthcheck:
17
+ test: ["CMD", "op", "--version"]
18
+ interval: 30s
19
+ timeout: 10s
20
+ retries: 3
21
+ start_period: 10s
22
+
23
+ volumes:
24
+ op-data:
@@ -0,0 +1,24 @@
1
+ services:
2
+ localstack:
3
+ image: localstack/localstack:3.5.0
4
+ container_name: localstack
5
+ ports:
6
+ - "4566:4566"
7
+ environment:
8
+ - LOCALSTACK_HOSTNAME=localhost
9
+ - DEFAULT_REGION=us-east-1
10
+ - SERVICES=secretsmanager
11
+ - DEBUG=${DEBUG:-}
12
+ volumes:
13
+ - localstack-data:/var/lib/localstack
14
+ healthcheck:
15
+ test: ["CMD", "curl", "-f", "http://localhost:4566/_localstack/health"]
16
+ interval: 30s
17
+ timeout: 10s
18
+ retries: 5
19
+ start_period: 60s
20
+ restart: unless-stopped
21
+
22
+ volumes:
23
+ localstack-data:
24
+ name: localstack-data
@@ -0,0 +1,23 @@
1
+ version: "3.8"
2
+
3
+ services:
4
+ azurite:
5
+ image: mcr.microsoft.com/azure-storage/azurite:3.33.0
6
+ container_name: azurite
7
+ restart: unless-stopped
8
+ command: azurite -l /data --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost 0.0.0.0
9
+ ports:
10
+ - "10000:10000"
11
+ - "10001:10001"
12
+ - "10002:10002"
13
+ volumes:
14
+ - azurite-data:/data
15
+ healthcheck:
16
+ test: ["CMD", "curl", "-f", "http://localhost:10000"]
17
+ interval: 10s
18
+ timeout: 5s
19
+ retries: 5
20
+ start_period: 10s
21
+
22
+ volumes:
23
+ azurite-data:
@@ -0,0 +1,164 @@
1
+ version: "3.8"
2
+
3
+ services:
4
+ # Keycloak - Identity Management
5
+ keycloak:
6
+ image: quay.io/keycloak/keycloak:24.0.0
7
+ container_name: keycloak-integration
8
+ command: start-dev
9
+ ports:
10
+ - "8080:8080"
11
+ environment:
12
+ - KC_DB=dev-file
13
+ - KC_HTTP_ENABLED=true
14
+ - KC_HOSTNAME_STRICT=false
15
+ - KC_HEALTH_ENABLED=true
16
+ - KC_READY_ENABLED=true
17
+ - KEYCLOAK_ADMIN=admin
18
+ - KEYCLOAK_ADMIN_PASSWORD=admin
19
+ healthcheck:
20
+ test: ["CMD", "curl", "-f", "http://localhost:8080/health/ready"]
21
+ interval: 30s
22
+ timeout: 10s
23
+ retries: 5
24
+ start_period: 40s
25
+ restart: unless-stopped
26
+
27
+ # Elasticsearch + Kibana - Search and Visualization
28
+ elasticsearch:
29
+ image: docker.elastic.co/elasticsearch/elasticsearch:8.14.3
30
+ container_name: elasticsearch-integration
31
+ environment:
32
+ - discovery.type=single-node
33
+ - xpack.security.enabled=true
34
+ - xpack.security.enrollment.enabled=false
35
+ - ELASTIC_PASSWORD=elastic123
36
+ - discovery.seed_hosts=[]
37
+ - cluster.initial_master_nodes=elasticsearch
38
+ - network.host=0.0.0.0
39
+ - http.port=9200
40
+ ports:
41
+ - "9200:9200"
42
+ volumes:
43
+ - elasticsearch-data:/usr/share/elasticsearch/data
44
+ healthcheck:
45
+ test: ["CMD", "curl", "-s", "-f", "http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=50s"]
46
+ interval: 30s
47
+ timeout: 10s
48
+ retries: 5
49
+ start_period: 60s
50
+ restart: unless-stopped
51
+
52
+ kibana:
53
+ image: docker.elastic.co/kibana/kibana:8.14.3
54
+ container_name: kibana-integration
55
+ depends_on:
56
+ elasticsearch:
57
+ condition: service_healthy
58
+ environment:
59
+ - ELASTICSEARCH_HOSTS=http://elasticsearch:9200
60
+ - ELASTICSEARCH_USERNAME=elastic
61
+ - ELASTICSEARCH_PASSWORD=elastic123
62
+ - XPACK_SECURITY_ENABLED=true
63
+ - XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
64
+ ports:
65
+ - "5601:5601"
66
+ healthcheck:
67
+ test: ["CMD", "curl", "-s", "-f", "http://localhost:5601/api/status"]
68
+ interval: 30s
69
+ timeout: 10s
70
+ retries: 5
71
+ start_period: 30s
72
+ restart: unless-stopped
73
+
74
+ # LocalStack - AWS Services Emulator
75
+ localstack:
76
+ image: localstack/localstack:3.5.0
77
+ container_name: localstack-integration
78
+ ports:
79
+ - "4566:4566"
80
+ - "4571:4571"
81
+ environment:
82
+ - LOCALSTACK_HOSTNAME=localhost
83
+ - DEFAULT_REGION=us-east-1
84
+ - SERVICES=/aws-sdk
85
+ - DEBUG=${DEBUG:-}
86
+ - LOG squash
87
+ volumes:
88
+ - localstack-data:/var/lib/localstack
89
+ - ./init:/docker-entrypoint-initaws.d
90
+ healthcheck:
91
+ test: ["CMD", "curl", "-f", "http://localhost:4566/_localstack/health"]
92
+ interval: 30s
93
+ timeout: 10s
94
+ retries: 5
95
+ start_period: 60s
96
+ restart: unless-stopped
97
+
98
+ # Azurite - Azure Storage emulator
99
+ azurite:
100
+ image: mcr.microsoft.com/azure-storage/azurite:3.33.0
101
+ container_name: azurite-integration
102
+ restart: unless-stopped
103
+ command: azurite -l /data --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost 0.0.0.0
104
+ ports:
105
+ - "10000:10000"
106
+ - "10001:10001"
107
+ - "10002:10002"
108
+ volumes:
109
+ - azurite-data:/data
110
+ healthcheck:
111
+ test: ["CMD", "curl", "-f", "http://localhost:10000"]
112
+ interval: 10s
113
+ timeout: 5s
114
+ retries: 5
115
+ start_period: 10s
116
+
117
+ # GCP Emulator
118
+ gcp-emulator:
119
+ image: jldec/gcp-emulator:latest
120
+ container_name: gcp-emulator-integration
121
+ restart: unless-stopped
122
+ ports:
123
+ - "8080:8080"
124
+ volumes:
125
+ - gcp-data:/data
126
+ healthcheck:
127
+ test: ["CMD", "curl", "-f", "http://localhost:8080"]
128
+ interval: 10s
129
+ timeout: 5s
130
+ retries: 5
131
+ start_period: 10s
132
+
133
+ # Hashicorp Vault
134
+ vault:
135
+ image: hashicorp/vault:1.15.6
136
+ container_name: vault-integration
137
+ restart: unless-stopped
138
+ environment:
139
+ - VAULT_DEV_ROOT_TOKEN_ID=my-root-token
140
+ - VAULT_DEV_LISTEN_ADDRESS=0.0.0.0:8200
141
+ ports:
142
+ - "8200:8200"
143
+ volumes:
144
+ - vault-data:/vault/data
145
+ cap_add:
146
+ - IPC_LOCK
147
+ healthcheck:
148
+ test: ["CMD", "vault", "status"]
149
+ interval: 10s
150
+ timeout: 5s
151
+ retries: 5
152
+ start_period: 5s
153
+
154
+ volumes:
155
+ elasticsearch-data:
156
+ name: elasticsearch-data
157
+ localstack-data:
158
+ name: localstack-data
159
+ azurite-data:
160
+ name: azurite-data
161
+ gcp-data:
162
+ name: gcp-data
163
+ vault-data:
164
+ name: vault-data
@@ -0,0 +1,16 @@
1
+ services:
2
+ gcp-emulator:
3
+ image: ghcr.io/blackwell-systems/gcp-secret-manager-emulator-dual:latest
4
+ container_name: gcp-emulator
5
+ restart: unless-stopped
6
+ environment:
7
+ - GCP_MOCK_LOG_LEVEL=info
8
+ ports:
9
+ - "8080:8080"
10
+ - "9091:9090"
11
+ healthcheck:
12
+ test: ["CMD", "wget", "-q", "-O", "-", "http://localhost:8080/v1/projects/healthcheck/secrets"]
13
+ interval: 10s
14
+ timeout: 5s
15
+ retries: 5
16
+ start_period: 10s
@@ -0,0 +1,24 @@
1
+ services:
2
+ keycloak:
3
+ image: quay.io/keycloak/keycloak:24.0.0
4
+ container_name: keycloak
5
+ command: start-dev
6
+ ports:
7
+ - "8180:8080"
8
+ environment:
9
+ - KC_DB=dev-file
10
+ - KC_HTTP_ENABLED=true
11
+ - KC_HOSTNAME_STRICT=false
12
+ - KC_HEALTH_ENABLED=true
13
+ - KC_READY_ENABLED=true
14
+ - KEYCLOAK_ADMIN=admin
15
+ - KEYCLOAK_ADMIN_PASSWORD=admin
16
+ healthcheck:
17
+ # quay.io/keycloak/keycloak ships without curl/wget; probe the health
18
+ # endpoint over /dev/tcp instead.
19
+ test: ["CMD-SHELL", "exec 3<>/dev/tcp/localhost/8080 && echo -e 'GET /health/ready HTTP/1.1\r\nhost: localhost\r\nConnection: close\r\n\r\n' >&3 && cat <&3 | grep -q '\"status\": \"UP\"'"]
20
+ interval: 10s
21
+ timeout: 5s
22
+ retries: 10
23
+ start_period: 40s
24
+ restart: unless-stopped
@@ -0,0 +1,67 @@
1
+ services:
2
+ elasticsearch:
3
+ image: docker.elastic.co/elasticsearch/elasticsearch:8.14.3
4
+ container_name: elasticsearch
5
+ environment:
6
+ - discovery.type=single-node
7
+ - xpack.security.enabled=true
8
+ - xpack.security.enrollment.enabled=false
9
+ - ELASTIC_PASSWORD=elastic123
10
+ - network.host=0.0.0.0
11
+ - http.port=9200
12
+ - cluster.routing.allocation.disk.threshold_enabled=false
13
+ ports:
14
+ - "9200:9200"
15
+ volumes:
16
+ - elasticsearch-data:/usr/share/elasticsearch/data
17
+ healthcheck:
18
+ test: ["CMD", "curl", "-s", "-f", "-u", "elastic:elastic123", "http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=50s"]
19
+ interval: 30s
20
+ timeout: 10s
21
+ retries: 5
22
+ start_period: 60s
23
+ restart: unless-stopped
24
+
25
+ kibana-setup:
26
+ image: docker.elastic.co/elasticsearch/elasticsearch:8.14.3
27
+ container_name: kibana-setup
28
+ depends_on:
29
+ elasticsearch:
30
+ condition: service_healthy
31
+ restart: "no"
32
+ entrypoint: ["sh", "-c"]
33
+ command:
34
+ - >
35
+ curl -s -f --max-time 10 --retry 10 --retry-delay 3 --retry-connrefused
36
+ -u elastic:elastic123 -X POST
37
+ -H "Content-Type: application/json"
38
+ http://elasticsearch:9200/_security/user/kibana_system/_password
39
+ -d '{"password":"kibana123"}'
40
+
41
+ kibana:
42
+ image: docker.elastic.co/kibana/kibana:8.14.3
43
+ container_name: kibana
44
+ depends_on:
45
+ elasticsearch:
46
+ condition: service_healthy
47
+ kibana-setup:
48
+ condition: service_completed_successfully
49
+ environment:
50
+ - ELASTICSEARCH_HOSTS=http://elasticsearch:9200
51
+ - ELASTICSEARCH_USERNAME=kibana_system
52
+ - ELASTICSEARCH_PASSWORD=kibana123
53
+ - XPACK_SECURITY_ENABLED=true
54
+ - XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
55
+ ports:
56
+ - "5601:5601"
57
+ healthcheck:
58
+ test: ["CMD", "curl", "-s", "-f", "http://localhost:5601/api/status"]
59
+ interval: 30s
60
+ timeout: 10s
61
+ retries: 5
62
+ start_period: 30s
63
+ restart: unless-stopped
64
+
65
+ volumes:
66
+ elasticsearch-data:
67
+ name: elasticsearch-data
@@ -0,0 +1,25 @@
1
+ version: "3.8"
2
+
3
+ services:
4
+ vault:
5
+ image: hashicorp/vault:1.15.6
6
+ container_name: vault
7
+ restart: unless-stopped
8
+ environment:
9
+ - VAULT_DEV_ROOT_TOKEN_ID=my-root-token
10
+ - VAULT_DEV_LISTEN_ADDRESS=0.0.0.0:8200
11
+ ports:
12
+ - "8200:8200"
13
+ volumes:
14
+ - vault-data:/vault/data
15
+ cap_add:
16
+ - IPC_LOCK
17
+ healthcheck:
18
+ test: ["CMD", "vault", "status"]
19
+ interval: 10s
20
+ timeout: 5s
21
+ retries: 5
22
+ start_period: 5s
23
+
24
+ volumes:
25
+ vault-data: