From 865ba45dc1d2850bd13eafc003bcbf6e9fb792c2 Mon Sep 17 00:00:00 2001 From: Vaibhav Bhalla Date: Tue, 16 Sep 2025 11:14:49 +0530 Subject: [PATCH] feat(ci-cd): add trivy scan add trivy scan and fix sonarqube issues GH-155 --- .github/workflows/trivy.yaml | 29 + README.md | 3 - package-lock.json | 1702 +++++++++++++++++++++- package.json | 1 + src/__tests__/unit/vault-connect.unit.ts | 165 ++- src/services/vault-connect.service.ts | 5 +- src/services/vault-connector.ts | 62 +- trivy.yml | 16 + 8 files changed, 1814 insertions(+), 169 deletions(-) create mode 100644 .github/workflows/trivy.yaml create mode 100644 trivy.yml diff --git a/.github/workflows/trivy.yaml b/.github/workflows/trivy.yaml new file mode 100644 index 0000000..90a1f93 --- /dev/null +++ b/.github/workflows/trivy.yaml @@ -0,0 +1,29 @@ +# This is a basic workflow to help you get started with Actions + +name: Trivy Scan + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + pull_request: + branches: [master] + types: [opened, synchronize, reopened] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "trivy" + trivy: + # The type of runner that the job will run on + runs-on: [self-hosted, linux, codebuild] + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + + - name: Run Trivy vulnerability scanner in repo mode + uses: aquasecurity/trivy-action@0.28.0 + with: + scan-type: "fs" + scan-ref: "${{ github.workspace }}" + trivy-config: "${{ github.workspace }}/trivy.yml" diff --git a/README.md b/README.md index ba7751a..85cb426 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,6 @@ Sonar Quality Gate - -Synk Status - GitHub contributors diff --git a/package-lock.json b/package-lock.json index 8fe280d..60cda23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,18 @@ { "name": "@sourceloop/vault", - "version": "7.0.3", + "version": "8.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@sourceloop/vault", - "version": "7.0.3", + "version": "8.0.0", "license": "MIT", "dependencies": { "@loopback/boot": "^8.0.4", "@loopback/core": "^7.0.3", "@loopback/rest": "^15.0.4", + "@sourceloop/core": "^20.0.0", "node-vault": "^0.10.2", "tslib": "^2.0.0" }, @@ -345,6 +346,24 @@ "node": ">=6.9.0" } }, + "node_modules/@casbin/expression-eval": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@casbin/expression-eval/-/expression-eval-5.3.0.tgz", + "integrity": "sha512-mMTHMYXcnBBv/zMvxMpcdVyt2bfw8Y0GnmRLbkFQ1CVJZb4XZp7xWjRh7ymOLuJdsu58rci9gmOOv/99DtJvPA==", + "license": "MIT", + "dependencies": { + "jsep": "^0.3.0" + } + }, + "node_modules/@casbin/expression-eval/node_modules/jsep": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-0.3.5.tgz", + "integrity": "sha512-AoRLBDc6JNnKjNcmonituEABS5bcfqDhQAWWXNTFrqu6nVXBpBAGfcoTGZMFlIrh9FjmE1CQyX9CTNwZrXMMDA==", + "license": "MIT", + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/@colors/colors": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", @@ -650,6 +669,17 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@dabh/diagnostics": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", + "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", + "license": "MIT", + "dependencies": { + "colorspace": "1.1.x", + "enabled": "2.0.x", + "kuler": "^2.0.0" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", @@ -1141,6 +1171,32 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@jsep-plugin/assignment": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@jsep-plugin/assignment/-/assignment-1.3.0.tgz", + "integrity": "sha512-VVgV+CXrhbMI3aSusQyclHkenWSAm95WaiKrMxRFam3JSUiIaQjoMIw2sEs/OX4XifnqeQUN4DYbJjlA8EfktQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 10.16.0" + }, + "peerDependencies": { + "jsep": "^0.4.0||^1.0.0" + } + }, + "node_modules/@jsep-plugin/regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.4.tgz", + "integrity": "sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 10.16.0" + }, + "peerDependencies": { + "jsep": "^0.4.0||^1.0.0" + } + }, "node_modules/@kwsites/file-exists": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@kwsites/file-exists/-/file-exists-1.1.1.tgz", @@ -1454,6 +1510,24 @@ "@loopback/core": "^7.0.0" } }, + "node_modules/@loopback/rest-explorer": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/@loopback/rest-explorer/-/rest-explorer-8.0.5.tgz", + "integrity": "sha512-hgSh90ZM/SDFT8uWgCEzKEMLXwjqtxO6ympiQ/mVt2WOCs6w0SKcTMaP7l/vrEd4QVTCHtF1LcJGtkngcxb+Vw==", + "license": "MIT", + "dependencies": { + "ejs": "^3.1.10", + "swagger-ui-dist": "5.28.1", + "tslib": "^2.8.1" + }, + "engines": { + "node": "20 || 22 || 24" + }, + "peerDependencies": { + "@loopback/core": "^7.0.0", + "@loopback/rest": "^15.0.1" + } + }, "node_modules/@loopback/service-proxy": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/@loopback/service-proxy/-/service-proxy-8.0.3.tgz", @@ -1495,6 +1569,50 @@ "node": "20 || 22 || 24" } }, + "node_modules/@messageformat/core": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@messageformat/core/-/core-3.4.0.tgz", + "integrity": "sha512-NgCFubFFIdMWJGN5WuQhHCNmzk7QgiVfrViFxcS99j7F5dDS5EP6raR54I+2ydhe4+5/XTn/YIEppFaqqVWHsw==", + "license": "MIT", + "dependencies": { + "@messageformat/date-skeleton": "^1.0.0", + "@messageformat/number-skeleton": "^1.0.0", + "@messageformat/parser": "^5.1.0", + "@messageformat/runtime": "^3.0.1", + "make-plural": "^7.0.0", + "safe-identifier": "^0.4.1" + } + }, + "node_modules/@messageformat/date-skeleton": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@messageformat/date-skeleton/-/date-skeleton-1.1.0.tgz", + "integrity": "sha512-rmGAfB1tIPER+gh3p/RgA+PVeRE/gxuQ2w4snFWPF5xtb5mbWR7Cbw7wCOftcUypbD6HVoxrVdyyghPm3WzP5A==", + "license": "MIT" + }, + "node_modules/@messageformat/number-skeleton": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@messageformat/number-skeleton/-/number-skeleton-1.2.0.tgz", + "integrity": "sha512-xsgwcL7J7WhlHJ3RNbaVgssaIwcEyFkBqxHdcdaiJzwTZAWEOD8BuUFxnxV9k5S0qHN3v/KzUpq0IUpjH1seRg==", + "license": "MIT" + }, + "node_modules/@messageformat/parser": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@messageformat/parser/-/parser-5.1.1.tgz", + "integrity": "sha512-3p0YRGCcTUCYvBKLIxtDDyrJ0YijGIwrTRu1DT8gIviIDZru8H23+FkY6MJBzM1n9n20CiM4VeDYuBsrrwnLjg==", + "license": "MIT", + "dependencies": { + "moo": "^0.5.1" + } + }, + "node_modules/@messageformat/runtime": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@messageformat/runtime/-/runtime-3.0.1.tgz", + "integrity": "sha512-6RU5ol2lDtO8bD9Yxe6CZkl0DArdv0qkuoZC+ZwowU+cdRlVE1157wjCmlA5Rsf1Xc/brACnsZa5PZpEDfTFFg==", + "license": "MIT", + "dependencies": { + "make-plural": "^7.0.0" + } + }, "node_modules/@noble/hashes": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", @@ -1859,6 +1977,13 @@ "node": "*" } }, + "node_modules/@scarf/scarf": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scarf/scarf/-/scarf-1.4.0.tgz", + "integrity": "sha512-xxeapPiUXdZAE3che6f3xogoJPeZgig6omHEy1rIY5WVsB3H2BHNnZH+gHG6x91SCWyQCzWGsuL2Hh3ClO5/qQ==", + "hasInstallScript": true, + "license": "Apache-2.0" + }, "node_modules/@semantic-release/changelog": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/@semantic-release/changelog/-/changelog-6.0.3.tgz", @@ -2167,6 +2292,57 @@ "node": ">=4" } }, + "node_modules/@sourceloop/core": { + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/@sourceloop/core/-/core-20.0.0.tgz", + "integrity": "sha512-Vnu8XriiI99JW59iH4BZb+iibRHzz6HoKfeStlMblQ6XR8tG/6eoE1wMR2kRIiszzegtLoSbJIR46bqx2ZVwnA==", + "license": "MIT", + "dependencies": { + "@loopback/boot": "^8.0.4", + "@loopback/context": "^8.0.3", + "@loopback/core": "^7.0.3", + "@loopback/express": "^8.0.3", + "@loopback/openapi-v3": "^11.0.4", + "@loopback/repository": "^8.0.3", + "@loopback/rest": "^15.0.4", + "@loopback/rest-explorer": "^8.0.4", + "@loopback/service-proxy": "^8.0.3", + "i18n": "^0.15.1", + "jsonwebtoken": "^9.0.0", + "lodash": "^4.17.21", + "logform": "2.7.0", + "loopback-datasource-juggler": "^5.1.3", + "loopback4-authentication": "^13.0.0", + "loopback4-authorization": "^8.0.0", + "loopback4-dynamic-datasource": "^3.0.0", + "loopback4-helmet": "^8.0.0", + "loopback4-ratelimiter": "^8.0.0", + "loopback4-soft-delete": "^11.0.0", + "moment": "^2.29.4", + "moment-timezone": "^0.5.34", + "node-jose": "^2.2.0", + "openapi3-ts": "^2.0.2", + "request-ip": "^3.3.0", + "swagger-stats": "^0.99.5", + "tslib": "^2.6.2", + "winston": "^3.17.0" + }, + "engines": { + "node": ">=20" + }, + "optionalDependencies": { + "crypto-js": "^4.2.0" + }, + "peerDependencies": { + "@loopback/sequelize": "^0.8.0", + "loopback-connector-rest": "^5.0.2" + }, + "peerDependenciesMeta": { + "@loopback/sequelize": { + "optional": true + } + } + }, "node_modules/@tootallnate/once": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", @@ -2374,6 +2550,17 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/pg": { + "version": "8.15.5", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.15.5.tgz", + "integrity": "sha512-LF7lF6zWEKxuT3/OR8wAZGzkg4ENGXFNyiV/JeOt9z5B+0ZVwbql9McqX5c/WStFq1GaGso7H1AzP/qSzmlCKQ==", + "license": "MIT", + "dependencies": { + "@types/node": "*", + "pg-protocol": "*", + "pg-types": "^2.2.0" + } + }, "node_modules/@types/proxyquire": { "version": "1.3.31", "resolved": "https://registry.npmjs.org/@types/proxyquire/-/proxyquire-1.3.31.tgz", @@ -2464,6 +2651,12 @@ "@types/superagent": "*" } }, + "node_modules/@types/triple-beam": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", + "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==", + "license": "MIT" + }, "node_modules/@types/type-is": { "version": "1.6.7", "resolved": "https://registry.npmjs.org/@types/type-is/-/type-is-1.6.7.tgz", @@ -2767,7 +2960,6 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, "license": "MIT", "dependencies": { "debug": "4" @@ -3024,6 +3216,12 @@ "node": ">= 4.0.0" } }, + "node_modules/await-lock": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/await-lock/-/await-lock-2.2.2.tgz", + "integrity": "sha512-aDczADvlvTGajTDjcjpJMqRkOF6Qdz3YbPZm/PyW6tKPkx2hlYBzxMhEywM/tU72HrVZjgl5VCdRuMlA7pZ8Gw==", + "license": "MIT" + }, "node_modules/aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -3039,6 +3237,17 @@ "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", "license": "MIT" }, + "node_modules/axios": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz", + "integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.4", + "proxy-from-env": "^1.1.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -3065,6 +3274,33 @@ ], "license": "MIT" }, + "node_modules/base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/basic-auth/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, "node_modules/bcp47": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/bcp47/-/bcp47-1.1.2.tgz", @@ -3090,6 +3326,13 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/bintrees": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bintrees/-/bintrees-1.0.2.tgz", + "integrity": "sha512-VOMgTMwjAaUG580SXn3LacVgjurrbMme7ZZNYGSSV7mmtY6QQRh0Eg3pwIcntQ77DErK1L0NxkbetjcoXzVwKw==", + "license": "MIT", + "peer": true + }, "node_modules/bl": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", @@ -3176,7 +3419,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -3235,6 +3477,15 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/bson": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.6.tgz", + "integrity": "sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.6.19" + } + }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -3259,6 +3510,12 @@ "ieee754": "^1.1.13" } }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "license": "BSD-3-Clause" + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -3431,6 +3688,69 @@ "cdl": "bin/cdl.js" } }, + "node_modules/casbin": { + "version": "5.38.0", + "resolved": "https://registry.npmjs.org/casbin/-/casbin-5.38.0.tgz", + "integrity": "sha512-0VI0j18XtftaMj3nnv6CM3h0EvtB8IWPdxWD1t1myyUBOUboMSsMrU9PUtYFX9oAAXRpY2DWNTF1mXUG+QcYvw==", + "license": "Apache-2.0", + "dependencies": { + "@casbin/expression-eval": "^5.3.0", + "await-lock": "^2.0.1", + "buffer": "^6.0.3", + "csv-parse": "^5.5.6", + "minimatch": "^7.4.2" + } + }, + "node_modules/casbin-pg-adapter": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/casbin-pg-adapter/-/casbin-pg-adapter-1.4.0.tgz", + "integrity": "sha512-9T0i+t0XwdnsBFl+20ojAED9+05SN4haJDLOJTUh9liHO+yBi6SXwSboD0MLzserFkxCs8VJJ+BNJlavExlU+A==", + "license": "MIT", + "dependencies": { + "casbin": "^5.0.4", + "node-pg-migrate": "^5.1.0", + "pg": "^8.2.1" + } + }, + "node_modules/casbin/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/casbin/node_modules/minimatch": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", + "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -3597,6 +3917,16 @@ "node": ">=0.8" } }, + "node_modules/color": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", + "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.3", + "color-string": "^1.6.0" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -3615,6 +3945,41 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "license": "MIT" }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "license": "MIT", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/color/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "license": "MIT" + }, + "node_modules/colorspace": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", + "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", + "license": "MIT", + "dependencies": { + "color": "^3.1.3", + "text-hex": "1.0.x" + } + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -3775,6 +4140,12 @@ "proto-list": "~1.2.1" } }, + "node_modules/connection-parse": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/connection-parse/-/connection-parse-0.0.7.tgz", + "integrity": "sha512-bTTG28diWg7R7/+qE5NZumwPbCiJOT8uPdZYu674brDjBWQctbaQbYlDKhalS+4i5HxIx+G8dZsnBHKzWpp01A==", + "license": "MIT" + }, "node_modules/constant-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-3.0.4.tgz", @@ -3936,11 +4307,23 @@ "dev": true, "license": "MIT" }, + "node_modules/cookies": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.8.0.tgz", + "integrity": "sha512-8aPsApQfebXnuI+537McwYsDtjVxGm8gTIzQI3FDW6t5t/DAhERxtnbEPN/8RX+uZthoz4eCOgloXaE5cYyNow==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "keygrip": "~1.1.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true, "license": "MIT" }, "node_modules/cors": { @@ -4029,6 +4412,13 @@ "node": "*" } }, + "node_modules/crypto-js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==", + "license": "MIT", + "optional": true + }, "node_modules/crypto-random-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", @@ -4052,6 +4442,12 @@ "node": ">=14" } }, + "node_modules/csv-parse": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-5.6.0.tgz", + "integrity": "sha512-l3nz3euub2QMg5ouu5U09Ew9Wf6/wQ8I++ch1loQ0ljmzhmfZYrH9fflS22i/PQEvsPvxCwxgz5q7UB8K1JO4Q==", + "license": "MIT" + }, "node_modules/cz-conventional-changelog": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/cz-conventional-changelog/-/cz-conventional-changelog-3.3.0.tgz", @@ -4729,6 +5125,15 @@ "node": ">=0.4.0" } }, + "node_modules/denque": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.1.tgz", + "integrity": "sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10" + } + }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -4899,6 +5304,15 @@ "safer-buffer": "^2.1.0" } }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, "node_modules/editor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/editor/-/editor-1.0.0.tgz", @@ -4916,7 +5330,6 @@ "version": "3.1.10", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", - "dev": true, "license": "Apache-2.0", "dependencies": { "jake": "^10.8.5" @@ -4941,6 +5354,12 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "license": "MIT" }, + "node_modules/enabled": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==", + "license": "MIT" + }, "node_modules/encodeurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", @@ -5031,7 +5450,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -5050,6 +5468,12 @@ "dev": true, "license": "MIT" }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "license": "MIT" + }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -5482,6 +5906,18 @@ "url": "https://opencollective.com/express" } }, + "node_modules/express-rate-limit": { + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.11.2.tgz", + "integrity": "sha512-a7uwwfNTh1U60ssiIkuLFWHt4hAC5yxlLGU2VP0X4YNlyEDZAqF4tK3GD3NSitVBrCQmQ0++0uOyFOgC2y4DDw==", + "license": "MIT", + "engines": { + "node": ">= 14" + }, + "peerDependencies": { + "express": "^4 || ^5" + } + }, "node_modules/express/node_modules/body-parser": { "version": "1.20.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", @@ -5669,7 +6105,16 @@ "dev": true, "license": "MIT" }, - "node_modules/fast-safe-stringify": { + "node_modules/fast-printf": { + "version": "1.6.10", + "resolved": "https://registry.npmjs.org/fast-printf/-/fast-printf-1.6.10.tgz", + "integrity": "sha512-GwTgG9O4FVIdShhbVF3JxOgSBY2+ePGsu2V/UONgoCPzF9VY6ZdBMKsHKCYQHZwNk3qNouUolRDsgVxcVA5G1w==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=10.0" + } + }, + "node_modules/fast-safe-stringify": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", @@ -5701,6 +6146,12 @@ "reusify": "^1.0.4" } }, + "node_modules/fecha": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", + "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==", + "license": "MIT" + }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -5744,7 +6195,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", - "dev": true, "license": "Apache-2.0", "dependencies": { "minimatch": "^5.0.1" @@ -5754,7 +6204,6 @@ "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -6001,6 +6450,32 @@ "dev": true, "license": "ISC" }, + "node_modules/fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==", + "license": "MIT" + }, + "node_modules/follow-redirects": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/foreground-child": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", @@ -6042,7 +6517,6 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", - "dev": true, "license": "MIT", "dependencies": { "asynckit": "^0.4.0", @@ -6565,7 +7039,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" @@ -6604,6 +7077,16 @@ "node": ">=8" } }, + "node_modules/hashring": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/hashring/-/hashring-3.2.0.tgz", + "integrity": "sha512-xCMovURClsQZ+TR30icCZj+34Fq1hs0y6YCASD6ZqdRfYRybb5Iadws2WS+w09mGM/kf9xyA5FCdJQGcgcraSA==", + "license": "MIT", + "dependencies": { + "connection-parse": "0.0.x", + "simple-lru-cache": "0.0.x" + } + }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -6636,6 +7119,15 @@ "tslib": "^2.0.3" } }, + "node_modules/helmet": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-5.1.1.tgz", + "integrity": "sha512-/yX0oVZBggA9cLJh8aw3PPCfedBnbd7J2aowjzsaWwZh7/UFY0nccn/aHAggIgWUFfnykX8GKd3a1pSbrmlcVQ==", + "license": "MIT", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/homedir-polyfill": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", @@ -6757,7 +7249,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, "license": "MIT", "dependencies": { "agent-base": "6", @@ -6813,6 +7304,26 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/i18n": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/i18n/-/i18n-0.15.1.tgz", + "integrity": "sha512-yue187t8MqUPMHdKjiZGrX+L+xcUsDClGO0Cz4loaKUOK9WrGw5pgan4bv130utOwX7fHE9w2iUeHFalVQWkXA==", + "license": "MIT", + "dependencies": { + "@messageformat/core": "^3.0.0", + "debug": "^4.3.3", + "fast-printf": "^1.6.9", + "make-plural": "^7.0.0", + "math-interval-parser": "^2.0.1", + "mustache": "^4.2.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/mashpie" + } + }, "node_modules/iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", @@ -7235,7 +7746,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true, "license": "MIT" }, "node_modules/isexe": { @@ -7458,6 +7968,14 @@ "node": ">=8" } }, + "node_modules/jackpot": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/jackpot/-/jackpot-0.0.6.tgz", + "integrity": "sha512-rbWXX+A9ooq03/dfavLg9OXQ8YB57Wa7PY5c4LfU3CgFpwEhhl3WyXTQVurkaT7zBM5I9SSOaiLyJ4I0DQmC0g==", + "dependencies": { + "retry": "0.6.0" + } + }, "node_modules/jackspeak": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", @@ -7477,7 +7995,6 @@ "version": "10.9.4", "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.4.tgz", "integrity": "sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==", - "dev": true, "license": "Apache-2.0", "dependencies": { "async": "^3.2.6", @@ -7581,6 +8098,16 @@ } } }, + "node_modules/jsep": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.4.0.tgz", + "integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 10.16.0" + } + }, "node_modules/jsesc": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", @@ -7694,6 +8221,25 @@ ], "license": "MIT" }, + "node_modules/jsonpath-plus": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", + "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" + }, + "bin": { + "jsonpath": "bin/jsonpath-cli.js", + "jsonpath-plus": "bin/jsonpath-cli.js" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", @@ -7711,6 +8257,28 @@ "node": "*" } }, + "node_modules/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "license": "MIT", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, "node_modules/jsprim": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", @@ -7726,6 +8294,39 @@ "verror": "1.10.0" } }, + "node_modules/jwa": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.2.tgz", + "integrity": "sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw==", + "license": "MIT", + "dependencies": { + "buffer-equal-constant-time": "^1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "license": "MIT", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/keygrip": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.1.0.tgz", + "integrity": "sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==", + "license": "MIT", + "dependencies": { + "tsscmp": "1.0.6" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -7746,6 +8347,12 @@ "node": ">=0.10.0" } }, + "node_modules/kuler": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==", + "license": "MIT" + }, "node_modules/lcid": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/lcid/-/lcid-3.1.1.tgz", @@ -7869,6 +8476,18 @@ "dev": true, "license": "MIT" }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", + "license": "MIT" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", + "license": "MIT" + }, "node_modules/lodash.isfunction": { "version": "3.0.9", "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", @@ -7876,6 +8495,12 @@ "dev": true, "license": "MIT" }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", + "license": "MIT" + }, "node_modules/lodash.ismatch": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", @@ -7883,18 +8508,22 @@ "dev": true, "license": "MIT" }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", + "license": "MIT" + }, "node_modules/lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", - "dev": true, "license": "MIT" }, "node_modules/lodash.isstring": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", - "dev": true, "license": "MIT" }, "node_modules/lodash.kebabcase": { @@ -7925,6 +8554,12 @@ "dev": true, "license": "MIT" }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "license": "MIT" + }, "node_modules/lodash.snakecase": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", @@ -7977,6 +8612,38 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/logform": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.7.0.tgz", + "integrity": "sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==", + "license": "MIT", + "dependencies": { + "@colors/colors": "1.6.0", + "@types/triple-beam": "^1.3.2", + "fecha": "^4.2.0", + "ms": "^2.1.1", + "safe-stable-stringify": "^2.3.1", + "triple-beam": "^1.3.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/logform/node_modules/@colors/colors": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", + "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==", + "license": "MIT", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "license": "Apache-2.0" + }, "node_modules/longest": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-2.0.1.tgz", @@ -8004,6 +8671,40 @@ "node": ">=18" } }, + "node_modules/loopback-connector-rest": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/loopback-connector-rest/-/loopback-connector-rest-5.0.10.tgz", + "integrity": "sha512-Hp1zxppcDZUQGkenubL2BLgCw5IfNgE8Xt/U/dlrtydtqn1JcflI0Yo1gjnv3WksJ02ggpfNXs672PCRIbkZQg==", + "license": "MIT", + "peer": true, + "dependencies": { + "debug": "^4.1.0", + "jsonpath-plus": "^10.0.0", + "lodash": "^4.17.11", + "methods": "^1.1.1", + "mime": "^2.3.1", + "postman-request": "^2.88.1-postman.33", + "qs": "^6.1.0", + "strong-globalize": "^6.0.5", + "traverse": "^0.6.8" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/loopback-connector-rest/node_modules/mime": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "license": "MIT", + "peer": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/loopback-datasource-juggler": { "version": "5.1.11", "resolved": "https://registry.npmjs.org/loopback-datasource-juggler/-/loopback-datasource-juggler-5.1.11.tgz", @@ -8043,6 +8744,123 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/loopback4-authentication": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/loopback4-authentication/-/loopback4-authentication-13.0.0.tgz", + "integrity": "sha512-FG5zEtaCZRZIknuq+Hc/0q2NMJOrIcxubIUJtx3f6vKP/xB4cqcTk/GU/97bcML0FdiPRJ0kLcNJitE9EnMADw==", + "license": "MIT", + "dependencies": { + "@loopback/context": "^8.0.3", + "@loopback/core": "^7.0.3", + "ajv": "^8.11.0", + "https-proxy-agent": "^5.0.0", + "jsonwebtoken": "^9.0.0", + "passport": "^0.7.0", + "passport-http-bearer": "^1.0.1", + "passport-oauth2-client-password": "^0.1.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@loopback/boot": "^8.0.4", + "@loopback/rest": "^15.0.4" + } + }, + "node_modules/loopback4-authorization": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-8.0.0.tgz", + "integrity": "sha512-x1bn+q/B8Z26ScdqbGCIm5K0MnQuF7nLIBhXrfFuheLdi58YHEz3olGXYrj4ebx6plUwvO34FNqGAmVGUM/vXA==", + "license": "MIT", + "dependencies": { + "@loopback/core": "^7.0.3", + "casbin": "^5.32.0", + "casbin-pg-adapter": "^1.4.0", + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/loopback4-dynamic-datasource": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/loopback4-dynamic-datasource/-/loopback4-dynamic-datasource-3.0.0.tgz", + "integrity": "sha512-pIxt3+SM3VljeSdecxNAenGn/0FNEtHRZ/inVAjMfjMG5zhC6QQkHi69Ni8nny5B50hYqA9hlUamn/M13+HhSA==", + "license": "MIT", + "dependencies": { + "@loopback/repository": "^8.0.3", + "@loopback/rest": "^15.0.4", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@loopback/core": "^7.0.3" + } + }, + "node_modules/loopback4-helmet": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/loopback4-helmet/-/loopback4-helmet-8.0.0.tgz", + "integrity": "sha512-FwG62HBfeFWjxotLePo5n8vVUp78WYf2LtGevS3lzGhva55d4Dmh9TsG+WiQqOjIN6RJd4mmQKHIbaRcNq5+Ww==", + "dependencies": { + "@loopback/boot": "^8.0.4", + "@loopback/context": "^8.0.3", + "@loopback/core": "^7.0.3", + "@loopback/rest": "^15.0.4", + "helmet": "^5.1.1" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/loopback4-ratelimiter": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/loopback4-ratelimiter/-/loopback4-ratelimiter-8.0.0.tgz", + "integrity": "sha512-n8NmtDsMVa413MmpRKx2P/j/z9FajdcnrjR/8nEELa/4trZoqLBzDYBy1dukNnk5W7/wcSBaNq1+EACWflKrnA==", + "license": "MIT", + "dependencies": { + "@loopback/boot": "^8.0.4", + "@loopback/context": "^8.0.3", + "@loopback/core": "^7.0.3", + "@loopback/repository": "^8.0.3", + "@loopback/rest": "^15.0.4", + "express-rate-limit": "^6.4.0", + "rate-limit-memcached": "^0.6.0", + "rate-limit-mongo": "^2.3.2", + "rate-limit-redis": "^3.0.1" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/loopback4-soft-delete": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/loopback4-soft-delete/-/loopback4-soft-delete-11.0.0.tgz", + "integrity": "sha512-MWBX+0W26us3v+VAb2uZOgkEaD4/P6Wt2shOhKnvN4lht8CccqItsUCcGPNEkzvvvcvJ+4magGI3VYd/3xlhAg==", + "license": "MIT", + "dependencies": { + "@loopback/core": "^7.0.3", + "@loopback/rest": "^15.0.4", + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@loopback/boot": "^8.0.4", + "@loopback/context": "^8.0.3", + "@loopback/repository": "^8.0.3", + "@loopback/sequelize": "^0.8.0", + "loopback-datasource-juggler": "^5.0.9" + }, + "peerDependenciesMeta": { + "@loopback/sequelize": { + "optional": true + } + } + }, "node_modules/lower-case": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", @@ -8056,7 +8874,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -8098,6 +8915,12 @@ "dev": true, "license": "ISC" }, + "node_modules/make-plural": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-7.4.0.tgz", + "integrity": "sha512-4/gC9KVNTV6pvYg2gFeQYTW3mWaoJt7WZE5vrp1KnQDgW92JtYZnzmZT81oj/dUTqAIu0ufI2x3dkgu3bB1tYg==", + "license": "Unicode-DFS-2016" + }, "node_modules/map-age-cleaner": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", @@ -8183,6 +9006,15 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/math-interval-parser": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/math-interval-parser/-/math-interval-parser-2.0.1.tgz", + "integrity": "sha512-VmlAmb0UJwlvMyx8iPhXUDnVW1F9IrGEd9CIOmv+XL8AErCUUuozoDMrgImvnYt2A+53qVX/tPW6YJurMKYsvA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -8235,6 +9067,23 @@ "node": ">=6" } }, + "node_modules/memcached": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/memcached/-/memcached-2.2.2.tgz", + "integrity": "sha512-lHwUmqkT9WdUUgRsAvquO4xsKXYaBd644Orz31tuth+w/BIfFNuJMWwsG7sa7H3XXytaNfPTZ5R/yOG3d9zJMA==", + "license": "MIT", + "dependencies": { + "hashring": "3.2.x", + "jackpot": ">=0.0.6" + } + }, + "node_modules/memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "license": "MIT", + "optional": true + }, "node_modules/meow": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", @@ -8582,6 +9431,82 @@ "dev": true, "license": "MIT" }, + "node_modules/moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/moment-timezone": { + "version": "0.5.48", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.48.tgz", + "integrity": "sha512-f22b8LV1gbTO2ms2j2z13MuPogNoh5UzxL3nzNAYKGraILnbGc9NEE6dyiiiLv46DGRb8A4kg8UKWLjPthxBHw==", + "license": "MIT", + "dependencies": { + "moment": "^2.29.4" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mongodb": { + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.7.4.tgz", + "integrity": "sha512-K5q8aBqEXMwWdVNh94UQTwZ6BejVbFhh1uB6c5FKtPE9eUMZPUO3sRZdgIEcHSrAWmxzpG/FeODDKL388sqRmw==", + "license": "Apache-2.0", + "dependencies": { + "bl": "^2.2.1", + "bson": "^1.1.4", + "denque": "^1.4.1", + "optional-require": "^1.1.8", + "safe-buffer": "^5.1.2" + }, + "engines": { + "node": ">=4" + }, + "optionalDependencies": { + "saslprep": "^1.0.0" + }, + "peerDependenciesMeta": { + "aws4": { + "optional": true + }, + "bson-ext": { + "optional": true + }, + "kerberos": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "mongodb-extjson": { + "optional": true + }, + "snappy": { + "optional": true + } + } + }, + "node_modules/mongodb/node_modules/bl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", + "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", + "license": "MIT", + "dependencies": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/moo": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", + "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==", + "license": "BSD-3-Clause" + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -8765,6 +9690,131 @@ "webidl-conversions": "^3.0.0" } }, + "node_modules/node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "license": "(BSD-3-Clause OR GPL-2.0)", + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/node-jose": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/node-jose/-/node-jose-2.2.0.tgz", + "integrity": "sha512-XPCvJRr94SjLrSIm4pbYHKLEaOsDvJCpyFw/6V/KK/IXmyZ6SFBzAUDO9HQf4DB/nTEFcRGH87mNciOP23kFjw==", + "license": "Apache-2.0", + "dependencies": { + "base64url": "^3.0.1", + "buffer": "^6.0.3", + "es6-promise": "^4.2.8", + "lodash": "^4.17.21", + "long": "^5.2.0", + "node-forge": "^1.2.1", + "pako": "^2.0.4", + "process": "^0.11.10", + "uuid": "^9.0.0" + } + }, + "node_modules/node-jose/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/node-jose/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/node-pg-migrate": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/node-pg-migrate/-/node-pg-migrate-5.10.0.tgz", + "integrity": "sha512-SSLLTYWYBKnlqZAikoouzIumeThoGZKrfzduWDnXDwtAgMnmPyIUpzgqBfHQkQJlSprVJMnF1n66xk7RkZlbPg==", + "license": "MIT", + "dependencies": { + "@types/pg": "^8.0.0", + "decamelize": "^5.0.0", + "mkdirp": "~1.0.0", + "yargs": "~16.2.0" + }, + "bin": { + "node-pg-migrate": "bin/node-pg-migrate" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "pg": ">=4.3.0 <9.0.0" + } + }, + "node_modules/node-pg-migrate/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/node-pg-migrate/node_modules/decamelize": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz", + "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/node-pg-migrate/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -12492,6 +13542,15 @@ "wrappy": "1" } }, + "node_modules/one-time": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "license": "MIT", + "dependencies": { + "fn.name": "1.x.x" + } + }, "node_modules/onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", @@ -12560,6 +13619,18 @@ "yaml": "^1.10.2" } }, + "node_modules/optional-require": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.1.10.tgz", + "integrity": "sha512-0r3OB9EIQsP+a5HVATHq2ExIy2q/Vaffoo4IAikW1spCYswhLxqWQS0i3GwS3AdY/OIP4SWZHLGz8CMU558PGw==", + "license": "Apache-2.0", + "dependencies": { + "require-at": "^1.0.6" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -12891,6 +13962,12 @@ "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "license": "BlueOak-1.0.0" }, + "node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", + "license": "(MIT AND Zlib)" + }, "node_modules/param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -12975,6 +14052,54 @@ "tslib": "^2.0.3" } }, + "node_modules/passport": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/passport/-/passport-0.7.0.tgz", + "integrity": "sha512-cPLl+qZpSc+ireUvt+IzqbED1cHHkDoVYMo30jbJIdOOjQ1MQYZBPiNvmi8UM6lJuOpTPXJGZQk0DtC4y61MYQ==", + "license": "MIT", + "dependencies": { + "passport-strategy": "1.x.x", + "pause": "0.0.1", + "utils-merge": "^1.0.1" + }, + "engines": { + "node": ">= 0.4.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jaredhanson" + } + }, + "node_modules/passport-http-bearer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/passport-http-bearer/-/passport-http-bearer-1.0.1.tgz", + "integrity": "sha512-SELQM+dOTuMigr9yu8Wo4Fm3ciFfkMq5h/ZQ8ffi4ELgZrX1xh9PlglqZdcUZ1upzJD/whVyt+YWF62s3U6Ipw==", + "dependencies": { + "passport-strategy": "1.x.x" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/passport-oauth2-client-password": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/passport-oauth2-client-password/-/passport-oauth2-client-password-0.1.2.tgz", + "integrity": "sha512-GHQH4UtaEZvCLulAxGKHYoSsPRoPRmGsdmaZtMh5nmz80yMLQbdMA9Bg2sp4/UW3PIxJH/143hVjPTiXaNngTQ==", + "dependencies": { + "passport-strategy": "1.x.x" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/passport-strategy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz", + "integrity": "sha512-CB97UUvDKJde2V0KDWWB3lyf6PC3FaZP7YxZ2G8OAtn9p4HI9j9JLP9qjOGZFvyl8uwNT8qM+hGnz/n16NI7oA==", + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/path-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/path-case/-/path-case-3.0.4.tgz", @@ -13009,63 +14134,165 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "license": "MIT", - "engines": { - "node": ">=8" + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz", + "integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==", + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/path-to-regexp": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", + "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", + "license": "MIT" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pause": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", + "integrity": "sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg==" + }, + "node_modules/pg": { + "version": "8.16.3", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.16.3.tgz", + "integrity": "sha512-enxc1h0jA/aq5oSDMvqyW3q89ra6XIIDZgCX9vkMrnz5DFTw/Ny3Li2lFQ+pt3L6MCgm/5o2o8HW9hiJji+xvw==", + "license": "MIT", + "dependencies": { + "pg-connection-string": "^2.9.1", + "pg-pool": "^3.10.1", + "pg-protocol": "^1.10.3", + "pg-types": "2.2.0", + "pgpass": "1.0.5" + }, + "engines": { + "node": ">= 16.0.0" + }, + "optionalDependencies": { + "pg-cloudflare": "^1.2.7" + }, + "peerDependencies": { + "pg-native": ">=3.0.1" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } + } + }, + "node_modules/pg-cloudflare": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.2.7.tgz", + "integrity": "sha512-YgCtzMH0ptvZJslLM1ffsY4EuGaU0cx4XSdXLRFae8bPP4dS5xL1tNB3k2o/N64cHJpwU7dxKli/nZ2lUa5fLg==", + "license": "MIT", + "optional": true + }, + "node_modules/pg-connection-string": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.9.1.tgz", + "integrity": "sha512-nkc6NpDcvPVpZXxrreI/FOtX3XemeLl8E0qFr6F2Lrm/I8WOnaWNhIPK2Z7OHpw7gh5XJThi6j6ppgNoaT1w4w==", + "license": "MIT" + }, + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", + "license": "ISC", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-pool": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.10.1.tgz", + "integrity": "sha512-Tu8jMlcX+9d8+QVzKIvM/uJtp07PKr82IUOYEphaWcoBhIYkoHpLXN3qO59nAI11ripznDsEzEv8nUxBVWajGg==", + "license": "MIT", + "peerDependencies": { + "pg": ">=8.0" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, + "node_modules/pg-protocol": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.10.3.tgz", + "integrity": "sha512-6DIBgBQaTKDJyxnXaLiLR8wBpQQcGWuAESkRBX/t6OwA8YsqP+iVSiond2EDy6Y/dsGk8rh/jtax3js5NeV7JQ==", "license": "MIT" }, - "node_modules/path-scurry": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", - "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", - "license": "BlueOak-1.0.0", + "node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "license": "MIT", "dependencies": { - "lru-cache": "^11.0.0", - "minipass": "^7.1.2" + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" }, "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=4" } }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz", - "integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==", - "license": "ISC", - "engines": { - "node": "20 || >=22" + "node_modules/pgpass": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", + "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", + "license": "MIT", + "dependencies": { + "split2": "^4.1.0" } }, - "node_modules/path-to-regexp": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", - "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", - "license": "MIT" - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "license": "MIT", + "node_modules/pgpass/node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "license": "ISC", "engines": { - "node": ">=8" + "node": ">= 10.x" } }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, "license": "ISC" }, "node_modules/picomatch": { @@ -13247,6 +14474,45 @@ "node": ">=8" } }, + "node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "license": "MIT", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/postman-request": { "version": "2.88.1-postman.43", "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.43.tgz", @@ -13322,11 +14588,19 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true, "license": "MIT" }, "node_modules/process-on-spawn": { @@ -13342,6 +14616,19 @@ "node": ">=8" } }, + "node_modules/prom-client": { + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/prom-client/-/prom-client-14.2.0.tgz", + "integrity": "sha512-sF308EhTenb/pDRPakm+WgiN+VdM/T1RaHj1x+MvAuT8UiQP8JmOEbxVqtkbfR4LrvOg5n7ic01kRBDGXjYikA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "tdigest": "^0.1.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", @@ -13362,6 +14649,12 @@ "node": ">= 0.10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, "node_modules/proxyquire": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.3.tgz", @@ -13495,6 +14788,41 @@ "node": ">= 0.6" } }, + "node_modules/rate-limit-memcached": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/rate-limit-memcached/-/rate-limit-memcached-0.6.0.tgz", + "integrity": "sha512-/qVmM6JqOosUPynxEVm0t7DEYv5k/HVybVyqjA07PahMg9CLhzC4llYRzJKPOiop8BQlS8tMh6DBksnAI+0T7w==", + "license": "MIT", + "dependencies": { + "memcached": "^2.2.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/rate-limit-mongo": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/rate-limit-mongo/-/rate-limit-mongo-2.3.2.tgz", + "integrity": "sha512-dLck0j5N/AX9ycVHn5lX9Ti2Wrrwi1LfbXitu/mMBZOo2nC26RgYKJVbcb2mYgb9VMaPI2IwJVzIa2hAQrMaDA==", + "license": "MIT", + "dependencies": { + "mongodb": "^3.6.7", + "twostep": "0.4.2", + "underscore": "1.12.1" + } + }, + "node_modules/rate-limit-redis": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/rate-limit-redis/-/rate-limit-redis-3.1.0.tgz", + "integrity": "sha512-guCQGRQhsOlTR4VNHRnksMeet/3ImfdxIQgWP6In4FphJjUbORe0F4XeFshLnbc9xcuFUv9jZL44TgUMSz4XPQ==", + "license": "MIT", + "engines": { + "node": ">= 14.5.0" + }, + "peerDependencies": { + "express-rate-limit": "^6" + } + }, "node_modules/raw-body": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", @@ -13680,7 +15008,6 @@ "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", @@ -13696,7 +15023,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, "license": "MIT" }, "node_modules/readdirp": { @@ -13779,6 +15105,21 @@ "node": ">=4" } }, + "node_modules/request-ip": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/request-ip/-/request-ip-3.3.0.tgz", + "integrity": "sha512-cA6Xh6e0fDBBBwH77SLJaJPBmD3nWVAcF9/XAcsrIHdjhFzFiB5aNQFytdjCGPezU3ROwrR11IddKAM08vohxA==", + "license": "MIT" + }, + "node_modules/require-at": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/require-at/-/require-at-1.0.6.tgz", + "integrity": "sha512-7i1auJbMUrXEAZCOQ0VNJgmcT2VOKPRl2YGJwgpHpC9CE91Mv4/4UYIUm4chGJaI381ZDq1JUicFii64Hapd8g==", + "license": "Apache-2.0", + "engines": { + "node": ">=4" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -13882,6 +15223,14 @@ "node": ">=8" } }, + "node_modules/retry": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.6.0.tgz", + "integrity": "sha512-RgncoxLF1GqwAzTZs/K2YpZkWrdIYbXsmesdomi+iPilSzjUyr/wzNIuteoTVaWokzdwZIJ9NHRNQa/RUiOB2g==", + "engines": { + "node": "*" + } + }, "node_modules/reusify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", @@ -14041,12 +15390,40 @@ ], "license": "MIT" }, + "node_modules/safe-identifier": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/safe-identifier/-/safe-identifier-0.4.2.tgz", + "integrity": "sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w==", + "license": "ISC" + }, + "node_modules/safe-stable-stringify": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "license": "MIT" }, + "node_modules/saslprep": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", + "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", + "license": "MIT", + "optional": true, + "dependencies": { + "sparse-bitfield": "^3.0.3" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/saxes": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", @@ -14155,7 +15532,6 @@ "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" @@ -14578,6 +15954,26 @@ "url": "https://github.com/steveukx/git-js?sponsor=1" } }, + "node_modules/simple-lru-cache": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/simple-lru-cache/-/simple-lru-cache-0.0.2.tgz", + "integrity": "sha512-uEv/AFO0ADI7d99OHDmh1QfYzQk/izT1vCmu/riQfh7qjBVUUgRT87E5s5h7CxWCA/+YoZerykpEthzVrW3LIw==" + }, + "node_modules/simple-swizzle": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.4.tgz", + "integrity": "sha512-nAu1WFPQSMNr2Zn9PGSZK9AGn4t/y97lEm+MXTtUDwfP0ksAIX4nO+6ruD9Jwut4C49SB1Ws+fbXsm/yScWOHw==", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/simple-swizzle/node_modules/is-arrayish": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.4.tgz", + "integrity": "sha512-m6UrgzFVUYawGBh1dUsWR5M2Clqic9RVXC/9f8ceNlv2IcO9j9J/z8UoCLPqtsPBFNzEpfR3xftohbfqDx8EQA==", + "license": "MIT" + }, "node_modules/sinon": { "version": "21.0.0", "resolved": "https://registry.npmjs.org/sinon/-/sinon-21.0.0.tgz", @@ -14683,6 +16079,16 @@ "source-map": "^0.6.0" } }, + "node_modules/sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "memory-pager": "^1.0.2" + } + }, "node_modules/spawn-error-forwarder": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/spawn-error-forwarder/-/spawn-error-forwarder-1.0.0.tgz", @@ -14890,6 +16296,15 @@ "node": ">=0.10.0" } }, + "node_modules/stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", @@ -15174,6 +16589,48 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/swagger-stats": { + "version": "0.99.7", + "resolved": "https://registry.npmjs.org/swagger-stats/-/swagger-stats-0.99.7.tgz", + "integrity": "sha512-niP70m99Cwpz/Fyfk8ydul1jM0pOKD6UofSaDzW2Op6o6WYFsuAl/BhVbmLkZWOAZ7IloDVvFj6vaU5zA0xydg==", + "license": "MIT", + "dependencies": { + "axios": "^1.4.0", + "basic-auth": "^2.0.1", + "cookies": "^0.8.0", + "debug": "^4.3.4", + "moment": "^2.29.4", + "path-to-regexp": "^6.2.1", + "qs": "^6.11.2", + "send": "^0.18.0", + "uuid": "^9.0.0" + }, + "peerDependencies": { + "prom-client": ">= 10 <= 14" + } + }, + "node_modules/swagger-stats/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/swagger-ui-dist": { + "version": "5.28.1", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.28.1.tgz", + "integrity": "sha512-IvPrtNi8MvjiuDgoSmPYgg27Lvu38fnLD1OSd8Y103xXsPAqezVNnNeHnVCZ/d+CMXJblflGaIyHxAYIF3O71w==", + "license": "Apache-2.0", + "dependencies": { + "@scarf/scarf": "=1.4.0" + } + }, "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -15181,6 +16638,16 @@ "dev": true, "license": "MIT" }, + "node_modules/tdigest": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/tdigest/-/tdigest-0.1.2.tgz", + "integrity": "sha512-+G0LLgjjo9BZX2MfdvPfH+MKLCrxlXSYec5DaPYP1fe6Iyhf0/fSmJ0bFiZ1F8BT6cGXl2LpltQptzjXKWEkKA==", + "license": "MIT", + "peer": true, + "dependencies": { + "bintrees": "1.0.2" + } + }, "node_modules/temp": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/temp/-/temp-0.9.4.tgz", @@ -15382,6 +16849,12 @@ "node": ">=0.10" } }, + "node_modules/text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", + "license": "MIT" + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -15515,7 +16988,6 @@ "version": "0.6.8", "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.8.tgz", "integrity": "sha512-aXJDbk6SnumuaZSANd21XAo15ucCDE38H4fkqiGsc3MhCK+wOlZvLP9cB/TvpHT0mOyWgC4Z8EwRlzqYSUzdsA==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -15534,6 +17006,15 @@ "node": ">=8" } }, + "node_modules/triple-beam": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz", + "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==", + "license": "MIT", + "engines": { + "node": ">= 14.0.0" + } + }, "node_modules/ts-api-utils": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", @@ -15607,6 +17088,15 @@ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, + "node_modules/tsscmp": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", + "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==", + "license": "MIT", + "engines": { + "node": ">=0.6.x" + } + }, "node_modules/tv4": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/tv4/-/tv4-1.3.0.tgz", @@ -15631,6 +17121,12 @@ "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "license": "Unlicense" }, + "node_modules/twostep": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/twostep/-/twostep-0.4.2.tgz", + "integrity": "sha512-O/wdPYk9ey04qcCiw8AQN74DbvLFZLAgnryrNTpV7T/sxB4lcGkCMHynx5xCcA6fCh739ZAqp3HcGhy770X1qA==", + "license": "MIT" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -15739,6 +17235,12 @@ "node": ">=0.8.0" } }, + "node_modules/underscore": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==", + "license": "MIT" + }, "node_modules/undici": { "version": "5.29.0", "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz", @@ -16067,6 +17569,79 @@ "dev": true, "license": "ISC" }, + "node_modules/winston": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.17.0.tgz", + "integrity": "sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==", + "license": "MIT", + "dependencies": { + "@colors/colors": "^1.6.0", + "@dabh/diagnostics": "^2.0.2", + "async": "^3.2.3", + "is-stream": "^2.0.0", + "logform": "^2.7.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "safe-stable-stringify": "^2.3.1", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.9.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/winston-transport": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.9.0.tgz", + "integrity": "sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==", + "license": "MIT", + "dependencies": { + "logform": "^2.7.0", + "readable-stream": "^3.6.2", + "triple-beam": "^1.3.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/winston-transport/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/winston/node_modules/@colors/colors": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", + "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==", + "license": "MIT", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/winston/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", @@ -16193,7 +17768,6 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.4" @@ -16212,7 +17786,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true, "license": "ISC" }, "node_modules/yaml": { @@ -16312,7 +17885,6 @@ "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, "license": "ISC", "engines": { "node": ">=10" diff --git a/package.json b/package.json index 954a3d7..79060a9 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "@loopback/boot": "^8.0.4", "@loopback/core": "^7.0.3", "@loopback/rest": "^15.0.4", + "@sourceloop/core": "^20.0.0", "node-vault": "^0.10.2", "tslib": "^2.0.0" }, diff --git a/src/__tests__/unit/vault-connect.unit.ts b/src/__tests__/unit/vault-connect.unit.ts index ec78dae..4ef73c5 100644 --- a/src/__tests__/unit/vault-connect.unit.ts +++ b/src/__tests__/unit/vault-connect.unit.ts @@ -1,4 +1,5 @@ import {expect, sinon} from '@loopback/testlab'; +import {ILogger} from '@sourceloop/core'; import proxyquire from 'proxyquire'; import {VaultConnector, VaultConnectProvider} from '../../services'; import {MockClient} from './mock-client'; @@ -8,454 +9,464 @@ describe('Vault Service', () => { const config = { endpoint: 'http://127.0.0.1:8001', }; + const mockLogger: ILogger = { + log: sinon.stub(), + error: sinon.stub(), + info: sinon.stub(), + warn: sinon.stub(), + debug: sinon.stub(), + }; it('returns error message when config is not passed', async () => { try { // eslint-disable-next-line @typescript-eslint/no-unused-vars - const vaultClient = await new VaultConnectProvider().value(); + const vaultClient = await new VaultConnectProvider(mockLogger).value(); } catch (err) { const result = err.message; expect(result).to.be.eql('Vault config not available !'); } }); it('returns the vaultConnector object', async () => { - const vaultClient = await new VaultConnectProvider(config).value(); - expect(vaultClient).to.be.eql(new VaultConnector(config)); + const vaultClient = await new VaultConnectProvider( + mockLogger, + config, + ).value(); + expect(vaultClient).to.be.eql(new VaultConnector(mockLogger, config)); }); it('return a Promise when calling the help method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.help('dummyPath'); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the write method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.write('dummyPath', 'dummydata'); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the read method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.read('dummyPath'); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the list method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.list('dummyPath'); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the delete method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.delete('dummyPath'); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the status method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.status(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the initialized method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.initialized(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the init method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.init(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the unseal method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.unseal(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the seal method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.seal(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the generateRootStatus method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.generateRootStatus(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the generateRootInit method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.generateRootInit(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the generateRootCancel method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.generateRootCancel(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the generateRootUpdate method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.generateRootUpdate(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the mounts method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.mounts(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the mount method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.mount(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the unmount method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.unmount(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the remount method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.remount(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the policies method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.policies(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the addPolicy method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.addPolicy(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the getPolicy method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.getPolicy(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the removePolicy method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.removePolicy(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the auths method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.auths(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the enableAuth method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.enableAuth(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the disableAuth method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.disableAuth(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the audits method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.audits(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the enableAudit method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.enableAudit(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the disableAudit method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.disableAudit(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the renew method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.renew(); await expect(result).to.be.fulfilled(); }); it('calling the revoke method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.revoke(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the revokePrefix method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.revokePrefix(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the rotate method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.rotate(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the githubLogin method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.githubLogin(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the userpassLogin method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.userpassLogin(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the kubernetesLogin method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.kubernetesLogin(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the awsIamLogin method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.awsIamLogin(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the tokenAccessors method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.tokenAccessors(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the tokenCreate method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.tokenCreate(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the tokenCreateOrphan method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.tokenCreateOrphan(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the tokenCreateRole method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.tokenCreateRole(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the tokenLookup method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.tokenLookup(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the tokenLookupAccessor method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.tokenLookupAccessor(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the tokenLookupSelf method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.tokenLookupSelf(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the tokenRenewSelf method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.tokenRenewSelf(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the tokenRenew method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.tokenRenew(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the tokenRevoke method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.tokenRevoke(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the tokenRevokeAccessor method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.tokenRevokeAccessor(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the tokenRevokeOrphan method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.tokenRevokeOrphan(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the tokenRevokeSelf method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.tokenRevokeSelf(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the tokenRoles method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.tokenRoles(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the addTokenRole method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.addTokenRole(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the getTokenRole method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.getTokenRole(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the removeTokenRole method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.removeTokenRole(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the approleRoles method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.approleRoles(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the addApproleRole method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.addApproleRole(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the getApproleRole method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.getApproleRole(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the deleteApproleRole method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.deleteApproleRole(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the getApproleRoleId method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.getApproleRoleId(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the updateApproleRoleId method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.updateApproleRoleId(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the getApproleRoleSecret method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.getApproleRoleSecret(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the approleSecretAccessors method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.approleSecretAccessors(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the approleSecretLookup method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.approleSecretLookup(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the approleSecretDestroy method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.approleSecretDestroy(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the approleSecretAccessorLookup method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.approleSecretAccessorLookup(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the approleSecretAccessorDestroy method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.approleSecretAccessorDestroy(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the approleLogin method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.approleLogin(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the health method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.health(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the leader method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.leader(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the stepDown method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.stepDown(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the encryptData method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.encryptData(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the decryptData method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.decryptData(); await expect(result).to.be.fulfilled(); }); it('return a Promise when calling the generateDatabaseCredentials method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); const result = vaultConnector.generateDatabaseCredentials(); await expect(result).to.be.fulfilled(); }); it('using the client via the reconnect method', async () => { const connector = MockClient.mockClient(); - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); vaultConnector.reconnect(config); const result = vaultConnector.generateDatabaseCredentials(); await expect(result).to.be.fulfilled(); @@ -472,7 +483,7 @@ describe('Vault Service', () => { const connector = proxyquire('../../services/vault-connector', { 'node-vault': sinon.stub().returns(mockClient), }).VaultConnector; - const vaultConnector = new connector(config); + const vaultConnector = new connector(mockLogger, config); // eslint-disable-next-line @typescript-eslint/no-unused-vars const readResult = vaultConnector.read('dummyPath'); } catch (err) { diff --git a/src/services/vault-connect.service.ts b/src/services/vault-connect.service.ts index df8de1c..53ef866 100644 --- a/src/services/vault-connect.service.ts +++ b/src/services/vault-connect.service.ts @@ -2,6 +2,7 @@ import {bind, BindingScope, inject, Provider} from '@loopback/core'; import {VaultSecurityBindings} from '../keys'; import {VaultProviderOptions} from '../types'; import {VaultConnector} from './vault-connector'; +import {ILogger, LOGGER} from '@sourceloop/core'; @bind({scope: BindingScope.SINGLETON}) export class VaultConnectProvider @@ -10,6 +11,8 @@ export class VaultConnectProvider private _vaultClient: VaultConnector; constructor( + @inject(LOGGER.LOGGER_INJECT) + public logger: ILogger, @inject(VaultSecurityBindings.CONFIG, { optional: true, }) @@ -18,7 +21,7 @@ export class VaultConnectProvider async value() { if (!this._vaultClient) { - this._vaultClient = new VaultConnector(this.config); + this._vaultClient = new VaultConnector(this.logger, this.config); } return this._vaultClient; } diff --git a/src/services/vault-connector.ts b/src/services/vault-connector.ts index 372d87e..d2ba879 100644 --- a/src/services/vault-connector.ts +++ b/src/services/vault-connector.ts @@ -2,13 +2,19 @@ import {HttpErrors} from '@loopback/rest'; import * as vault from 'node-vault'; import {client, Option} from 'node-vault'; import {VaultProviderOptions} from '../types'; +import {inject} from '@loopback/core'; +import {ILogger, LOGGER} from '@sourceloop/core'; export class VaultConnector { private _vaultClient: client; private _unsealKey = ''; private _config?: VaultProviderOptions; - constructor(config?: VaultProviderOptions) { + constructor( + @inject(LOGGER.LOGGER_INJECT) + public logger: ILogger, + config?: VaultProviderOptions, + ) { if (!config) { throw new HttpErrors.UnprocessableEntity('Vault config not available !'); } @@ -17,7 +23,7 @@ export class VaultConnector { } reconnect(config: VaultProviderOptions) { - this._config = Object.assign({}, this._config, config); + this._config = {...this._config, ...config}; this._connect(); } @@ -28,32 +34,12 @@ export class VaultConnector { ); } const config = this._config; - const opts = { - // eslint-disable-next-line @typescript-eslint/naming-convention - secret_shares: config?.secretShares ?? 1, - // eslint-disable-next-line @typescript-eslint/naming-convention - secret_threshold: config?.secretThreshold ?? 1, - }; const health = await this._vaultClient.health({ sealedcode: 200, uninitcode: 200, }); if (!health.initialized) { - const resp = await this._vaultClient.init(opts); - // eslint-disable-next-line @typescript-eslint/prefer-optional-chain - if (!resp || !resp.keys || resp.keys.length === 0 || !resp.root_token) { - throw new Error('Vault initialisation failed !'); - } - const keys = resp.keys; - // set token for all following requests - this._vaultClient.token = resp.root_token; - this._unsealKey = keys[0]; - // unseal vault server - await this._vaultClient.unseal({ - // eslint-disable-next-line @typescript-eslint/naming-convention - secret_shares: 1, - key: this._unsealKey ?? config?.unsealKey ?? '', - }); + await this._initializeVault(); } if (health.sealed && health.initialized) { // unseal vault server @@ -65,6 +51,35 @@ export class VaultConnector { } } + async _initializeVault() { + const config = this._config; + const opts = { + // eslint-disable-next-line @typescript-eslint/naming-convention + secret_shares: config?.secretShares ?? 1, + // eslint-disable-next-line @typescript-eslint/naming-convention + secret_threshold: config?.secretThreshold ?? 1, + }; + + const resp = await this._vaultClient.init(opts); + if (!resp?.keys?.length || !resp.root_token) { + throw new Error('Vault initialisation failed !'); + } + + const keys = resp.keys; + this._vaultClient.token = resp.root_token; + this._unsealKey = keys[0]; + + await this._performUnseal(this._unsealKey); + } + + async _performUnseal(key: string) { + await this._vaultClient.unseal({ + // eslint-disable-next-line @typescript-eslint/naming-convention + secret_shares: 1, + key: key, + }); + } + async help(path: string, requestOptions?: Option): Promise { await this.initContainer(); return this._vaultClient.help(path, requestOptions); @@ -438,6 +453,7 @@ export class VaultConnector { pathPrefix: this._config?.pathPrefix, }); } catch (error) { + this.logger.error(error.message); throw new HttpErrors.Forbidden('Vault connection failed !'); } } diff --git a/trivy.yml b/trivy.yml new file mode 100644 index 0000000..d855a42 --- /dev/null +++ b/trivy.yml @@ -0,0 +1,16 @@ +format: table +exit-code: 1 +severity: + - HIGH + - CRITICAL +skip-files: + - db.env +security-checks: + - vuln + - secret + - license +vulnerability: + type: + - os + - library + ignore-unfixed: true