1
0
Fork 0
mirror of synced 2024-09-15 16:59:43 +12:00
Commit graph

45 commits

Author SHA1 Message Date
Adria Navarro
db2c20e3ae eslint import/newline-after-import 2023-11-20 21:52:29 +01:00
Adria Navarro
4d27ff1dc0 eslint import/no-duplicates 2023-11-20 21:48:49 +01:00
mike12345567
258ea803bc Further PR comments. 2023-11-17 16:37:00 +00:00
mike12345567
7fb6c0927a Moving things around to get rid of cyclics created by moving invite/passwordReset into backend-core - also updating currentapp test case to mock a bit better. 2023-11-17 16:20:10 +00:00
Sam Rose
4c7c10b121
Set Redis initialisation back to how it was before I started messing with it. 2023-11-10 16:17:18 +00:00
Sam Rose
d6eb2b9452
Attempting to get integration tests passing again. 2023-11-10 15:43:06 +00:00
Sam Rose
b29cfc600c
Move Invite and PasswordReset code into backend-core. 2023-11-09 14:51:07 +00:00
mike12345567
86f7bd192f Moving audit log init to be part of the server startup. 2023-11-03 14:55:56 +00:00
Adria Navarro
ea1853c78c Remove sentry from the backend 2023-10-18 10:51:09 +02:00
Rory Powell
976b3a55ca Update logging to support dd trace attributes (#10086)
* Update logging middleware to integrate with pino for console logging

* Remove elastic apm references, use updated core middlewares

* Remove redundant LOG_LEVEL definitions

* Remove no longer needed jest logging overrides

* lint

* Backwards compat between console log helpers and pino

* Configurable DISABLE_HTTP_LOGGING

* Don't log 4xx as errors

* Remove redundant ENABLE_4XX_HTTP_LOGGING

* Cleanup migrations and event logging

* Improve bb-alert logging

* Add DISABLE_HTTP_LOGGING to helm chart

* Add ops endpoints for testing

* Disable http logging in dev

* Backwards compatible tracing implementation

* Naming update on http logging env var

* lint

* Update packages/backend-core/src/environment.ts

Co-authored-by: Adria Navarro <adria@revityapp.com>

* Merge

* Lint

* Fix console.warn failing mock by replacing with alerts mock instead

* Lint

---------

Co-authored-by: Adria Navarro <adria@revityapp.com>
2023-04-04 15:08:46 +01:00
adrinr
495c8f4b0e Undo unwanted changes 2023-03-28 16:46:22 +01:00
adrinr
fc0c4815af Handle SCIM body requests 2023-03-28 16:46:22 +01:00
adrinr
f8396725d1 Init pro with the save user function 2023-03-28 16:46:22 +01:00
mike12345567
cf5316ec8d General fixes for open handles, attempting to find and close all issues in server which are stopping shutdown of Jest suite. 2023-03-27 19:38:49 +01:00
mike12345567
2fb33e2cf3 Merge branch 'develop' of github.com:Budibase/budibase into feature/audit-logs 2023-02-27 14:51:33 +00:00
mike12345567
fefc6d920f Fixing open handle issue - now that the worker has access to queues needs to shut them down. 2023-02-27 14:41:28 +00:00
Rory Powell
2c46109e7d Enforceable SSO (#9787)
* Add ENFORCEABLE_SSO feature flag

* First draft of enforce sso configuration / show single sign on url

* Reading and writing isSSOEnforced + integration with login page

* Enable CI + lint

* Set correct base branch for CI

* Test fix for expected string changed

* Use tenant aware platform url as SSO link

* Bring in latest pro changes

* Lint

* Add useEnforceableSSO mock helper function

* Update configs.spec.ts with coverage for public settings

* Update users.spec.ts with additional tests for isPreventPasswordActions

* Lint

* Update refresh OAuthToken to use correct enum and add case statement
2023-02-27 13:42:51 +00:00
mike12345567
8853776c79 Moving around processors to separate audit logs out of central event handling. 2023-02-24 13:52:54 +00:00
mike12345567
22f42ef898 Adding new mechanism to get the ipAddress and userAgent of call for audit logs. 2023-02-21 19:14:57 +00:00
mike12345567
ef30c03fa6 Merge branch 'develop' of github.com:Budibase/budibase into feature/audit-logs 2023-02-21 17:26:24 +00:00
Rory Powell
cacf275a99 Prevent SSO users from setting / resetting a password (#9672)
* Prevent SSO users from setting / resetting a password

* Add support for ENABLE_SSO_MAINTENANCE_MODE

* Add typing to self api and build out user update sdk

* Integrate sso checks with user sdk. Integrate user sdk with self api

* Test fixes

* Move self update into SDK

* Lock down maintenance mode to admin user

* Fix typo

* Add health status response and return type signature to accounts.getStatus

* Remove some unnecessary comments

* Make sso save user function non optional

* Remove redundant check on sso auth details provider

* Update syncProfilePicture function name to getProfilePictureUrl

* Update packages/worker/src/sdk/users/events.ts

Co-authored-by: Adria Navarro <adria@revityapp.com>

* Add ENABLE_EMAIL_TEST_MODE flag

* Fix for logging in as sso user when existing user has password already

* Hide password update and force reset from ui for sso users

* Always disable sso maintenance mode in cloud

---------

Co-authored-by: Adria Navarro <adria@revityapp.com>
2023-02-21 08:23:53 +00:00
mike12345567
6d83ea9bec Adding in event auditing to server/worker. 2023-02-15 18:03:55 +00:00
Jonny McCullagh
c5bc0d4ffb add datadog apm (#9693)
* add datadog apm

* datadog init not start

* extra env vars for DD APM

* add datadog apm

* datadog init not start

* extra env vars for DD APM

* add datadog apm

* remove space

* Enable typescript integration with apm agents

* Fix typo

---------

Co-authored-by: Jonny <Jonny McCullagh>
Co-authored-by: Rory Powell <rory.codes@gmail.com>
2023-02-15 16:28:20 +00:00
Rory Powell
e5e767f18d Correlation id's and log context (#7232)
* Correlation id's and log context

* fix build

* Remove redundant fields from LoggingProcessor.ts

* Only log correlation id when present e.g. this is not present on startup / shutdown / automations
2023-01-11 20:39:33 +00:00
Rory Powell
fba7ef26ad Replace ts-jest with swc/jest (#9289)
- Add swc dependencies
- Add transform change to jest.config.ts
- Replace `export =` with `export default` in src code to enable code coverage to work with swc transformer
- Restructure backend-core errors package to allow for exporting error classes with ESM syntax
- Update backend-core to no longer use `export =`, export individual packages instead of replacing with `export default` for backwards compatibility
- Update event publishers to use `export default` - this was required for the `jest.spyOn` usage inside backend-core common mocks
- Restructure some jest.mock usages where declaring the jest.fn as a variable outside of the package mock threw an error
2023-01-11 09:37:37 +00:00
Rory Powell
786039055e File authentication using presigned URLs (#8883)
* file auth wip

* Private plugin bucket wip

* Add etag to logo request, fix circular dependency

* Resolve cyclic dependency

* Ensure browser doesn't cache custom component

* Global file fixes

* File fixes / remove permaUrl

* Add ctx local storage

* Enable presigned url to work from any host

* Test fix

* Self hosting w/ S3 + other fixes

* Fix for serving dev app in multi tenant

* Fix backup restore and import attachment url processing, never store attachment urls

* Test fixes

* Unit tests WIP

* Replace file path with base64 encoded private key

* Multi tenancy tests for files

* Environment files fixes

* Post-merge build and test fixes

* Add debug conditional to all jest logging and revert/fix prod minio proxy_pass

* Re-add default '/' minio route :(

* Rename iconFile -> iconFileName

* Add cloudfront vars to k8s templates

* Remove public bucket policy

* Remove duplicated test
2022-12-15 11:35:22 +00:00
Michael Drury
3dad683cb9 Adding back prod check. 2022-11-29 15:43:44 +00:00
Michael Drury
f65a6171d8 Fixing sentry init. 2022-11-29 15:38:25 +00:00
mike12345567
d6e9380c06 General work after running some tests in CI - general refactoring as well. 2022-11-28 17:54:04 +00:00
mike12345567
bfaef13768 Refactoring worker, converting all controllers/routes to Typescript and all imports of backend-core to new style. 2022-11-23 18:25:20 +00:00
Rory Powell
9973f2e161 Bump jest and ts-jest to be consistent across backend packages to fix CI issue, test config updates 2022-11-14 22:55:47 +00:00
Rory Powell
5f022e04a3 Merge branch 'develop' into user-fixes 2022-08-31 11:39:41 +01:00
Rory Powell
dd86875ea2 Update shutdown logging 2022-08-31 10:47:41 +01:00
Rory Powell
368b48719c Conditionally enable elastic apm 2022-08-30 10:59:27 +01:00
Rory Powell
59a53736ac update bulk create and bulk delete backend 2022-08-25 19:41:47 +01:00
mike12345567
cfe3db835b Updating pino logging to remove health check spam. 2022-08-04 20:23:45 +01:00
Rory Powell
361ffd224f Merge branch 'release' into feature/event-backfill 2022-06-06 09:50:06 +01:00
mike12345567
f1c81436cc Review comments and test fix. 2022-05-31 10:16:22 +01:00
mike12345567
b19882902b Adding process exits. 2022-05-30 21:24:23 +01:00
mike12345567
fa30457f2b Fixing issue with server not shutting down correctly when an error occurs, making sure that everything clears up gracefully. 2022-05-30 21:22:06 +01:00
Rory Powell
8e885075b6 handlers -> publishers and analtics -> processors 2022-05-10 10:33:59 +01:00
Martin McKeaveney
9ca4dacbaa merge with master 2022-04-26 10:21:45 +01:00
Vinoth Kirubakaran
ad87bc2bcf feat: made changes to worker and server packages to use global-agent to setup proxy from env variables 2022-04-20 16:00:03 +05:30
Rory Powell
41144db055 Remove remaining direct usage of CouchDB. Add common pouch config to backend-core 2022-04-19 16:45:27 +01:00
Maurits Lourens
8fa522cff0 add typescript support to worker 2022-01-20 09:15:46 +01:00
Renamed from packages/worker/src/index.js (Browse further)