Skip to content

fix(semantic-layer): keep the guest RLS refusal reason in chart-data responses - #46126

Draft
mikebridge wants to merge 1 commit into
apache:masterfrom
mikebridge:fix/guest-rls-refusal-message
Draft

mikebridge wants to merge 1 commit into
apache:masterfrom
mikebridge:fix/guest-rls-refusal-message

Conversation

@mikebridge

Copy link
Copy Markdown
Contributor

SUMMARY

Chart-data requests from embedded guests with row-level rules that a semantic view cannot enforce still receive a 403. The response now explains that limitation so the host can choose a supported data source or adjust its guest rules.

Background: Semantic views already refuse applicable guest row-level security rules.

Problem: The chart-data API replaced that refusal's fixed explanation with a generic 403.

What this changes:

  • Identifies this one fixed refusal with a dedicated exception type.
  • Returns its existing safe explanation from saved-chart GET and submitted POST chart-data routes, without changing the denial.
  • Keeps other security exceptions on their existing generic response path.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Not applicable; this changes an API error message.

TESTING INSTRUCTIONS

With SEMANTIC_LAYERS and EMBEDDED_SUPERSET enabled, request chart data for a semantic view as an embedded guest with an applicable guest row-level rule. Both saved-chart GET and submitted POST should return 403 with Semantic views cannot enforce guest row-level security rules. and no result. With no applicable rule, the request should retain its normal response. Other security denials should remain generic. Automated checks: pytest -q tests/integration_tests/semantic_layers/guest_rls_message_test.py tests/unit_tests/security/guest_rls_test.py and the MCP chart-data categorization cases.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags: SEMANTIC_LAYERS, EMBEDDED_SUPERSET
  • Changes UI
  • Includes DB Migration
  • Introduces new feature or API
  • Removes existing feature or API

@github-actions github-actions Bot added the api Related to the REST API label Nov 10, 2026
@netlify

netlify Bot commented Nov 10, 2026

Copy link
Copy Markdown

✅ Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 6ef801e
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6af2680db4cfb040afcac936
😎 Deploy Preview https://deploy-preview-46126--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.36%. Comparing base (030a5a4) to head (6ef801e).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #46126      +/-   ##
==========================================
- Coverage   65.42%   65.36%   -0.06%     
==========================================
  Files        3082     3083       +1     
  Lines      210951   211231     +280     
  Branches    49720    49805      +85     
==========================================
+ Hits       138006   138066      +60     
- Misses      69768    69987     +219     
- Partials     3177     3178       +1     
Flag Coverage Δ
hive 34.05% <33.33%> (-0.04%) ⬇️
mysql 51.82% <100.00%> (-0.08%) ⬇️
postgres 51.84% <100.00%> (-0.08%) ⬇️
presto 35.69% <33.33%> (-0.05%) ⬇️
python 52.14% <100.00%> (-0.08%) ⬇️
sqlite 51.53% <100.00%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Related to the REST API size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant