Commit Graph
266 Commits
Author SHA1 Message Date
Tuan Dang 9bbf380741 Merge remote-tracking branch 'origin' into secret-versioning 2022-12-24 14:53:23 -05:00
Hüseyin Berke Bütün 28818db757 refactor: Prefer use of RequestError and next() function on middlewares
Added:
- New error types such as `IntegrationNotFoundError`,
  `WorkspaceNotFoundError`, `AccountNotFoundError' and more.

Refactored:
- Refactored most of the middlewares and very little number of helper
  functions to use RequestError
- Deleted unused imports

Changed:
- Some of the error types in middlewares changed to more related error
  types.
- Environment variable of 'VERBOSE_ERROR_OUTPUT' changed to more
  reliable validation method in `config/index.ts` as per @dangtony98
  requested.
2022-12-24 20:52:26 +01:00
Tuan Dang f7e3e48038 Merge branch 'secret-versioning' of https://github.com/Infisical/infisical into secret-versioning 2022-12-24 14:52:14 -05:00
Tuan Dang c4ebea7422 Finish get secret versions route 2022-12-24 14:51:09 -05:00
Tuan Dang dca3bd4fbb Complete v1 secret versioning and project secret snapshots 2022-12-24 14:51:09 -05:00
Tuan Dang 79333657ed Add parseInt to SMTP_PORT envar 2022-12-24 14:25:39 -05:00
Tuan Dang 3341b08b22 Revamp contributing development docs 2022-12-24 14:21:21 -05:00
Tuan Dang d4bab09927 Add self-hosting email configuration docs + examples, correct SMTP setup for SendGrid/Mailgun-specific setup 2022-12-24 11:10:56 -05:00
Tuan Dang e4e0370dad Complete v1 secret versioning and project secret snapshots 2022-12-23 10:06:37 -05:00
mv-turtle 5324355006 Merge pull request #158 from Infisical/snyk-upgrade-678d7b4eeea6a4d9172b69ed3febbea2
[Snyk] Upgrade posthog-node from 2.2.0 to 2.2.2
2022-12-23 08:28:20 -05:00
Tuan Dang fc32647201 Embed project id into exported service tokens 2022-12-22 22:42:45 -05:00
Tuan Dang ed2558a7ad Add GitHub Actions docs and remove GET Infisical public key route 2022-12-22 14:09:34 -05:00
Tuan Dang 3f2d011fba Update contributing dev docs and envars, remove PUBLIC_KEY, PRIVATE_KEY server envar requirement 2022-12-22 13:36:15 -05:00
snyk-bot ea5a758959 fix: upgrade posthog-node from 2.2.0 to 2.2.2
Snyk has created this PR to upgrade posthog-node from 2.2.0 to 2.2.2.

See this package in npm:
https://www.npmjs.com/package/posthog-node

See this project in Snyk:
https://app.snyk.io/org/maidul98/project/35057e82-ed7d-4e19-ba4d-719a42135cd6?utm_source=github&utm_medium=referral&page=upgrade-pr
2022-12-22 18:07:27 +00:00
Hüseyin Berke Bütün 843757fcf5 fix: Wrong error handler middleware position
Error handler is a middleware that captures errors from throw and
next(...), so in order to be able to handle it needs to come after
all of the routing and other middlewares. Previously it was before
routuing logic and wasn't working, now it works as intended.

Also added check for LogLevel to Sentry for not sending false-positive
errors like `BadRequestError`, `UnauthorizedRequestError` and etc.
2022-12-22 17:51:53 +01:00
BlackMagiq 55996440da Merge pull request #155 from jonerrr/main
Update envars for SMTP for greater versatility.
2022-12-22 00:22:47 -05:00
mv-turtle 9643c75b42 Merge pull request #156 from Infisical/dependabot/npm_and_yarn/backend/jsonwebtoken-9.0.0
Bump jsonwebtoken from 8.5.1 to 9.0.0 in /backend
2022-12-21 23:42:45 -05:00
mv-turtle ebdf04b39f Merge pull request #125 from Infisical/snyk-upgrade-5062255a2e34f7370d0aefcb1261369d
[Snyk] Upgrade posthog-node from 2.1.0 to 2.2.0
2022-12-21 23:41:38 -05:00
dependabot[bot] 6f40427425 Bump jsonwebtoken from 8.5.1 to 9.0.0 in /backend
Bumps [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) from 8.5.1 to 9.0.0.
- [Release notes](https://github.com/auth0/node-jsonwebtoken/releases)
- [Changelog](https://github.com/auth0/node-jsonwebtoken/blob/master/CHANGELOG.md)
- [Commits](https://github.com/auth0/node-jsonwebtoken/compare/v8.5.1...v9.0.0)

---
updated-dependencies:
- dependency-name: jsonwebtoken
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-12-22 04:40:42 +00:00
Tuan Dang aaa87b2b85 Fix errors and complete v1 full-loop of GitHub integration with repository secrets 2022-12-21 23:16:50 -05:00
Tuan Dang 7763e33de6 Fix errors and complete v1 full-loop of GitHub integration with repository secrets 2022-12-21 23:15:22 -05:00
Jonah 68bf1f6c8a update env vars for mail 2022-12-21 21:27:37 -05:00
Hüseyin Berke Bütün 6f5d7a831b refactor: Refactored middlewares to use RequestError
Refactored middlewares to use RequestError rather than using
`try {...}catch (err){...}`. With this change it's possible to manage
all error details within one place.

Added:
- Added Sentry.captureException to Error Handler
2022-12-22 01:42:02 +01:00
Hüseyin Berke Bütün bd9041a62c feat: Add central error handler
Added:
- Added Midleware to capture and handle all errors
    - will catch error from `throw ...` and `next(...)`
- Added RequestError base error class to build consistent error objects
- Added common errors like `UnauthorizedRequestError`, `BadRequestError`
- Added consistent Logging solution using `winston`
    - Supports Loki Transporter using `winston-loki`
- Outputing Legal disclaimer to console when `TELEMETRY_ENABLED=true`

Changed:
- Changed console.log to getLogger() favor of using consistent logging
2022-12-22 00:55:41 +01:00
BlackMagiq 96caa587d6 Merge branch 'bot' into bot 2022-12-21 17:11:09 -05:00
Tuan Dang 009f9c6842 Continue developing activity logs backend 2022-12-21 16:27:04 -05:00
Reginald Bondoc 0ee563948d Update package-lock 2022-12-21 20:34:44 +01:00
Reginald Bondoc 95b8d27c59 Merge branch 'main' of github.com:reginaldbondoc/infisical 2022-12-21 20:33:14 +01:00
Reginald 5790af7b8b Merge branch 'Infisical:main' into main 2022-12-21 20:32:59 +01:00
Reginald Bondoc a3609b9b6f Align with comments 2022-12-21 20:32:38 +01:00
Tuan Dang 6e50adb9ff Fix merge conflicts 2022-12-21 11:36:47 -05:00
Tuan Dang fdcf2dd716 Merge branch 'main' of https://github.com/Infisical/infisical 2022-12-21 01:55:30 -05:00
Tuan Dang 78a52422a2 Patch Netlify integration cases, add new docs for Heroku, Vercel, and Netlify 2022-12-21 01:55:23 -05:00
Hüseyin Berke Bütün 44482dda26 fix: Relocate 'JWT_SERVICE_SECRET' related to issue #142 2022-12-21 02:35:05 +01:00
Reginald 4aaa01fb0e Clean up 2022-12-20 20:39:55 +01:00
Reginald Bondoc fcf300fa96 Set output mode and file 2022-12-20 18:14:58 +01:00
Reginald Bondoc 3eb33d22cf Back to report.json 2022-12-20 17:55:05 +01:00
Reginald Bondoc 8a209049c5 Point to different coverage file 2022-12-20 17:49:29 +01:00
Reginald 7eedefa0c9 Update app.ts 2022-12-20 01:17:04 +01:00
Reginald Bondoc bd207dc65f Merge branch 'main' of github.com:reginaldbondoc/infisical 2022-12-20 01:04:33 +01:00
Reginald Bondoc fc906e7dc7 Setup test, break apart entrypoint, & align GHA workflow 2022-12-20 00:56:53 +01:00
Tuan Dang 2d77fe9ca3 Fix lint issues 2022-12-19 12:05:19 -05:00
George Gale 8bfab95cc7 Merging upstream changes. 2022-12-19 10:58:57 +01:00
Maidul Islam 6bb24933bf Add back health check and fix json file not found 2022-12-18 20:10:17 -05:00
Tuan Dang c15a9301af Temp disable healthcheck 2022-12-18 19:16:56 -05:00
Tuan Dang 6ea26c135a Merge branch 'bot' 2022-12-18 17:34:18 -05:00
Tuan Dang 648e3e3bbf Continue developing log schema 2022-12-18 17:19:09 -05:00
Tuan Dang 200bb12ad8 Move CLIENT_ID envars to be fetched from backend for (cloud) integration options 2022-12-18 16:10:58 -05:00
Maidul Islam 06c1827f38 Remove prettier 2022-12-18 12:29:21 -05:00
Tuan Dang 547555591b Refactor integrations logic and replace hardcoded client ids with envars 2022-12-18 12:18:50 -05:00