Commit Graph

35 Commits

Author SHA1 Message Date
Beto Dealmeida 26d8077e97
chore: improve SQL parsing (#26767) 2024-03-13 18:27:01 -04:00
John Bodley 8749d9f386
chore(tests): Remove unnecessary explicit Flask-SQLAlchemy session expunges (#27136) 2024-02-17 07:05:22 +13:00
John Bodley 847ed3f5b0
refactor: Ensure Flask framework leverages the Flask-SQLAlchemy session (Phase II) (#26909) 2024-02-14 06:20:15 +13:00
Beto Dealmeida fade4806ce
fix: prevent guest user from modifying metrics (#26749) 2024-01-29 12:59:33 -05:00
John Bodley dd58b31cc4
chore(sqlalchemy): Remove erroneous SQLAlchemy ORM session.merge operations (#24776) 2023-11-20 17:25:41 -08:00
Jack Fragassi fba66c6250
fix: Use RLS clause instead of ID for cache key (#25229) 2023-09-18 11:37:35 -07:00
Jack Fragassi 2b8d8da22a
fix: Allow embedded guest user datasource access with dashboard context (#25081) 2023-08-28 09:48:21 -07:00
John Bodley 94c595093b
chore: Add explicit ON DELETE CASCADE for dashboard_slices (#24938) 2023-08-10 10:56:11 -03:00
John Bodley 5522facdc6
chore: Refactor dashboard security access (#24804) 2023-08-09 09:25:58 -07:00
John Bodley 7397ab36f2
fix: Dashboard aware RBAC dataset permission (#24789) 2023-08-04 11:53:34 -07:00
John Bodley 9f7f2c60d6
fix: revert "fix(embedded): adding logic to check dataset used by filters (#24808) (#24892) 2023-08-04 11:14:57 -07:00
Vitor Avila 7f9b0380e0
fix(embedded): adding logic to check dataset used by filters (#24808) 2023-07-31 14:10:57 -07:00
Beto Dealmeida 9844b15e07
fix: embedded dashboard check (#24690) 2023-07-13 10:33:12 -07:00
John Bodley a156816064
chore(command): Condense delete/bulk-delete operations (#24607)
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
2023-07-12 15:45:29 -07:00
John Bodley 3e76736874
chore(dao): Organize DAOs according to SIP-92 (#24331)
Co-authored-by: JUST.in DO IT <justin.park@airbnb.com>
2023-06-18 18:32:32 -07:00
John Bodley a4d5d7c6b9
chore(pre-commit): Add pyupgrade and pycln hooks (#24197) 2023-06-01 12:01:10 -07:00
Ville Brofeldt 5424b95138
chore: deprecate rls base related filters (#24128) 2023-05-19 21:55:05 +03:00
Daniel Vaz Gaspar 97482c57b5
chore: bump werkzeug and Flask (#23965) 2023-05-12 15:01:30 +01:00
Daniel Vaz Gaspar e5f512e348
fix: check sqlalchemy_uri (#23901) 2023-05-03 11:14:03 +01:00
Michael S. Molina f7810b6020
feat(revert): Re-introduces the RLS page (#23777) 2023-04-24 13:10:58 -03:00
Hugh A. Miles II b820eb8235
chore: Update pre-commit packages (#23173) 2023-03-13 17:05:13 -06:00
Josh Soref 78ede590ee
chore(frontend): Spelling (#19676)
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2023-02-02 11:23:11 -07:00
Mayur 8226110be8
fix: revert RESTful apis and react view for RLS (#22818) 2023-01-26 18:04:00 -08:00
Mayur 159dcd7e62
feat(RLS): RESTful apis and react view for RLS (#22325) 2023-01-09 13:34:20 -07:00
Daniel Vaz Gaspar 60eb1094a4
feat: add name, description and non null tables to RLS (#20432)
* feat: add name, description and non null tables to RLS

* add validation

* add and fix tests

* fix sqlite migration

* improve default value for name
2022-06-20 13:52:05 +01:00
Lily Kuang 224769bd45
feat(embedded): API get embedded dashboard config by uuid (#19650)
* feat(embedded): get embedded dashboard config by uuid

* add tests and validation

* remove accidentally commit

* fix tests
2022-04-12 15:14:08 -07:00
David Aaron Suddjian 8e29ec5a66
feat: Embedded dashboard configuration (#19364)
* embedded dashboard model

* embedded dashboard endpoints

* DRY up using the with_dashboard decorator elsewhere

* wip

* check feature flags and permissions

* wip

* sdk

* urls

* dao option for id column

* got it working

* Update superset/embedded/view.py

* use the curator check

* put back old endpoint, for now

* allow access by either embedded.uuid or dashboard.id

* keep the old endpoint around, for the time being

* openapi

* lint

* lint

* lint

* test stuff

* lint, test

* typo

* Update superset-frontend/src/embedded/index.tsx

* Update superset-frontend/src/embedded/index.tsx

* fix tests

* bump sdk
2022-03-30 12:34:05 -07:00
Ville Brofeldt a619cb4ea9
chore: upgrade black (#19410) 2022-03-29 20:03:09 +03:00
Daniel Vaz Gaspar f37fc1a7f0
chore: bump majors on celery and Flask (#19168)
* chore: bump celery, Flask, flask-jwt-extended, pyJWT

* fix pyJWT breaking change

* fix pyJWT breaking change 2

* test

* fixed test

* fixed test

* fixed test

* revert since mypy won't pick the correct signature

* lint 1

* fix test

* fix test

* docs and celery config migration

* bump FAB to 4.0.0rc3, remove AUTH_STRICT_RESPONSE_CODES

* update docs for new celery config keys

* downgrade celery to 5.2.2

* ref FAB to final 4.0.0 release

* remove conflict left over
2022-03-24 09:16:53 +00:00
Karthikeyan Singaravelan 864bafc655
chore: Fix deprecated unittest aliases. (#19042) 2022-03-07 09:38:19 +02:00
Lily Kuang e6ea197e9f
feat(embedded): aud claim and type for guest token (#18651)
* add aud claim and type for guest token

* update test

* lint

* make jwt audience configurable

* lint

* Apply suggestions from code review

Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>

* verify aud

* add tests for aud and type claim

Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
2022-02-14 10:43:35 -08:00
David Aaron Suddjian 4ad5ad045a
feat: embedded dashboard core (#17530)
* feat(dashboard): embedded dashboard UI configuration (#17175) (#17450)

* setup embedded provider

* update ui configuration

* fix test

* feat: Guest token (for embedded dashboard auth) (#17517)

* generate an embed token

* improve existing tests

* add some auth setup, and rename token

* fix the stuff for compatibility with external request loaders

* docs, standard jwt claims, tweaks

* black

* lint

* tests, and safer token decoding

* linting

* type annotation

* prettier

* add feature flag

* quiet pylint

* apparently typing is a problem again

* Make guest role name configurable

* fake being a non-anonymous user

* just one log entry

* customizable algo

* lint

* lint again

* 403 works now!

* get guest token from header instead of cookie

* Revert "403 works now!"

This reverts commit df2f49a6d4.

* fix tests

* Revert "Revert "403 works now!""

This reverts commit 883dff38f1.

* rename method

* correct import

* feat: entry for embedded dashboard (#17529)

* create entry for embedded dashboard in webpack

* add cookies

* lint

* token message handshake

* guestTokenHeaderName

* use setupClient instead of calling configure

* rename the webpack chunk

* simplified handshake

* embedded entrypoint: render a proper app

* make the embedded page accept anonymous connections

* format

* lint

* fix test
# Conflicts:
#	superset-frontend/src/embedded/index.tsx
#	superset/views/core.py

* lint

* Update superset-frontend/src/embedded/index.tsx

Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>

* comment out origins checks

* move embedded for core to dashboard

* pylint

* isort

Co-authored-by: David Aaron Suddjian <aasuddjian@gmail.com>
Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>

* feat: Authorizing guest access to embedded dashboards (#17757)

* helper methods and dashboard access

* guest token dashboard authz

* adjust csrf exempt list

* eums don't work that way

* Remove unnecessary import

* move row level security tests to their own file

* a bit of refactoring

* add guest token security tests

* refactor tests

* clean imports

* variable names can be too long apparently

* missing argument to get_user_roles

* don't redefine builtins

* remove unused imports

* fix test import

* default to global user when getting roles

* missing import

* mock it

* test get_user_roles

* infer g.user for ease of tests

* remove redundant check

* tests for guest user security manager fns

* use algo to get rid of warning messages

* tweaking access checks

* fix guest token security tests

* missing imports

* more tests

* more testing and also some small refactoring

* move validation out of parsing

* fix dashboard access check again

* add more test

Co-authored-by: Lily Kuang <lily@preset.io>

* feat: Row Level Security rules for guest tokens (#17836)

* helper methods and dashboard access

* guest token dashboard authz

* adjust csrf exempt list

* eums don't work that way

* Remove unnecessary import

* move row level security tests to their own file

* a bit of refactoring

* add guest token security tests

* refactor tests

* clean imports

* variable names can be too long apparently

* missing argument to get_user_roles

* don't redefine builtins

* remove unused imports

* fix test import

* default to global user when getting roles

* missing import

* mock it

* test get_user_roles

* infer g.user for ease of tests

* remove redundant check

* tests for guest user security manager fns

* use algo to get rid of warning messages

* tweaking access checks

* fix guest token security tests

* missing imports

* more tests

* more testing and also some small refactoring

* move validation out of parsing

* fix dashboard access check again

* rls rules for guest tokens

* test guest token rls rules

* more flexible rls rules

* lint

* fix tests

* fix test

* defaults

* fix some tests

* fix some tests

* lint

Co-authored-by: Lily Kuang <lily@preset.io>

* SupersetClient guest token test

* Apply suggestions from code review

Co-authored-by: Lily Kuang <lily@preset.io>

Co-authored-by: Lily Kuang <lily@preset.io>
2022-01-25 16:41:32 -08:00
John Bodley fb4650a6eb
chore(pylint): Remove top-level disable (#16589)
* chore(pylint): Remove top-level disable

* Update examples.py

* Update command.py

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-09-15 09:30:23 -07:00
Beto Dealmeida 3441182630
chore: remove unnecessary deps (#15787)
* chore: remove unneeded deps

* fix lint

* Run compile
2021-07-21 16:53:45 -07:00
ofekisr b5119b8dff
refactor(tests): decouple unittests from integration tests (#15473)
* refactor move all tests to be under integration_tests package

* refactor decouple unittests from integration tests - commands

* add unit_tests package

* fix celery_tests.py

* fix wrong FIXTURES_DIR value
2021-07-01 18:03:07 +03:00