Commit Graph
5982 Commits
Author SHA1 Message Date
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
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
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
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 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 78a52422a2 Patch Netlify integration cases, add new docs for Heroku, Vercel, and Netlify 2022-12-21 01:55:23 -05:00
Reginald 4aaa01fb0e Clean up 2022-12-20 20:39:55 +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
Tuan Dang c15a9301af Temp disable healthcheck 2022-12-18 19:16:56 -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
Tuan Dang 547555591b Refactor integrations logic and replace hardcoded client ids with envars 2022-12-18 12:18:50 -05:00
George Gale 75020568d3 Started Github integration. 2022-12-18 17:45:31 +01:00
Tuan Dang 2e84b7e354 Initial schema ideas for logging 2022-12-17 15:10:30 -05:00
Tuan Dang 6c7d232a9e Fix merge conflicts for index 2022-12-15 15:31:14 -05:00
Tuan Dang 35fd1520e2 Add integration auth revocation 2022-12-15 15:27:01 -05:00
Tuan Dang 787e54fb91 Finish Netlify integration v1 full-loop 2022-12-14 18:18:21 -05:00
Tuan Dang f3900213b5 Add telemetry output at backend container start 2022-12-13 21:59:12 -05:00
Tuan Dang fe17d8459b Begin Netlify integration 2022-12-13 21:12:40 -05:00
Maidul Islam c33b043f5f remove cookie path temporary 2022-12-13 18:54:45 -05:00
Tuan Dang 1a3d3906da Change jid path 2022-12-13 16:25:19 -05:00
Tuan Dang d86c335671 Begin Netlify integration 2022-12-13 15:47:27 -05:00
Tuan Dang 62f0b3f6df Patch EMAIL_TOKEN_LIFETIME expiring early 2022-12-13 15:22:07 -05:00
Tuan Dang 3e623922b4 Preliminary Vercel integration 2022-12-13 13:59:21 -05:00
Vladyslav Matsiiako 07bb3496e7 Added the account recovery flow 2022-12-12 20:42:16 -05:00
Reginald Bondoc bcd18ab0af Ignore linting healthcheck & exclue in rate-limiting 2022-12-12 19:11:44 +01:00
Reginald 1ea75eb840 Merge branch 'Infisical:main' into main 2022-12-12 18:15:13 +01:00