Commit Graph

165 Commits

Author SHA1 Message Date
Rory Powell fa136ba4ca Sync versions of pro and backend-core 2022-04-25 12:19:36 +01:00
Martin McKeaveney 9f0cb41f49
Merge branch 'master' into gsheets-updates 2022-04-25 09:27:38 +01:00
Martin McKeaveney 0fbb841855 only save refresh token in google auth 2022-04-24 23:33:50 +01:00
Martin McKeaveney 33717ceb30 auto fetch access token in gsheets integration 2022-04-24 23:32:47 +01:00
mike12345567 9828fc6f58 Fixing an issue we've experienced with couch, using a base64 cookie that we control manually. 2022-04-22 17:24:50 +01:00
mike12345567 a6b249dc7e Adding a dep:clean function, cleaning up lock files and fixing backend-core test which did not utilise tenancy (no global db). 2022-04-21 15:20:23 +01:00
mike12345567 fe846f86a5 Fixing issues with test cases - a lot of test cases didn't setup tenancy in any format, which now means that the API endpoints they call would not have access to a Global DB instance. Also had to disable the closing of the database in test as this was removing the database from memory, meaning future calls would find an empty database when they opened it. 2022-04-21 14:56:14 +01:00
Dean 91a6f8645c Merge remote-tracking branch 'origin/develop' into feature/new-app-publish-workflow 2022-04-21 14:10:58 +01:00
mike12345567 9d01028bd0 Adding another check to make sure context is the same. 2022-04-20 23:13:08 +01:00
mike12345567 1d61ff906a Fixing some issues detected by the test cases, making the in-use mechanism for context more clear to complete avoid stack up of contexts (leading to loss of knowledge around previous databases. 2022-04-20 23:10:39 +01:00
mike12345567 9ee1be79fb Closing global DB using the standard function - not directly. 2022-04-20 18:07:48 +01:00
mike12345567 7792a07899 Some updates, making sure databases will always close directly using finally checks around the actual tasks, updating how replication works to have a close statement (to make sure it is controlled correctly) and then updating to PouchDB 7.3.0 for one of the memory leak fixes. 2022-04-20 17:33:42 +01:00
Rory Powell 2269bf677b Merge branch 'develop' into feature/licensing 2022-04-20 14:59:36 +01:00
mike12345567 ea6f580501 Initial version of memory leak protection, making sure that PouchDB databases are closed correctly after use, using a combination of closures wrapping DB gets (this replaces the getDB, leaving only a dangerousGetDB function which can be used in very very specific scenarios) and then closing the DB as part of CLS hooked functions finishing. Also moving the GlobalDB init to the tenancy middleware as this is used everywhere in the worker/app services - means that not all getGlobalDB calls require an async closure around them. 2022-04-19 19:42:52 +01:00
Rory Powell 769f48f935 Remove remaining direct usage of CouchDB. Add common pouch config to backend-core 2022-04-19 16:45:27 +01:00
Dean 4cc1a85f25 Code style check 2022-04-19 14:56:56 +01:00
Dean 3e74118f81 Unpublish refactored to stop development applications being mistakenly deleted. Minor updates to the modal content component to allow the replacement of the header. Further work to implement the publishing workflow changes 2022-04-19 14:38:09 +01:00
Andrew Kingston 98eefb1dd2
Merge pull request #5272 from Budibase/cheeks-lab-day-devtools
DevTools
2022-04-14 12:57:01 +01:00
Rory Powell 3018aaf078 Handle no developers on first time startup migration 2022-04-13 23:14:36 +01:00
Rory Powell dd740df387 Merge branch 'develop' into feature/licensing 2022-04-12 16:18:41 +01:00
Dean cbc3d3b946 Refactored the invalidate session functionality. 2022-04-07 12:32:00 +01:00
Martin McKeaveney d7dbaef8be
Merge pull request #5151 from mslourens/prevent_multiple_sessions
invalidate sessions before login
2022-04-06 22:18:17 +01:00
Andrew Kingston 7c91d9dceb Merge branch 'develop' of github.com:Budibase/budibase into cheeks-lab-day-devtools 2022-04-06 11:50:43 +01:00
Martin McKeaveney e263cc31bb merge with master 2022-03-30 15:44:22 +01:00
Maurits Lourens 9faaecb57e move invalidation to the creation of a session 2022-03-29 11:59:16 +02:00
Maurits Lourens f4557fb220 invalidate sessions before login 2022-03-29 10:06:54 +02:00
Martin McKeaveney ee6a16827a fixing google sheets bug, respect google configuration hierarchy 2022-03-28 16:44:33 +01:00
mike12345567 e073bdb5a4 Fix for #5103 - some templates are built on an older version that stored permissions differently, we can't migrate these as they will keep being added, easiest to just support the old method (apply the old rule and convert to the new format when retrieving roles). 2022-03-28 16:34:50 +01:00
Martin McKeaveney 3a7a964ac8 fix launch.json 2022-03-28 12:03:44 +01:00
Rory Powell ef629c9859 Fixes 2022-03-25 16:08:12 +00:00
Rory Powell bcc84bf1fd Link app context with tenancy, remove app tenancy middleware 2022-03-24 13:04:49 +00:00
Rory Powell cb6103a321 Fix cross tenant apps with session 2022-03-23 16:45:06 +00:00
Rory Powell 180e37b9f1 Tests complete + backwards compatibility for deployment 2022-03-22 00:23:22 +00:00
Rory Powell bf9f5488fc Merge branch 'develop' into feature/licensing 2022-03-21 17:13:16 +00:00
Rory Powell 336f0ff4a0 Published apps, automations and query count quotas 2022-03-20 01:13:54 +00:00
Rory Powell 62b360b9ea Add developer usage restrictions to SSO user creation 2022-03-18 08:01:31 +00:00
Rory Powell 893f82ac4d Better error handling around license errors 2022-03-16 17:29:47 +00:00
mike12345567 a5556595de Fixing an issue with the public API loading for the first time in a multi-tenant environment, also fixing an issue in self host when switching between environments with different secrets. 2022-03-14 19:05:02 +00:00
mike12345567 8dc2c9d480 Fixing an issue with detecting fully qualified Redis URL despite not in use. 2022-03-14 16:50:01 +00:00
mike12345567 c1c879309f Making the URL optional for application creation/update in OpenAPI spec, removing unused parameter and fixing getRedisOptions function to work with fully qualified URLs. 2022-03-10 15:53:23 +00:00
Rory Powell ccf2fe3d01 Self Host <-> Licensing integration 2022-03-09 21:16:22 +00:00
Rory Powell c22fb79d94 Merge branch 'develop' into labday/status-banner 2022-03-08 16:31:07 +00:00
Rory Powell d6092b9133 Integrate usage quotas with licensing 2022-03-08 14:21:41 +00:00
Rory Powell 995f7c4b58 Move licensing middleware to pro repo 2022-03-08 08:01:41 +00:00
Rory Powell 3b9303a1fb Enforce licensed developer count + error types/codes framework 2022-03-04 13:42:50 +00:00
Rory Powell 515ade6bd3 Add shared licensing cache 2022-03-03 13:37:04 +00:00
Rory Powell c67de30d8c Invalidate user cache on logout 2022-03-03 07:20:30 +00:00
Rory Powell 091f054e8a Handle no license found 2022-03-02 07:27:14 +00:00
Rory Powell 8ff9aac4f8 Start to integrate licensing with sessions 2022-03-01 21:11:45 +00:00
mike12345567 f3418044dc Starting to fix up test cases. 2022-02-25 15:55:19 +00:00
mike12345567 f2c2c903e5 Merge branch 'develop' of github.com:Budibase/budibase into feature/budibase-api 2022-02-24 18:19:20 +00:00
Rory Powell 9fcf702a32 Add status banner that reacts to cypress healthcheck failures 2022-02-24 14:41:24 +00:00
Andrew Kingston 40c6976035 Merge branch 'develop' of github.com:Budibase/budibase into cheeks-lab-day-devtools 2022-02-24 14:03:29 +00:00
mike12345567 c189550614 Adding controllers for row, query and applications public APIs. 2022-02-23 18:31:32 +00:00
mike12345567 6a416cad59 Refactoring how endpoints are specified so that the middlewares can be applied in a more generic fashion. 2022-02-22 18:40:09 +00:00
Rory Powell 65b0455313 Fix app list retrieval in migrations 2022-02-22 07:49:33 +00:00
mike12345567 282fa6cac2 Merge branch 'develop' of github.com:Budibase/budibase into feature/budibase-api 2022-02-21 16:54:39 +00:00
Rory Powell d673d27563 Respect custom tenantIds in run migrations endpoint 2022-02-21 15:27:51 +00:00
mike12345567 97337db4ee Merge branch 'develop' of github.com:Budibase/budibase into feature/budibase-api 2022-02-21 14:34:06 +00:00
Rory Powell d9ead48c59 Deprovision and local couch db url fix 2022-02-18 17:36:23 +00:00
Rory Powell a8a8e97840 Add 'location = /' -> 4001 to nginx dev conf 2022-02-18 11:18:59 +00:00
mike12345567 ab3971034d Quick fix for checklist API performance on default tenant in cloud. 2022-02-16 11:59:43 +00:00
Michael Drury f04a29dfef Using 10K iteration string stretching for encryption. 2022-02-14 21:37:40 +00:00
mike12345567 92d457ac00 Adding basic encrypt/decrypt pathway. 2022-02-14 18:32:09 +00:00
mike12345567 84bf8c3422 Adding tenancy to the API key, making the authenticated middleware aware of new user API keys, using a view to lookup the user by API key. 2022-02-11 22:24:48 +00:00
mike12345567 dff24e402d Getting api key/dev info docs setup and in use. 2022-02-10 19:06:49 +00:00
Martin McKeaveney 20b4f5aadc merge with master 2022-02-10 18:57:26 +01:00
Martin McKeaveney ff50dd9f6d merge with master 2022-02-10 18:24:36 +01:00
Martin McKeaveney dfe9861383 use google env variable for client secret and ID, update helm chart to pass variables to worker 2022-02-10 10:28:46 +01:00
Martin McKeaveney f574c90de3 use env platform URL for datasource auth to prevent tenant overrides 2022-02-09 18:33:29 +01:00
Andrew Kingston 04d53a709c Merge branch 'develop' of github.com:Budibase/budibase into frontend-core 2022-02-07 14:45:14 +00:00
mike12345567 f9a7bb001f Fixing issue which was blocking the ability to logout fully, as well as causing issues with new user signup and password reset. 2022-02-04 17:35:45 +00:00
mike12345567 8f7a8553bb Fix for #4267 - allow admins to access all roles. 2022-02-04 17:34:39 +00:00
Andrew Kingston 9f2369234b Merge branch 'develop' of github.com:Budibase/budibase into frontend-core 2022-02-03 14:46:59 +00:00
Michael Drury e1a4136f9c Fixing a typescript issue in server. 2022-02-01 20:29:12 +00:00
Andrew Kingston 312571314d Merge branch 'develop' of github.com:Budibase/budibase into frontend-core 2022-02-01 16:46:00 +00:00
mike12345567 9fa10ff02f Refactoring backend-core tenancy to context, splitting out tenancy functionality to its own area. 2022-01-31 17:53:19 +00:00
mike12345567 03b4b29b01 Review comments, renaming deployed -> prod in terms of app IDs. 2022-01-31 17:42:51 +00:00
mike12345567 09cfa9508e Merge branch 'develop' of github.com:Budibase/budibase into lab-day/refactor-app-db 2022-01-31 17:16:59 +00:00
mike12345567 76e24018be Merge branch 'develop' of github.com:Budibase/budibase into lab-day/refactor-app-db 2022-01-31 14:09:07 +00:00
Andrew Kingston f32cfdd3b9 Merge branch 'develop' of github.com:Budibase/budibase into frontend-core 2022-01-31 09:40:33 +00:00
Rory Powell a153e920c9 Merge branch 'develop' into feature/migrations-2.0 2022-01-30 22:37:11 +00:00
Rory Powell 3ce4f32250 Merge branch 'develop' into csrf 2022-01-30 21:20:48 +00:00
mike12345567 4b1331450c Fixing some issues discovered by the cypress tests, cleaning up how Couch is used. 2022-01-28 18:52:34 +00:00
mike12345567 417bf98ec9 Tests updating, all now passing, fixed some issues discovered by them. 2022-01-28 15:43:51 +00:00
Rory Powell 89fb5feeeb Fix loop early exit 2022-01-28 11:32:28 +00:00
Michael Drury 91c2a40c89 Final pass refactoring - need to test but all code in server converted. 2022-01-28 00:05:39 +00:00
mike12345567 40c6eb2007 Main body of work, refactoring most usages. 2022-01-27 18:18:31 +00:00
Rory Powell 8304ee0fc7 Merge branch 'develop' into feature/migrations-2.0 2022-01-27 10:49:52 +00:00
Rory Powell e8e6fc549d Add app db support + app url migration 2022-01-27 10:40:31 +00:00
Andrew Kingston 617ddf7092 Merge branch 'develop' of github.com:Budibase/budibase into frontend-core 2022-01-26 17:49:27 +00:00
Martin McKeaveney 203c892f33 code review and merge with develop 2022-01-26 17:45:28 +01:00
Martin McKeaveney 5d59db8fd2 code review 2022-01-26 17:14:47 +01:00
Andrew Kingston 515d4f91c0 Merge branch 'develop' of github.com:Budibase/budibase into frontend-core 2022-01-26 16:02:27 +00:00
Rory Powell 420684a862 Merge branch 'develop' into feature/migrations-2.0 2022-01-26 15:00:52 +00:00
Rory Powell 0b6a8469de Don't apply csrf to existing sessions. Handle only supported content types 2022-01-26 12:52:53 +00:00
Rory Powell 716e254bdd Revert "Fix dev app preview return url"
This reverts commit e76ea10fc2.
2022-01-26 09:33:14 +00:00
Rory Powell 5cb6e19274 Add CSRF Token 2022-01-25 22:54:50 +00:00
Andrew Kingston 2ea242e396 Use correct casing for login error 2022-01-24 19:15:43 +00:00
Rory Powell a66f14a289 Migrations 2.0 2022-01-24 10:48:59 +00:00