Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ezaf-3131 show datasets and charts owners only #8

Open
wants to merge 92 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
7a4cd44
fix: reorganize role permissions (#23096)
dpgaspar Feb 21, 2023
a6d714b
fix(sshtunnel): argument params to properly setting `server_port` (#2…
hughhhh Feb 24, 2023
e0a394f
fix(ssh_tunnel): Display SSHTunnel Switch when editing a DB that was …
Antonio-RiveroMartnez Feb 24, 2023
f5a5c26
fix(ssh-tunnel): add password to `from_private_key` function (#23175)
hughhhh Feb 25, 2023
649b355
bump version, changelog and updating for 2.1
eschutho Feb 22, 2023
9096e27
chore: Add docs for ssh tunneling (#23131)
hughhhh Feb 22, 2023
ae6e2a0
fix(rbac): show objects accessible by database access perm (#23118)
villebro Feb 24, 2023
0082cf6
fix: bump FAB to 4.3.0 (#23184)
dpgaspar Feb 24, 2023
7d014ad
fix(clickhouse): add clickhouse connect driver (#23185)
villebro Feb 24, 2023
a94e672
fix(clickhouse): add missing default format (#23192)
villebro Feb 24, 2023
22bab71
fix(dashboard): Focusing charts and native filters from filters badge…
kgabryje Feb 25, 2023
b14e53e
fix: memoized decorator memory leak (#23139)
dpgaspar Feb 27, 2023
2f37582
fix: add disallowed query params for engines specs (#23217)
dpgaspar Feb 28, 2023
bac5bab
fix(dashboard): Don't show cross filters checkbox to users without wr…
kgabryje Feb 28, 2023
1f04b17
docs: update installation docs to include frontend asset build (#23199)
eschutho Mar 1, 2023
c60ba87
fix: refuse to start with default secret on non debug envs (#23186)
dpgaspar Mar 1, 2023
a336e68
fix(dao): use explicit id filter (#23246)
villebro Mar 1, 2023
d670cb6
fix: customize tab on heatmap chart is blank (#23243)
Mar 1, 2023
224f962
fix(dashboard): Charts crashing when cross filter on adhoc column is …
kgabryje Mar 4, 2023
81a1318
fix(dashboard): Infinite load when filter with default first value is…
kgabryje Mar 8, 2023
231d39a
docs: improve API v1 migration documentation (#23298)
dpgaspar Mar 9, 2023
29e36b4
update changelog
eschutho Mar 9, 2023
e42c2a7
chore: use util test env for init check (#23325)
eschutho Mar 11, 2023
4f6b83a
update releasing process for testing
eschutho Mar 11, 2023
b6b9a92
update changelog
eschutho Mar 14, 2023
b92e4fb
fix(webdriver): default WEBDRIVER_OPTION_ARGS and update Firefox deps…
nytai Mar 17, 2023
d80e67d
bump package-lock version
eschutho Mar 20, 2023
2817aeb
update changelog
eschutho Mar 20, 2023
e4d3f7d
chore(superset-ui): publish v0.19.0
eschutho Apr 18, 2023
9bab31a
chore(superset-ui): publish v2.1.0
eschutho Apr 18, 2023
22e3ed1
fix: Validate jinja rendered query (#22851)
geido Feb 21, 2023
da157a7
fix(Pivot Table v2): resolved full width issue (#23393)
AkashBoora Mar 22, 2023
3f13463
fix(chart): non existent time grain no longer breaks the application …
rdubois Mar 23, 2023
8f57d90
fix(legacy-plugin-chart-heatmap): fix adhoc column tooltip (#23507)
villebro Mar 28, 2023
86f79be
fix(generic-x-axis): skip initial time filter for legacy charts (#23506)
villebro Mar 28, 2023
d04c2a5
fix(dash import): Ensure old datasource ids are not referenced in imp…
jfrag1 Apr 5, 2023
d96ba10
fix(dashboard-rbac): use normal rbac when no roles chosen (#23586)
villebro Apr 7, 2023
bb6ab97
fix(mssql): apply top after distinct (#23751)
villebro Apr 21, 2023
502b8b8
test #1
rusackas May 1, 2023
831978f
fix: check sqlalchemy_uri (#23901)
dpgaspar May 3, 2023
cfc2ca6
fix: permission checks on import (#23200)
betodealmeida Mar 15, 2023
0a9f47e
fix: load examples as anon user (#23600)
betodealmeida Apr 6, 2023
8821174
feat: add enforce URI query params with a specific for MySQL (#23723)
dpgaspar Apr 18, 2023
4345a14
add license to package and plugin readme files
eschutho May 31, 2023
2f3471a
lint
eschutho Jun 1, 2023
b26901c
fix: allow db driver distinction on enforced URI params (#23769)
dpgaspar Apr 23, 2023
483195a
remove blocking test from release
eschutho Jun 3, 2023
f244c24
lint
eschutho Jun 3, 2023
f478038
add changelog
eschutho Jun 5, 2023
b53325e
remove tests that don't apply
eschutho Jun 6, 2023
831cd9b
chore: Remove unnecessary information from response (#24056)
geido May 17, 2023
8d32525
chore: update UPDATING for 2.1.0 (#24294)
eschutho Jun 5, 2023
e804489
fix: db validate parameters permission (#24185)
dpgaspar Jun 5, 2023
4af81bf
fix: disable SHOW_STACKTRACE by default (#24137)
dpgaspar May 22, 2023
60a1652
fix: handle comments in `has_table_query` (#23882)
betodealmeida May 1, 2023
5df0b7a
lint
eschutho Jun 6, 2023
75be3dd
fix: handle temporal columns in presto partitions (#24054)
giftig May 19, 2023
9abe28b
merge in fix with migration (#24314)
eschutho Jun 7, 2023
685760f
update changelog
eschutho Jun 7, 2023
e892c0a
update package version
eschutho Jun 7, 2023
542effa
update changelog
eschutho Jun 8, 2023
3c44e6d
pass force to reload data
eschutho Jun 15, 2023
7155dcd
fix: Native time range filter in legacy charts (#23865)
kgabryje May 1, 2023
128751b
update changelog
eschutho Jun 15, 2023
a34da92
fix: Select all issue with "Dynamically search all filter values" in …
geido Mar 17, 2023
ccd4566
fix: Filter values are not updating when dependencies are set (#23566)
michael-s-molina Apr 3, 2023
b4b1a60
fix(plugin-chart-handlebars): Fix TypeError when using handlebars col…
fmannhardt May 15, 2023
472ef7b
fix: dashboard ownership check (#24249)
betodealmeida May 30, 2023
be1c42f
chore(sqla): Address performance tradeoff with eager loading (#23113)
john-bodley Feb 17, 2023
b69f956
fix: FAB CSS on Superset (#24390)
dpgaspar Jun 13, 2023
81eabcd
fix: import database engine validation (#24697)
dpgaspar Jul 20, 2023
4b590f3
lint
eschutho Jul 21, 2023
f27cece
fix(permalink): migrate to marshmallow codec (#24166)
villebro May 22, 2023
48b1b8f
chore(metastore-cache): add codec support (#24586)
villebro Jul 4, 2023
cf00f38
fix(permalink): Incorrect component schema reference (#24482)
Nisden Jun 28, 2023
4be3fa2
fix: Dashboard not loading with default first value in filter (#23512)
geido Mar 29, 2023
dd3877a
fix(sqllab): normalize changedOn timestamp (#24513)
villebro Jun 26, 2023
2f19b12
fix: Revert "fix(chart): Time Series set showMaxLabel as null for tim…
eschutho Aug 16, 2023
d0588f7
fix: update permalink schema (#24970)
eschutho Aug 16, 2023
c03cfa6
lint
eschutho Aug 17, 2023
1f104a0
update changelog
eschutho Jul 8, 2023
beecdf1
Passed Authorization header to connect_args
Kosta91 Mar 9, 2023
140713c
Ezaf-1602 added timeout to config
Kosta91 Apr 19, 2023
4c0093d
Added authlib 1.2.0 to requirements
Kosta91 Apr 27, 2023
b321b4d
Added psycopg2-binary to requirements
Kosta91 Apr 27, 2023
fe3c60b
Added Prometeus metrics exporter to image gcr.io/mapr-252711/superset…
Kosta91 Jun 9, 2023
5f317e1
Fixed installing gunicorn from master branch
Kosta91 Jul 11, 2023
f47ba03
Implemented custom security class
Kosta91 Aug 11, 2023
711846f
Added role resolution
Kosta91 Aug 22, 2023
64a9871
Implemented creating custom role able to create db connection
Kosta91 Sep 6, 2023
2e445d8
Implemented Superset role syncronization
Kosta91 Sep 25, 2023
da6c89d
Merge pull request #10 from HPEEzmeral/ezaf-3101-reflect-platform-rol…
Kosta91 Nov 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@ on:
types: [synchronize, opened, reopened, ready_for_review]

jobs:
config:
runs-on: "ubuntu-latest"
if: github.event.pull_request.draft == false
outputs:
has-secrets: ${{ steps.check.outputs.has-secrets }}
steps:
- name: "Check for secrets"
id: check
shell: bash
run: |
if [ -n "${{ (secrets.DOCKERHUB_USER != '' && secrets.DOCKERHUB_TOKEN != '') || '' }}" ]; then
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
echo "has secrets!"
else
echo "has-secrets=0" >> "$GITHUB_OUTPUT"
echo "no secrets!"
fi

docker-build:
if: github.event.pull_request.draft == false
name: docker-build
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/superset-python-unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ jobs:
mkdir ${{ github.workspace }}/.temp
- name: Python unit tests
if: steps.check.outcome == 'failure'
env:
SUPERSET_TESTENV: true
run: |
pytest --durations-min=0.5 --cov-report= --cov=superset ./tests/common ./tests/unit_tests --cache-clear
- name: Upload code coverage
Expand Down
1,223 changes: 1,221 additions & 2 deletions CHANGELOG.md

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,14 @@ RUN mkdir -p ${PYTHONPATH} \
libsasl2-modules-gssapi-mit \
libpq-dev \
libecpg-dev \
git \
&& rm -rf /var/lib/apt/lists/*

COPY ./requirements/*.txt /app/requirements/
COPY setup.py MANIFEST.in README.md /app/

RUN pip install --force-reinstall git+https://github.com/HPEEzmeral/ezua-gunicorn.git@master

# setup.py uses the version information in package.json
COPY superset-frontend/package.json /app/superset-frontend/

Expand Down Expand Up @@ -114,7 +117,14 @@ COPY ./requirements/*.txt ./docker/requirements-*.txt/ /app/requirements/
USER root

RUN apt-get update -y \
&& apt-get install -y --no-install-recommends libnss3 libdbus-glib-1-2 libgtk-3-0 libx11-xcb1 wget
&& apt-get install -y --no-install-recommends \
libnss3 \
libdbus-glib-1-2 \
libgtk-3-0 \
libx11-xcb1 \
libasound2 \
libxtst6 \
wget

# Install GeckoDriver WebDriver
RUN wget https://github.com/mozilla/geckodriver/releases/download/${GECKODRIVER_VERSION}/geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz -O /tmp/geckodriver.tar.gz && \
Expand All @@ -131,6 +141,7 @@ RUN wget https://download-installer.cdn.mozilla.net/pub/firefox/releases/${FIREF
RUN cd /app \
&& pip install --no-cache -r requirements/docker.txt \
&& pip install --no-cache -r requirements/requirements-local.txt || true

USER superset


Expand Down
3 changes: 2 additions & 1 deletion RELEASING/Dockerfile.from_local_tarball
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ RUN pip install --upgrade setuptools pip \
RUN flask fab babel-compile --target superset/translations

ENV PATH=/home/superset/superset/bin:$PATH \
PYTHONPATH=/home/superset/superset/:$PYTHONPATH
PYTHONPATH=/home/superset/superset/:$PYTHONPATH \
SUPERSET_TESTENV=true
COPY from_tarball_entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
10 changes: 7 additions & 3 deletions RELEASING/from_tarball_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ set -ex

echo "[WARNING] this entrypoint creates an admin/admin user"
echo "[WARNING] it should only be used for lightweight testing/validation"
if [ "$SUPERSET_TESTENV" = "true" ]
then
echo "SUPERSET IS RUNNING IN TEST MODE"
fi

# Create an admin user (you will be prompted to set username, first and last name before setting a password)
superset fab create-admin \
Expand All @@ -31,11 +35,11 @@ superset fab create-admin \
# Initialize the database
superset db upgrade

# Loading examples
superset load_examples

# Create default roles and permissions
superset init

# Loading examples
superset load-examples --force

FLASK_ENV=development FLASK_APP="superset.app:create_app()" \
flask run -p 8088 --with-threads --reload --debugger --host=0.0.0.0
1 change: 1 addition & 0 deletions RESOURCES/FEATURE_FLAGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ These features are **finished** but currently being tested. They are usable, but
- GENERIC_CHART_AXES
- GLOBAL_ASYNC_QUERIES [(docs)](https://github.com/apache/superset/blob/master/CONTRIBUTING.md#async-chart-queries)
- RLS_IN_SQLLAB
- SSH_TUNNELING [(docs)](https://superset.apache.org/docs/installation/setup-ssh-tunneling)
- USE_ANALAGOUS_COLORS
- UX_BETA
- VERSIONED_EXPORT
Expand Down
28 changes: 24 additions & 4 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,48 @@ under the License.
This file documents any backwards-incompatible changes in Superset and
assists people when migrating to a new version.

## Next
## 2.1.1
- [24185](https://github.com/apache/superset/pull/24185): `/api/v1/database/test_connection` and `api/v1/database/validate_parameters` permissions changed from `can_read` to `can_write`. Only Admin user's have access.

### Other
- [23888](https://github.com/apache/superset/pull/23888): Database Migration for json serialization instead of pickle should upgrade/downgrade correctly when bumping to/from this patch version

## 2.1.0

- [22809](https://github.com/apache/superset/pull/22809): Migrated endpoint `/superset/sql_json` and `/superset/results/` to `/api/v1/sqllab/execute/` and `/api/v1/sqllab/results/` respectively. Corresponding permissions are `can sql_json on Superset` to `can execute on SQLLab`, `can results on Superset` to `can results on SQLLab`. Make sure you add/replace the necessary permissions on any custom roles you may have.
- [22931](https://github.com/apache/superset/pull/22931): Migrated endpoint `/superset/get_or_create_table/` to `/api/v1/dataset/get_or_create/`. Corresponding permissions are `can get or create table on Superset` to `can get or create dataset on Dataset`. Make sure you add/replace the necessary permissions on any custom roles you may have.
- [22882](https://github.com/apache/superset/pull/22882): Migrated endpoint `/superset/filter/<datasource_type>/<int:datasource_id>/<column>/` to `/api/v1/datasource/<datasource_type>/<datasource_id>/column/<column_name>/values/`. Corresponding permissions are `can filter on Superset` to `can get column values on Datasource`. Make sure you add/replace the necessary permissions on any custom roles you may have.
- [22789](https://github.com/apache/superset/pull/22789): Migrated endpoint `/superset/recent_activity/<user_id>/` to `/api/v1/log/recent_activity/<user_id>/`. Corresponding permissions are `can recent activity on Superset` to `can recent activity on Log`. Make sure you add/replace the necessary permissions on any custom roles you may have.
- [22913](https://github.com/apache/superset/pull/22913): Migrated endpoint `/superset/csv` to `/api/v1/sqllab/export/`. Corresponding permissions are `can csv on Superset` to `can export csv on SQLLab`. Make sure you add/replace the necessary permissions on any custom roles you may have.
- [22496](https://github.com/apache/superset/pull/22496): Migrated endpoint `/superset/slice_json/<int:layer_id>` to `/api/v1/chart/<int:id>/data/`. Corresponding permissions are `can slice json on Superset` to `can read on Chart`. Make sure you add/replace the necessary permissions on any custom roles you may have.
- [22624](https://github.com/apache/superset/pull/22624): Migrated endpoint `/superset/stop_query/` to `/api/v1/query/stop`. Corresponding permissions are `can stop query on Superset` to `can read on Query`. Make sure you add/replace the necessary permissions on any custom roles you may have.
- [22579](https://github.com/apache/superset/pull/22579): Migrated endpoint `/superset/search_queries/` to `/api/v1/query/`. Corresponding permissions are `can search queries on Superset` to `can read on Query`. Make sure you add/replace the necessary permissions on any custom roles you may have.
- [22501](https://github.com/apache/superset/pull/22501): Migrated endpoint `/superset/tables/<int:db_id>/<schema>/` to `/api/v1/database/<int:id>/tables/`. Corresponding permissions are `can tables on Superset` to `can read on Database`. Make sure you add/replace the necessary permissions on any custom roles you may have.
- [22611](https://github.com/apache/superset/pull/22611): Migrated endpoint `/superset/queries/` to `api/v1/query/updated_since`. Corresponding permissions are `can queries on Superset` to `can read on Query`. Make sure you add/replace the necessary permissions on any custom roles you may have.
- [23186](https://github.com/apache/superset/pull/23186): Superset will refuse to start if a default `SECRET_KEY` is detected on a non Flask debug setting.
- [22022](https://github.com/apache/superset/pull/22022): HTTP API endpoints `/superset/approve` and `/superset/request_access` have been deprecated and their HTTP methods were changed from GET to POST
- [20606](https://github.com/apache/superset/pull/20606): When user clicks on chart title or "Edit chart" button in Dashboard page, Explore opens in the same tab. Clicking while holding cmd/ctrl opens Explore in a new tab. To bring back the old behaviour (always opening Explore in a new tab), flip feature flag `DASHBOARD_EDIT_CHART_IN_NEW_TAB` to `True`.
- [20799](https://github.com/apache/superset/pull/20799): Presto and Trino engine will now display tracking URL for running queries in SQL Lab. If for some reason you don't want to show the tracking URL (for example, when your data warehouse hasn't enabled access for to Presto or Trino UI), update `TRACKING_URL_TRANSFORMER` in `config.py` to return `None`.
- [21002](https://github.com/apache/superset/pull/21002): Support Python 3.10 and bump pandas 1.4 and pyarrow 6.
- [21163](https://github.com/apache/superset/pull/21163): The time grain will be decoupled from the time filter column and the time grain control will move below the X-Axis control when `GENERIC_CHART_AXES` feature flags set to `True`. The time grain will be applied on the time column in the column-like controls(x axis, dimensions) instead of the time column in the time section.
- [21284](https://github.com/apache/superset/pull/21284): The non-functional `MAX_TABLE_NAMES` config key has been removed.
- [21794](https://github.com/apache/superset/pull/21794): Deprecates the undocumented `PRESTO_SPLIT_VIEWS_FROM_TABLES` feature flag. Now for Presto, like other engines, only physical tables are treated as tables.

### Breaking Changes

- [22798](https://github.com/apache/superset/pull/22798): To make the welcome page more relevant in production environments, the last tab on the welcome page has been changed from to feature all charts/dashboards the user has access to (previously only examples were shown). To keep current behavior unchanged, add the following to your `superset_config.py`: `WELCOME_PAGE_LAST_TAB = "examples"`
- [22328](https://github.com/apache/superset/pull/22328): For deployments that have enabled the "THUMBNAILS" feature flag, the function that calculates dashboard digests has been updated to consider additional properties to more accurately identify changes in the dashboard metadata. This change will invalidate all currently cached dashboard thumbnails.
- [21765](https://github.com/apache/superset/pull/21765): For deployments that have enabled the "ALERT_REPORTS" feature flag, Gamma users will no longer have read and write access to Alerts & Reports by default. To give Gamma users the ability to schedule reports from the Dashboard and Explore view like before, create an additional role with "can read on ReportSchedule" and "can write on ReportSchedule" permissions. To further give Gamma users access to the "Alerts & Reports" menu and CRUD view, add "menu access on Manage" and "menu access on Alerts & Report" permissions to the role.

### Breaking Changes

### Potential Downtime

- [21284](https://github.com/apache/superset/pull/21284): A change which drops the unused `dbs.allow_multi_schema_metadata_fetch` column via a (potentially locking) DDL operation.

### Other

- [23118](https://github.com/apache/superset/pull/23118): Previously the "database access on <database>" permission granted access to all datasets on the underlying database, but they didn't show up on the list views. Now all dashboards, charts and datasets that are accessible via this permission will also show up on their respective list views.



## 2.0.1

- [21895](https://github.com/apache/superset/pull/21895): Markdown components had their security increased by adhering to the same sanitization process enforced by Github. This means that some HTML elements found in markdowns are not allowed anymore due to the security risks they impose. If you're deploying Superset in a trusted environment and wish to use some of the blocked elements, then you can use the HTML_SANITIZATION_SCHEMA_EXTENSIONS configuration to extend the default sanitization schema. There's also the option to disable HTML sanitization using the HTML_SANITIZATION configuration but we do not recommend this approach because of the security risks. Given the provided configurations, we don't view the improved sanitization as a breaking change but as a security patch.
Expand Down
1 change: 1 addition & 0 deletions docker/.env-non-dev
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ REDIS_PORT=6379
FLASK_ENV=production
SUPERSET_ENV=production
SUPERSET_LOAD_EXAMPLES=yes
SUPERSET_SECRET_KEY=TEST_NON_DEV_SECRET
CYPRESS_CONFIG=false
SUPERSET_PORT=8088
MAPBOX_API_KEY=''
2 changes: 1 addition & 1 deletion docker/docker-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ if [ "$SUPERSET_LOAD_EXAMPLES" = "yes" ]; then
superset load_test_users
superset load_examples --load-test-data
else
superset load_examples
superset load_examples --force
fi
echo_step "4" "Complete" "Loading examples"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,8 @@ Non-owner users access can be managed two different ways:

1. Dataset permissions - if you add to the relevant role permissions to datasets it automatically grants implicit access to all dashboards that uses those permitted datasets
2. Dashboard roles - if you enable **DASHBOARD_RBAC** [feature flag](https://superset.apache.org/docs/installation/configuring-superset#feature-flags) then you be able to manage which roles can access the dashboard
- Having dashboard access implicitly grants read access to the associated datasets, therefore
all charts will load their data even if feature flag is turned on and no roles assigned
to roles the access will fallback to **Dataset permissions**
- Granting a role access to a dashboard will bypass dataset level checks. Having dashboard access implicitly grants read access to all the featured charts in the dashboard, and thereby also all the associated datasets.
- If no roles are specified for a dashboard, regular **Dataset permissions** will apply.

<img src={useBaseUrl("/img/tutorial/tutorial_dashboard_access.png" )} />

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/installation/configuring-superset.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ SUPERSET_WEBSERVER_PORT = 8088
# Your App secret key will be used for securely signing the session cookie
# and encrypting sensitive information on the database
# Make sure you are changing this key for your deployment with a strong key.
# You can generate a strong key using `openssl rand -base64 42`

# You can generate a strong key using `openssl rand -base64 42`.
# Alternatively you can set it with `SUPERSET_SECRET_KEY` environment variable.
SECRET_KEY = 'YOUR_OWN_RANDOM_GENERATED_SECRET_KEY'

# The SQLAlchemy connection string to your database backend
Expand Down
6 changes: 6 additions & 0 deletions docs/docs/installation/installing-superset-from-scratch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ superset load_examples
# Create default roles and permissions
superset init

# Build javascript assets
cd superset-frontend
npm ci
npm run build
cd ..

# To start a development web server on port 8088, use -p to bind to another port
superset run -p 8088 --with-threads --reload --debugger
```
Expand Down
21 changes: 21 additions & 0 deletions docs/docs/installation/setup-ssh-tunneling.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Setup SSH Tunneling
hide_title: true
sidebar_position: 13
version: 1
---

## SSH Tunneling

1. Turn on feature flag
- Change [`SSH_TUNNELING`](https://github.com/apache/superset/blob/eb8386e3f0647df6d1bbde8b42073850796cc16f/superset/config.py#L489) to `True`
- If you want to add more security when establishing the tunnel we allow users to overwrite the `SSHTunnelManager` class (here)[https://github.com/apache/superset/blob/eb8386e3f0647df6d1bbde8b42073850796cc16f/superset/config.py#L507]
- You can also set the [`SSH_TUNNEL_LOCAL_BIND_ADDRESS`](https://github.com/apache/superset/blob/eb8386e3f0647df6d1bbde8b42073850796cc16f/superset/config.py#L508) this the host address where the tunnel will be accessible on your VPC

2. Create database w/ ssh tunnel enabled
- With the feature flag enabled you should now see ssh tunnel toggle.
- Click the toggle to enables ssh tunneling and add your credentials accordingly.
- Superset allows for 2 different type authenticaion (Basic + Private Key). These credentials should come from your service provider.

3. Verify data is flowing
- Once SSH tunneling has been enabled, go to SQL Lab and write a query to verify data is properly flowing.
Loading
Loading