Commit Graph

25 Commits

Author SHA1 Message Date
Rory Powell cf0200d695
Rotatable secrets (#9982)
* Rotatable secrets

* Set new api encryption key var

* Lint

* Use fallback keys instead of array

* Point api encryption key to dedicated value

* Add API_ENCRYPTION_KEY to cli

* Lint + add api encryption key to env files
2023-03-13 15:02:59 +00:00
Rory Powell 1b041c41c3
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
Rory Powell 1dc3d44a44 Enable higher concurrency and resiliency in worker tests 2023-02-13 11:57:30 +00:00
adrinr c747cabe73 Rename name for id 2023-02-03 12:09:56 +00:00
adrinr 6d3117d6ac Dry 2023-02-03 11:28:27 +00:00
adrinr 9f8ef17e01 Remove addTenantToGlobalDb from helpers 2023-02-03 09:59:57 +00:00
adrinr 5253f68d61 Race conditions 2023-01-31 22:50:52 +00:00
adrinr 2be442b7f4 Expose beforeall error 2023-01-31 11:48:58 +00:00
adrinr 60fc564efd Start race condition 2023-01-30 18:51:22 +00:00
adrinr 430feeee92 Add retry to prevent race conditions 2023-01-30 18:12:06 +00:00
adrinr 9b3faca008 Fix tenancy issues 2023-01-30 16:45:04 +00:00
adrinr a85ce86794 Fix test after patch 2023-01-30 16:39:15 +00:00
adrinr 81b5a615b8 Fix worker tests 2023-01-27 17:59:14 +00:00
Rory Powell 0b2a445a9a
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
Peter Clement 9bf37b34ae
Server and Worker tests (#8928)
* automation unit tests

* row processor tests

* update executeQuery test

* update groups assertion

* some more worker tests

* plugin tests and tidying up

* linting

* temporarily disable group tests

* more tests

* fix import

* fix backup tests

* add pro mocks to worker

* check for app existence in import test

* test new tsconfig

* testing changes

* Pro test utils (#9020)

* Pro test utils changes

* Add test fixes

* Remove ts-ignore

Co-authored-by: mike12345567 <me@michaeldrury.co.uk>
Co-authored-by: Rory Powell <rory.codes@gmail.com>
2022-12-12 22:02:32 +00:00
mike12345567 b5b74b9cad General work after running some tests in CI - general refactoring as well. 2022-11-28 17:54:04 +00:00
mike12345567 bf86640e9d Merge branch 'develop' of github.com:Budibase/budibase into feature/replace-pouch 2022-11-16 18:12:31 +00:00
mike12345567 b0f6224c18 Some major reworks towards higher levels of typescript. 2022-11-16 17:23:12 +00:00
Rory Powell 6017f6be47 Add copy button to sso callback urls, e2e unit testing for OIDC, stub out other auth tests 2022-11-16 11:34:16 +00:00
Rory Powell ad81adb30f Merge branch 'develop' into subdomain-tenancy 2022-11-15 16:18:59 +00:00
Rory Powell 2212305f08 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 80b823f6cf Test fixes 2022-11-11 15:43:41 +00:00
Rory Powell 0bad2dd9ae Support path variable tenancy detection, add /api/system/* tests, update no tenancy matchers to be more accurate 2022-11-11 11:10:07 +00:00
Rory Powell b331f47aa4 Update user creation UI 2022-08-25 22:56:58 +01:00
Rory Powell a519eb0cdc update bulk create and bulk delete backend 2022-08-25 19:41:47 +01:00