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
43 changes: 43 additions & 0 deletions docs/docs/security/security.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,49 @@ TALISMAN_CONFIG = {
"content_security_policy": { ...
```

#### Configuring Talisman in Superset

Talisman settings in Superset can be modified using superset_config.py. If you need to adjust security policies, you can override the default configuration.

Example: Overriding Talisman Configuration in superset_config.py for loading images form s3 or other external sources.

```python
TALISMAN_CONFIG = {
"content_security_policy": {
"base-uri": ["'self'"],
"default-src": ["'self'"],
"img-src": [
"'self'",
"blob:",
"data:",
"https://apachesuperset.gateway.scarf.sh",
"https://static.scarf.sh/",
# "https://cdn.brandfolder.io", # Uncomment when SLACK_ENABLE_AVATARS is True # noqa: E501
"ows.terrestris.de",
"aws.s3.com", # Add Your Bucket or external data source
],
"worker-src": ["'self'", "blob:"],
"connect-src": [
"'self'",
"https://api.mapbox.com",
"https://events.mapbox.com",
],
"object-src": "'none'",
"style-src": [
"'self'",
"'unsafe-inline'",
],
"script-src": ["'self'", "'strict-dynamic'"],
},
"content_security_policy_nonce_in": ["script-src"],
"force_https": False,
"session_cookie_secure": False,
}
```

# For more information on setting up Talisman, please refer to
https://superset.apache.org/docs/configuration/networking-settings/#changing-flask-talisman-csp

### Reporting Security Vulnerabilities

Apache Software Foundation takes a rigorous standpoint in annihilating the security issues in its
Expand Down
7 changes: 5 additions & 2 deletions superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,9 @@ def EMAIL_HEADER_MUTATOR( # pylint: disable=invalid-name,unused-argument # noq
TALISMAN_ENABLED = utils.cast_to_boolean(os.environ.get("TALISMAN_ENABLED", True))

# If you want Talisman, how do you want it configured??
# For more information on setting up Talisman, please refer to
# https://superset.apache.org/docs/configuration/networking-settings/#changing-flask-talisman-csp

TALISMAN_CONFIG = {
"content_security_policy": {
"base-uri": ["'self'"],
Expand All @@ -1624,7 +1627,7 @@ def EMAIL_HEADER_MUTATOR( # pylint: disable=invalid-name,unused-argument # noq
"data:",
"https://apachesuperset.gateway.scarf.sh",
"https://static.scarf.sh/",
# "https://avatars.slack-edge.com", # Uncomment when SLACK_ENABLE_AVATARS is True # noqa: E501
# "https://cdn.brandfolder.io", # Uncomment when SLACK_ENABLE_AVATARS is True # noqa: E501
"ows.terrestris.de",
],
"worker-src": ["'self'", "blob:"],
Expand Down Expand Up @@ -1655,7 +1658,7 @@ def EMAIL_HEADER_MUTATOR( # pylint: disable=invalid-name,unused-argument # noq
"data:",
"https://apachesuperset.gateway.scarf.sh",
"https://static.scarf.sh/",
"https://avatars.slack-edge.com",
"https://cdn.brandfolder.io",
"ows.terrestris.de",
],
"worker-src": ["'self'", "blob:"],
Expand Down
Loading