Commit Graph
48 Commits
Author SHA1 Message Date
alamin-br ba24b135b2 fix: rotate refresh tokens and revoke the session when an old one is reused (#6519)
* fix: rotate refresh tokens and revoke the session when an old one is reused

A refresh token could be replayed to get new access tokens until it expired,
so a leaked token gave access for up to seven days.

* test: mint the refresh token inside the frozen time

The token was minted at the real time, so refreshing at an earlier frozen time failed once the clock passed it.

* fix: document the rotated refresh token in the token refresh response

The schema checked simplejwt's own rotation setting, which is off, so the API docs left out refresh_token.

* fix: keep the user session valid across refresh token rotation

The previous release crashed on the new cookie payload, and the cookie stopped
working as soon as its refresh token rotated.

* test: sign out through the API in the secure file serve test

Signing out revokes the session, which is what the user session cookie checks now.
2026-10-28 13:39:52 +01:00
Davide Silvestri 64c9fff85e feat [6/8]: prepare AI provider management for rollout (#6070)
* feat: retire AI provider flag and add rollout audit

* test: remove obsolete AI provider flag setup and docs

* chore: clean up AI provider configuration and tests

* feat: deprecate legacy AI provider environment configuration

* docs: explain AI provider migration sizing and timing

* docs: mark AI provider migration audit for removal

* docs: explain AI provider migration audit usage

* fix: log AI provider env deprecations after logging setup

log_ai_provider_env_deprecations() ran at the tail of _setup_health_checks(),
which ready() calls before setup_logging(). The notice went out through
loguru's default sink and missed BASEROW_BACKEND_LOG_LEVEL, the Baserow
format, and the OpenTelemetry log exporter, so operators shipping logs to a
collector never saw it.

Also drop two references the flag removal invalidated: the getEffectiveAIAgentModels
JSDoc still described filtering as conditional on the removed provider flag, and
the AI field architecture doc still pointed provider authors at the deleted
legacy workspace-setting hook. That doc now names BuiltInGenerativeAIModelType,
which is what grants an integration override model inheritance.

* fix: reuse environment AI settings in generation workers

* feat: import legacy AI provider settings on upgrade

Removing the ai-providers flag makes database-backed providers the default, which
would leave every existing installation on an empty AI providers page with a
management command as the only way to populate it. A data migration imports the
environment and each workspace's stored settings instead, so a standard upgrade
needs no commands.

Both scopes are imported in one migration. Legacy workspace settings replaced the
instance ones entirely, while database providers inherit, so each imported workspace
is also switched off the instance provider of the same type. Without that a workspace
would silently gain models billed to the instance account.

Settings that cannot fit their columns are skipped and logged rather than raising
DataError and rolling back the whole upgrade. The migration reverses as a no-op
because the previous version does not read these tables, so deleting rows would only
discard edits made during a rollback window.

migrate_ai_provider_settings stays as the recovery path and now shares its planning
logic with the migration, so both agree on which legacy settings are complete. It
deliberately does not switch workspaces off inherited providers, and warns instead.

* chore: remove the temporary AI provider audit command

audit_ai_provider_settings existed to inventory legacy configuration before a manual
import. The upgrade now imports automatically, so the command has no remaining step
to support. Removal was already tracked in #5749.

* docs: reduce AI provider docs to lasting behaviour

The upgrade procedure, rehearsal plan and sizing query described a one-time
transition and do not help anyone after the release; they live in the pull request
instead. What remains explains how providers work: the two scopes, how they combine,
the inheritance switch, what the deprecated environment variables still do, and how
integration overrides and published applications behave.

Also corrects claims that no longer hold: published applications keep materialised
credentials only when they were published before the upgrade, the import is no longer
optional, and a workspace-owned provider suppresses the environment fallback too.

* docs: shorten the AI provider changelog entries

Bullet points render as single list items under the entry. The released entries
average around twenty characters; these ran to four hundred, so the detail belongs
in the AI providers guide rather than the changelog.

* docs: clarify where imported AI credentials are stored

The previous wording implied Baserow's own exports carry provider credentials.
They do not: AIIntegrationType lists ai_settings as a sensitive field and
ImportExportConfig excludes those by default, and AIProviderConfig is not part of
any export path.

* docs: explain the AI provider upgrade and where to configure providers

State that the upgrade imports the BASEROW_* provider variables once and no longer
reads them, list the exceptions, and give the exact navigation for instance admins
(Admin tools -> AI providers) and workspace admins (workspace Settings -> AI
providers). Map each deprecated variable to the field that replaces it.

* fix: renumber the legacy AI provider import after 0121_agent

Develop's core 0121_agent and this branch's import migration both depended on
0120, leaving two leaf nodes, so migrate refused to run and the startup check and
E2E shards failed. The import is now 0122 and depends on 0121_agent.

* feat: remove the legacy workspace generative AI settings endpoint

GET/PATCH /api/workspaces/{id}/settings/generative-ai/ had no caller left, yet a
PATCH was still honoured for any provider type without a workspace provider and
never shown in the AI providers UI. Remove it with the handler parameter,
receivers and frontend handler that only it could trigger.

* fix: stop instance AI provider changes from fanning out per workspace

An instance-level change queued one Celery task per 25 workspaces behind a global
blocking lock, sent a payload to every connected user, and made the premium receiver
serialize every AI field on the instance. Instance changes now notify staff only;
other users see them after a reload. The render lock is per scope, and the in-use
guards no longer read one row per workspace.

* fix: keep inherited Kuma when a workspace switches off the instance provider

The upgrade switches imported workspaces off the same-type instance provider, which
made an inherited instance Kuma model invalid there, so Kuma fell back to the
deprecated env model or turned off. Inheriting the instance Kuma selection now
ignores workspace switch-offs; explicit workspace selections stay strict and are
the only ones that block a switch-off.

* fix: skip malformed Ollama URLs during AI provider migration

* fix: preserve skipped legacy AI provider connections

* test: cover independent legacy AI workspace connections

* fix: skip malformed legacy AI provider settings

* fix: move legacy AI import after current core migrations

The linear rebase omitted the migration renumbering from the previous merge commit, while develop advanced through core 0124. Rename the existing AI import to 0125, depend on 0124, and update its historical migration test so core has a single leaf.
2026-09-25 17:05:10 +02:00
Bram 35866e79de All workspaces homepage [2/7] Added all workspaces page and sidebar (#5980)
* Added all workspaces page and sidebar

* Show error if workspace is not found

* Fixed feedback

* Fixed feedback

* Fix test
2026-09-23 22:44:24 +02:00
Bram 42371d6beb feat: Add skeleton loading animation and make pages load instantly (#6023) 2026-09-09 11:03:03 +02:00
Davide Silvestri f27bb387fe feat [3/8]: add workspace AI provider management and complete AI Field resolution (#5785)
* feat: add workspace AI providers for AI fields

* fix: address workspace AI provider review feedback

* fix: address remaining AI provider review feedback

* fix: resolve core migration conflict

* fix: stabilize premium AI provider tests

* address feedback for local imports
2026-08-20 10:49:57 +02:00
Davide Silvestri 4feb259e10 chore(deps): upgrade Nuxt to 4.5.0 and Vue ecosystem (#5763) 2026-08-05 16:05:01 +00:00
Davide Silvestri c3706658a2 feat [1/8]: add instance AI provider management behind a feature flag (#5740)
* feat: add instance AI provider management

* fix: simplify AI provider testing

* fix: remove extra model list spacing

* fix: show AI provider form errors inline

* fix: use icons for AI provider row actions

* fix: place model errors before help text

* chore: polish code

* fix: address feedback

* fix: address remaining frontend CI failures
2026-07-27 14:12:37 +00:00
alamin-br 1331341bfa Fix: impersonate a user result in 403 error page (#5418)
* fix: Impersonating a user results in a 403 error page

* chore: add changelong entry for impersonate bug fix

* chore(changelog): fix typo in file name

* fix: change approach to fix impersonate user issue
2026-05-26 16:49:12 +02:00
Jérémie Pardou 2daacc7bea chore: improve error handling in frontend (#5109) 2026-05-13 19:36:30 +00:00
dimmur-brw 3a431d246c fix (nuxt): instance unavailable errors (#5064) 2026-04-07 07:18:29 +02:00
Davide SilvestriandCopilot 528581fb9b chore (deps): upgrade nuxt to 3.21.2 (#5039)
* chore (deps): upgrade nuxt to 3.21.2

* chore (deps): upgrade prttier, eslint and vitest

* fix(frontend): move dashboard redirect to middleware for Nuxt 3.21 compat

The dashboard page had a top-level `await navigateTo()` in `<script
setup>` that triggered chained navigation during Suspense. Nuxt 3.21's
"force remount suspense when navigating after pending" change caused
this to deadlock — the URL would update but the page never re-rendered.

Move the workspace redirect logic into a dedicated `dashboardRedirect`
middleware that runs before the component setup, avoiding the issue.

* Address feedback

* Update web-frontend/modules/core/middleware/dashboardRedirect.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-27 09:43:58 +00:00
Jonathan Adeline 8237644b44 Prevent 404 errors from being sent to Sentry (#4836) 2026-02-25 16:26:56 +04:00
Jérémie PardouandJonathan Adeline 815bb560cb AB nuxt3 fixes (#4774)
* Fix sort in data source

* Fix bug in preview authentication

* chore: Remove `applicationContext` from table page metadata.

* chore: Remove `applicationContext: true` from `definePageMeta` in automation workflow and dashboard pages.

---------

Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
2026-02-16 18:50:54 +01:00
Jonathan Adeline 7c88d30ada Fix sidebar application views selection (#4728) 2026-02-12 19:18:44 +04:00
dimmur-brw 608a4a52d2 Various fixes for nuxt3 migration (#4604) 2026-02-11 11:29:32 +01:00
Jérémie PardouandJonathan Adeline ca72db9a16 Nuxt3 builder fixes and cleanup (#4657)
* Fix preview error with page parameter

* Fix OIDC form support

* Fix input border color

* Fix some builder inputs

* Clear some TODO MIGs

* Clean comments

* Update snapshot

* Fix page title

* Fix reactivity issue

* refactor: replace individual RadioButtons with a RadioGroup component for choice option type selection.

* Fix domain

---------

Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
2026-02-11 11:07:26 +01:00
Jonathan Adeline 3178e90009 Fix multiple refresh token api calls (#4715)
* fix: ensure external navigation to login on refresh token failure

* refactor: remove old Nuxt 2 middleware comment and clarify 401 redirect behavior.
2026-02-10 20:14:20 +04:00
Jonathan AdelineandJeremie Pardou 6da14998fc Remove process.env (#4685)
* refactor: Update URL validation to use runtime config and clean up feature flag plugin code.

* refactor: Migrate module environment variable handling to Nuxt runtime config, utilizing `env-remap.mjs` for backward compatibility.

* Add debug page to show all runtime variables

---------

Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2026-02-10 20:11:00 +04:00
Jonathan Adeline e5c3aa4353 Nuxt3 migration continue (#4595)
* Refactor store registration to use SSR methods across multiple plugins for improved state management

* fix database file field drag and drop

* fix storybook dependencies warning.

* refactor: Replace `useAsyncData` with a direct `watch` and `renderMarkdown` function for markdown content.

* fix workspace hydratation warning

* replace direct `role.isBillable` access with `roleIsBillable` computed property

* fix auth settings form

* fix alert slot usage

* please linter

* please prettier

* fix SSR rendering

* refactor: simplify relay state URL generation by directly passing the user source object.

* refactor: Replace `registerModuleSSR` with `registerModuleNuxtSafe` for Vuex module registration across all plugins.

* please linter

* fix: add retry logic for Firefox NS_BINDING_ABORTED navigation errors in E2E tests

* test: reload page and assert link visibility using getByRole after setting parameters.

* refactor: simplify `goto` navigation by removing retry logic and adding a fixed delay.

* refactor: trigger initial markdown rendering via immediate watcher option

* update snapshots
2026-02-09 17:32:12 +04:00
716d43a9a8 Nuxt 3 migration (#4342)
Update the nuxt3 version.

Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
Co-authored-by: Bram Wiepjes <bramw@protonmail.com>
Co-authored-by: Cezary <cezary@baserow.io>
Co-authored-by: Tsering Paljor <tsering@baserow.io>
Co-authored-by: Przemyslaw Kukulski <przemyslaw+gh@baserow.io>
Co-authored-by: Bram <bram2w@users.noreply.github.com>
2026-01-22 10:27:19 +01:00
Przemyslaw Kukulski e138f0ba54 Secured file access not working when authenticated with SSO 2025-03-04 08:52:27 +00:00
Bram Wiepjes ecceffa968 Move admin dashboard, user, and workspace to core 2024-12-12 19:41:04 +00:00
Jonathan Adeline 2df101c80c Add new workspace homepage 2024-07-25 17:05:43 +00:00
Bram Wiepjes 248df5d8d1 Fix empty user object when in onboarding redirect 2024-05-29 21:35:40 +02:00
Bram Wiepjes 2a07ac3f0e Improved onboarding 2024-05-24 13:26:26 +00:00
Jérémie Pardou b17daa1e49 Resolve "Add database + application templates" 2024-05-02 14:25:42 +00:00
Jérémie Pardou add9bb3a97 Change sameSite policy of userSourceCookie to work in more situations 2024-04-25 12:38:33 +00:00
Jérémie Pardou 4b1e479b78 Resolve "Handle end user authentication on application builder" 2024-02-28 20:20:30 +00:00
Petr Stribny c3f467ce5c Fix redirect param being propagated 2023-06-06 11:01:11 +02:00
Peter Evans 0426ead072 Resolve "Rename group to workspace in frontend code." 2023-03-28 14:40:58 +00:00
Nigel Gott a17536b505 Resolve "Allow embedding iframes of Baserow to work with authentication cookies" 2023-03-06 19:46:39 +00:00
Davide Silvestri 25cf6c6420 Stop deleting the refresh token for a network error 2023-01-09 13:21:55 +00:00
Davide Silvestri 43d02379c5 Fix bug when authentication middleware fails to renew the token 2022-12-01 10:15:59 +00:00
Davide Silvestri 0d6cd7a644 Resolve "Frontend fails to renew the access token after a network error" 2022-11-24 10:19:27 +00:00
Jeremie Pardou-Piquemal 210c02085d Add RBAC to Baserow. 2022-10-28 18:45:34 +01:00
Davide Silvestri 4895f8a5f7 Resolve "SSO: Add SAML2 endpoints" 2022-10-28 16:04:23 +00:00
Davide Silvestri 87960cb885 Resolve "Fix the refresh_token for longer user sessions" 2022-10-27 09:45:34 +00:00
Bram Wiepjes 2a40ab8cb2 Only fetch pending jobs when needed 2022-10-17 13:40:27 +00:00
Davide Silvestri d29843ef8b Resolve "Run Template imports as async tasks in celery" 2022-10-10 10:03:12 +00:00
Nigel Gott 32d40cc54d Resolve "Add check of BASEROW_PUBLIC_URL and PUBLIC_BACKEND_URL to make sure they are valid" 2022-07-01 06:51:55 +00:00
Bram Wiepjes e26824031a Resolve "Disable Signup" 2021-02-17 20:36:11 +00:00
Bram Wiepjes 23c11e4190 Resolve "Redesign left sidebar" 2021-02-10 17:14:37 +00:00
Bram Wiepjes 6d1d3c86a7 Resolve "Show error when the web-frontend can't connect to the backend when rending the page server side." 2021-02-09 10:29:53 +00:00
Bram Wiepjes 01c8e650f6 Resolve "Look into the cookies for non secured connections" 2020-11-22 14:50:36 +00:00
Bram Wiepjes d6c97ed5bf refactored key name and modified existing row endpoints so that they support token authentication with permissions 2020-11-02 16:47:20 +00:00
Bram Wiepjes b2aa2ffdb6 Resolve "Fix sandbox environment" 2020-04-03 15:01:47 +00:00
Bram Wiepjes b27f453050 Resolve "Upgrade python and js dependencies." 2020-03-31 14:15:27 +00:00
Bram Wiepjes be2c5c4d4f Resolve "Web frontend refactor" 2020-03-27 13:19:43 +00:00