49 Commits

Author SHA1 Message Date
Pavel Tiunov
c95317be96 fix: cached GraphQL schema can result in missing members if used with access policies (#10590)
* fix(api-gateway): cache unfiltered GraphQL schema with RBAC enforced at query time

Instead of adding JS-side member validation for GraphQL RBAC enforcement,
rely on the existing Rust-side validation in query_result_transform.rs.

The Rust transform layer already checks if requested members are present
in the RBAC-filtered annotation map and throws 'You requested hidden member'
errors for inaccessible members.

Changes:
- Build GraphQL schema from unfiltered metadata (skipVisibilityPatch) so it
  can be safely cached across security contexts sharing a CompilerApi
- Add skipVisibilityPatch option to CompilerApi.metaConfig() to bypass
  RBAC visibility patching when building the shared GraphQL schema
- Add integration test verifying RBAC enforcement through GraphQL

Co-authored-by: Pavel Tiunov <pavel.tiunov@gmail.com>

* ci: add smoke:rbac-graphql test to CI pipeline

Add the new RBAC GraphQL integration test to:
- packages/cubejs-testing/package.json as smoke:rbac-graphql script
- .github/actions/smoke.sh to run in integration-smoke CI job

Co-authored-by: Pavel Tiunov <pavel.tiunov@gmail.com>

* fix(cubeorchestrator): validate query members against annotation even with empty results

When RBAC denies access to a member, the query gets a '1=0' filter that
returns zero rows. Previously, the Rust get_members() function would
short-circuit on empty columns (derived from zero rows) without checking
if the requested members were actually accessible.

Now validate_query_members_in_annotation() checks the query's measures,
dimensions, segments, and time dimensions against the annotation map
even when db_data.columns is empty. This ensures 'You requested hidden
member' errors are returned for RBAC-denied members regardless of
whether the query returns data.

Also adds a test for the hidden member + empty dataset scenario.

Co-authored-by: Pavel Tiunov <pavel.tiunov@gmail.com>

* fix(cubeorchestrator): exclude segments from empty-result member validation

Segments are not included in the annotation map (which only contains
measures, dimensions, and time dimensions). The rlsAccessDenied
synthetic segment added by RBAC denial would incorrectly trigger the
hidden member error when validated against the annotation.

Co-authored-by: Pavel Tiunov <pavel.tiunov@gmail.com>

* test(testing): update smoke-rbac tests for hidden member error behavior

Now that the Rust transform validates query members against the annotation
even with empty results, RBAC-denied members return 'You requested hidden
member' errors instead of silently returning empty data.

Updated tests:
- line_items hidden price_dim: expect error instead of empty result
- orders_view and cube with default policy: expect error for orders_view.count
  when user has no matching access policy on the view

Co-authored-by: Pavel Tiunov <pavel.tiunov@gmail.com>

* test(testing): remove obsolete orders_view_rest snapshot

The orders_view_rest snapshot is no longer used after updating the test
to expect a hidden member error instead of empty results.

Co-authored-by: Pavel Tiunov <pavel.tiunov@gmail.com>

* refactor(cubeorchestrator): extract ensure_member_in_annotation to deduplicate hidden member checks

The hidden member error was duplicated in three places:
- get_members (column-based check for non-empty results)
- get_vanilla_row (per-row alias check)
- validate_query_members_in_annotation (query member check for empty results)

Extract ensure_member_in_annotation() and use it in all three places.

Co-authored-by: Pavel Tiunov <pavel.tiunov@gmail.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-03-31 20:37:03 -07:00
Dmitry Patsura
71afbbb127 chore(ci): Remove examples-publish workflow 2026-02-03 10:43:46 +01:00
Konstantin Burkalev
6dd32245e8 chore(ci): Disable Vertica tests until vertica docker image will be available (#9910)
@see https://github.com/vertica/vertica-containers/issues/64
2025-08-21 11:53:20 +03:00
Dmitry Patsura
aaa90f01bd chore(ci): Extract maximize build space as action (#9840) 2025-07-31 16:47:58 +02:00
Konstantin Burkalev
97b6bb43b9 feat(prestodb-driver, trino-driver): Support dbUseSelectTestConnection flag (#9663)
With this flag set to true - use `SELECT 1` query for testing connection
2025-06-18 11:32:36 +03:00
Konstantin Burkalev
fa1d9f4192 chore(ci): Fix codecov coverage collection within CI jobs (#9559)
* chore(ci): Fix codecov coverage collection within CI jobs

* fix codecov to git paths

* fix codecov flags

* another try

* another try

* remove debug

* another try

* Potential fix for code scanning alert no. 416: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* fix

* fix

* another fix

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-05-09 19:34:04 +03:00
Konstantin Burkalev
aa898e24e0 chore(ci): Remove obsolete cloud workflow (in favor of extending push wf) (#9491) 2025-04-23 15:25:36 +03:00
Konstantin Burkalev
43ee44f93f chore(ci): Upgrade outdated GitHub runners (#9298)
* bold attempt to upgrade runners

* fix mongodb-bi version

* drop 2017-latest MSSQL from tests

* fix integrations tests CI Run

* dedup testcontainers package

* fix missed 2017-latest version

* attempt to fix Build cross image

* enable debug for mongobi

* revert mongobi

* edit to run integration tests on 2404

* try to update Build cross image to 2404

* use 22.04 for native builds
2025-03-05 20:15:26 +02:00
Konstantin Burkalev
c43340d9cc feat(vertica-driver): Introduce VerticaDriver (#9081)
* feat(vertica-driver): VerticaDriver

* fixed linter error

* fix dependencies versions

* driver & smoke tests

* vertica driver added to integration tests

* add vertica to smoke test

* update packages

* vertica driver published

* vertica driver

* update README.md

* docker installation instruction

* up version

* update README and package refs

* add cube build pipeline

* remove

* Added Query Implementation (#2)

* Added custom dialect for CubeDriver

* Sql fixes (#5)

* Additional sql fixes (#6)

* draft

* update test

* fix build

* update vertica driver dependencies

* vertica documentation

* add vertica to data sources

* fix lint errors

* update jest

* include vertica tests

* update wait strategy and test shared package

* change version of vertica driver

* some ci-related fixes

* fix version, names, refs to align with the Cube repo

* update yarn.lock

* fix old refs

---------

Co-authored-by: Eduard Karacharov <eduard.karacharov@gmail.com>
Co-authored-by: timbrownls20 <timbrownls26@hotmail.com>
Co-authored-by: Roger <qi.chen@knowitall.net.au>
Co-authored-by: David O'Bryen <dj.obryen@gmail.com>
2025-01-09 11:07:46 +02:00
Konstantin Burkalev
1cf867ac75 chore(dremio-driver): add basic integration tests for dremio cloud (#9046) 2024-12-16 12:47:30 +02:00
Konstantin Burkalev
9d6ab17d08 chore(firebolt-driver): Setup CI tests (#9019)
* chore(firebolt-driver): code polishment and fix lint warnings

* fix running tests

* chore(firebolt-driver): setup CI tests
2024-12-09 11:19:52 +02:00
Konstantin Burkalev
a4214057b4 chore(ci): move the sh script to prevent Vercel deploying from forks to vercel expected location (#8990) 2024-11-25 17:20:29 +02:00
Konstantin Burkalev
331d3a7ffc chore(ci): add the sh script to prevent Vercel deploying from forks (#8986) 2024-11-25 12:19:39 +02:00
Maxim
47e7897f7d fix: fix data access policies condition logic (#8976)
Data access policies conditions should be joined via AND operator,
but the initial implementation used OR by mistake

Also ensured that rbac smoke tests are ran as part of the CI
2024-11-21 08:56:58 -08:00
Konstantin Burkalev
7dff0b81ed chore(ci): update actions/cache action to latest 2024-07-01 15:24:52 +03:00
Konstantin Burkalev
c46a457679 chore(ci): update actions/setup-node action to latest 2024-07-01 15:24:52 +03:00
Dmitry Patsura
401e9e1b9c fix(clickhouse-driver): Initial support for DateTime64, fix #7537 (#7538) 2023-12-18 18:24:42 +01:00
Dmitry Patsura
b25c199844 feat(druid-driver): Retrieve types for columns with new Druid versions (#7414) 2023-11-14 13:21:53 +01:00
Pavel Tiunov
910a49d87e fix: Non-additive pre-aggregations based on proxy dimension doesn't match anymore (#7396)
* fix: Non-additive pre-aggregations based on proxy dimension doesn't match anymore

* Measures can have grouped measure filters so make them flat

* prestodb-sandbox by Ahana is missing so disable test for now
2023-11-10 09:55:12 -08:00
Dmitry Patsura
38c24126f5 chore(ci): Snowflake testing (change account) (#7292) 2023-10-25 16:02:27 +02:00
Panagiotis Kapros
edaf32689a fix(mongobi-driver): Invalid configuration for mysql2 connection (#6352) Thanks @loremaps!
* fix(mongobi-driver): invalid configuration for mysql2 connection

Stop passing invalid configuration for mysql2 connection

Closes #5527

* test(mongobi-driver): add smoke test

* test(mongobi-driver): add to the integration matrix
2023-08-29 21:13:42 -07:00
Pavel Tiunov
c2ab19d86d fix(databricks-jdbc-driver): Return NULL decimal as NULL instead of 0 (#6768)
* fix(databricks-jdbc-driver): Return NULL decimal as NULL instead of 0

* Release node-jdbc

* Removing failing unload as it tested by other tests

* Fix reference to node-jdbc

* Bump oracle start timeout

* Bump oracle start timeout

* Fix broken YAML indexes

* Bump startPeriod for Oracle

* Try out log wait strategy for oracle

* Show oracle container logs

* Fix rust-cache working directory

* Try to run oracle first just in case

* Try to run oracle first just in case

* Try to run oracle first just in case

* Fix working-directory for rust-cache

* Fix working-directory for rust-cache
2023-06-30 16:03:22 -07:00
Pavel Tiunov
233638e266 chore: Drop images to address no space left on device 2023-06-03 19:34:12 -07:00
Pavel Tiunov
7514122f52 chore: Pre-pull prestodb docker image to fix tests 2023-06-02 19:15:36 -07:00
Pavel Tiunov
3710b11316 fix(snowflake-driver): Int is exported to pre-aggregations as decimal… (#6513)
* fix(snowflake-driver): Int is exported to pre-aggregations as decimal: Internal: Execution error: Internal: Error during planning: Extension planner for ClusterSendNode

* Fix wrong package ordering

* Touch snowflake

* Add client build

* Remove obsolete snapshot

* Fix driver test use incorrect API token

* Fix athena driver test
2023-04-27 23:29:27 -07:00
Dmitry Patsura
c53a31c37b fix: Fix typo in driver name, DuckDB 2023-04-10 17:55:39 +03:00
Dmitry Patsura
00e41bfe80 feat(ducksdb-driver): Initial support (#6403) 2023-04-10 14:08:16 +03:00
Dmitry Patsura
e56682152a chore(ci): Enable smoke testing for Oracle (#6196) 2023-02-23 16:00:01 +03:00
Dmitry Patsura
2f2546ac76 chore(ci): Upgrade actions (#5998) 2023-01-13 16:17:46 +03:00
Cristian Petrescu-Prahova
db87b8f186 feat(drivers): Bootstraps CrateDB driver (#4929)
Co-authored-by: Robert Palmer <robd003@gmail.com>
2022-08-05 12:45:23 -07:00
Sasha Sushko
f98a5ec3d9 examples: update workflow (#4911) 2022-07-14 22:33:08 +06:00
Sasha Sushko
005eaa9b53 examples: upgrade CI/CD (#4617)
* remove obsolete GH action for examples
* add Cognito example to CI/CD
2022-05-30 16:23:29 +05:00
Nastya Kataeva
3a92b1abbe guides: transfer guides to the Cube Dev organization (#4575)
* guides: transfer guides to the Cube Dev organization

* remove guides dedloy scripts
2022-05-24 13:33:44 +05:00
Cristian Petrescu-Prahova
a6e31dc7d6 chore(testing): Redshift smoke test (#4545) 2022-05-17 16:40:52 -07:00
Igor Lukanin
ba7a717825 guides: add redirects to relevant blog-posts (#4409)
* chore: extend deploy script with bigquery-public-datasets

* chore: extend deploy script with multi-tenant-analytics

* Add redirect file

* add a canonical link to  multi-tenant-analytics blog post

* Add true redirect URLs to bigQuery guide

* Try * rules for redirects

* Add force

* fix deploy script for multi-tenant-analytics

* extend deploy script with react-pivot-table

* add redirects to clickhouse-dashboard and react-pivot-table guides

Co-authored-by: Anastasiya Kataeva <kataeva@Anastasiyas-MacBook-Air.local>
Co-authored-by: Anastasiya Kataeva <nastya@cube.dev>
2022-05-04 22:30:26 +05:00
Cristian Petrescu-Prahova
4b4dd60256 fix(athena): Support plain bucket for CUBEJS_DB_EXPORT_BUCKET (#4390)
* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok
2022-04-14 20:54:22 -07:00
Cristian Petrescu-Prahova
5b91269b7d chore(testing): Wires cloud db integration & e2e tests into github workflows. (#4143)
* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok

* ok
2022-03-16 15:43:29 -07:00
Pavel Tiunov
57d87622e7 chore: Test only one version of Postgres 2021-07-30 01:03:39 -07:00
Dmitry Patsura
ac18e6fdae test(cubestore-driver): Test CubeStoreQuery for refresh keys (#3102) 2021-07-13 19:59:11 +03:00
Dmitry Patsura
2928258d17 test(integration): Testing with MySQL 8 2021-04-30 21:27:56 +03:00
Dmitry Patsura
a8e76c34df feat(mysql-aurora-driver): Support options 2021-03-22 18:27:04 +03:00
Dmitry Patsura
4a896358e4 feat(druid-driver): Support Basic auth via username/passwd (#2386) 2021-03-17 00:49:04 +03:00
Dmitry Patsura
7523c9678e misc(ci): Rework integration tests to matrix 2021-03-16 16:01:30 +03:00
Dmitry Patsura
4e48acc626 fix(docker): Move back to scretch + build linux (gnu) via cross 2021-02-24 15:51:56 +03:00
Dmitry Patsura
3ef95766ab feat(cubestore): Build Linux (gnu) (#2088) 2021-02-17 16:28:24 +03:00
Dmitry Patsura
7de2ba37b9 misc(ci): Build examples on PR (#2103) 2021-02-16 00:26:52 +03:00
Dmitry Patsura
224914e685 misc: Use TS shared for whole monorepo (#1745)
* misc: Use TS shared for whole monorepo

* misc: Use shared TS for compiling on CI
2021-01-11 20:22:04 +03:00
Leonid Yakovlev
97639629e9 chore(examples): update workflows 2020-12-01 23:02:59 +03:00
Dmitry Patsura
30e038bf56 misc: Move CI to GitHub Actions (#1111)
* Feature: Split unit/integration tests

* Feature: Stop running MSSQL tests on Circle

* Feature: Welcome to GitHub Actions

* Feature: 60seconds will be enought to pull yandex/clickhouse-server

* Feature(ci): Pull images before running test

* Feature(ci): Cache lerna

* Fix: 20s are enought to start container, 10s to stop

* Feature(@cubejs-backend/query-orchestrator): Improve testing

* Fix: Lint issues after eslint upgrade

* Feature: Run only unit tests on Circle CI (because they offen fails)

* Fix: 20s are enought to start container, 10s to stop

* Feature(@cubejs-backend/query-orchestrator): PreAggregations test is integration, not unit
2020-09-19 11:04:11 -07:00