Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ assists people when migrating to a new version.

## Next

- `SAMPLES_ROW_LIMIT` is now the default for `/datasource/samples` requests without a valid explicit `per_page`, rather than a hard per-request ceiling; explicit limits are honored up to the existing global row-limit ceiling, matching `/chart/data` SAMPLES requests.

### OAuth2 database callback metrics include their outcome

The unqualified `DatabaseRestApi.oauth2` StatsD counter has been replaced with
Expand Down
14 changes: 13 additions & 1 deletion docs/admin_docs/security/security.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ Once enabled, each user manages their own keys from their profile page:
1. Open the user menu (top-right) and click **Info** to navigate to the User Info page
2. Expand the **API Keys** section
3. Click **+ API Key**
4. Enter a name and (optionally) an expiration date
4. Enter a name and optionally select resource scopes
5. Copy the generated token — it is shown only once

Only users with the `can_read` and `can_write` permissions on `ApiKey` (granted by default to Admins) can manage API keys.
Expand All @@ -415,6 +415,18 @@ Authorization: Bearer <your-api-key>

This works for all REST API endpoints and the MCP server. The request is executed with the permissions of the user who created the key.

#### API Key Scopes

The creation dialog can restrict an API key to MCP resource actions such as
`superset:dashboard:read` or `superset:chart:write`. A scope is an additional
restriction: it never grants a permission that the creating user does not
already have through Superset RBAC. Write scopes also cover update and delete
operations for that resource; `superset:sqllab:write` covers SQL execution.

Keys created without scopes retain legacy RBAC-only behavior. The scoped-key
restrictions described here are enforced by the MCP server; regular REST API
routes continue to apply their existing Superset RBAC checks.

#### Use Cases

- **CI/CD pipelines** — automated chart/dashboard exports and imports
Expand Down
72 changes: 42 additions & 30 deletions docs/static/resources/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3407,22 +3407,26 @@
"nullable": true,
"type": "string"
},
"description": {
"nullable": true,
"type": "string"
},
"editors": {
"items": {
"$ref": "#/components/schemas/DashboardRestApi.get_list.Subject"
},
"type": "array"
},
"id": {
"type": "integer"
},
"is_managed_externally": {
"type": "boolean"
},
"owners": {
"$ref": "#/components/schemas/DashboardRestApi.get_list.User2"
},
"published": {
"nullable": true,
"type": "boolean"
},
"roles": {
"$ref": "#/components/schemas/DashboardRestApi.get_list.Role"
},
"slug": {
"maxLength": 255,
"nullable": true,
Expand All @@ -3432,10 +3436,10 @@
"readOnly": true
},
"tags": {
"$ref": "#/components/schemas/DashboardRestApi.get_list.Tag"
},
"thumbnail_url": {
"readOnly": true
"items": {
"$ref": "#/components/schemas/DashboardRestApi.get_list.Tag"
},
"type": "array"
},
"url": {
"readOnly": true
Expand All @@ -3444,57 +3448,65 @@
"format": "uuid",
"nullable": true,
"type": "string"
},
"viewers": {
"items": {
"$ref": "#/components/schemas/DashboardRestApi.get_list.Subject1"
},
"type": "array"
}
},
"type": "object"
},
"DashboardRestApi.get_list.Role": {
"DashboardRestApi.get_list.Subject": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"maxLength": 64,
"label": {
"maxLength": 255,
"type": "string"
},
"type": {
"type": "integer"
}
},
"required": ["name"],
"required": ["label", "type"],
"type": "object"
},
"DashboardRestApi.get_list.Tag": {
"DashboardRestApi.get_list.Subject1": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"maxLength": 250,
"nullable": true,
"label": {
"maxLength": 255,
"type": "string"
},
"type": {
"enum": [1, 2, 3, 4]
"type": "integer"
}
},
"required": ["label", "type"],
"type": "object"
},
"DashboardRestApi.get_list.User": {
"DashboardRestApi.get_list.Tag": {
"properties": {
"first_name": {
"maxLength": 64,
"type": "string"
},
"id": {
"type": "integer"
},
"last_name": {
"maxLength": 64,
"name": {
"maxLength": 250,
"nullable": true,
"type": "string"
},
"type": {
"enum": [1, 2, 3, 4]
}
},
"required": ["first_name", "last_name"],
"type": "object"
},
"DashboardRestApi.get_list.User1": {
"DashboardRestApi.get_list.User": {
"properties": {
"first_name": {
"maxLength": 64,
Expand All @@ -3511,7 +3523,7 @@
"required": ["first_name", "last_name"],
"type": "object"
},
"DashboardRestApi.get_list.User2": {
"DashboardRestApi.get_list.User1": {
"properties": {
"first_name": {
"maxLength": 64,
Expand Down Expand Up @@ -16506,7 +16518,7 @@
},
"result": {
"items": {
"type": "object"
"$ref": "#/components/schemas/DashboardRestApi.get_list"
},
"type": "array"
}
Expand Down
Loading
Loading