mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-04-25 13:46:02 +03:00
[GH-ISSUE #1856] Service worker prevents external auth #535
Labels
No labels
AS
can't reproduce
can't reproduce
deployment
development
documentation
duplicate
duplicate
ee
enhancement
external
new driver
performance
pull-request
third party issue
wait for response
wait for review
wontfix
x:Oracle
x:cassandra
x:clickhouse
x:db2
x:duckdb
x:greenplum
x:h2
x:h2gis
x:hana
x:hive
x:intersystems
x:kyuubi
x:maria
x:mongo
x:mysql
x:postgresql
x:presto
x:sql server
x:sqlite
x:teradata
x:trino
xf:accessibility
xf:administration
xf:ai
xf:authentication
xf:aws
xf:commit-mode
xf:connection
xf:dark theme
xf:data editor
xf:datatransfer
xf:dba
xf:driver management
xf:erd
xf:filters
xf:i18n
xf:i18n
xf:installer
xf:json
xf:kerberos
xf:ldap
xf:local config
xf:log viewer
xf:metadata
xf:metadata editor
xf:navigator
xf:okta
xf:query manager
xf:resource manager
xf:scripts
xf:sql editor
xf:tasks
xf:ui/uix
xo: Firefox
xo:eclipse
xo:internet explorer
xo:macos
xp:major
xrn:internal
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cloudbeaver#535
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vbezhenar on GitHub (Jul 27, 2023).
Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/1856
In the previous cloudbeaver versions I used it with external authentication. Basically when user opened cloudbeaver.mysite.com, this request was checked for auth cookie by external reverse proxy and if that cookie was not present, it was redirect to the login page and eventually back with cookie set. This all happened outside of cloudbeaver code. Only after auth cookie is present, requests were allowed to pass to actual cloudbeaver instance.
In the recent versions service worker was introduced. Request for cloudbeaver.mysite.com was no longer needed, so user gets UI opened without valid server request and response. However graphql requests were denied with HTTP 302 response, because auth is not given yet or previous auth was expired. Cloudbeaver cannot interpret those responses properly and just errors out.
The worst thing is that there's no proper way for user to get out of this situation. The only way to get out is to open developer tools and unregister service worker.
Ideally cloudbeaver frontend service worker should request cloudbeaver.mysite.com and check its response. If response is 302, it should redirect user to the specified location before attempting any API requests.
Or just don't cache index page. I mean, it's not offline-first application and is not going to work offline anyway.