You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/best-practices/security-best-practices.md
+18-6Lines changed: 18 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -68,16 +68,28 @@ determining the nature and scope of the impact.
68
68
69
69
### Disable path-based apps
70
70
71
-
By default, path-based apps are enabled in Coder to make demos and trials easier for new users.
71
+
For production deployments, disable path-based apps.
72
72
73
-
In production deployments, however, path-based apps reduce security significantly as it allows user workspace apps to be hosted on the same domain as other apps and the Coder API itself in the default region.
73
+
Path-based apps share the same origin as the Coder API.
74
+
This setup is convenient for demos, but can expose the deployment to cross-site-scripting (XSS) attacks in production.
75
+
A malicious workspace could reuse Coder cookies to call the API or interact with other workspaces owned by the same user.
74
76
75
-
We recommend turning off path-based apps after you have configured and enabled subdomain apps via a wildcard DNS entry.
77
+
1.[Enable sub-domain apps with a wildcard DNS record](../../admin/setup/index.md#wildcard-access-url) (like `*.coder.example.com`)
76
78
77
-
The impact of having path-based apps enabled is mitigated by default, but we still recommend disabling it to prevent malicious workspaces accessing other workspaces owned by the same user or performing requests against the Coder API:
79
+
1. Disable path-based apps:
78
80
79
-
- Path-based apps cannot be shared with other users without a special flag `--dangerous-allow-path-app-sharing`
80
-
- Users with the site "owner" role cannot use their admin privileges to access path-based apps for workspace they do not own without a special flag `--dangerous-allow-path-app-site-owner-access`
81
+
```shell
82
+
coderd server --disable-path-apps
83
+
# or
84
+
export CODER_DISABLE_PATH_APPS=true
85
+
```
86
+
87
+
By default, Coder mitigates the impact of having path-based apps enabled, but we still recommend disabling it to prevent malicious workspaces accessing other workspaces owned by the same user or performing requests against the Coder API.
88
+
89
+
If you do keep path-based apps enabled, Coder limits the risk:
90
+
91
+
- Path-based apps cannot be shared with other users unless you start the Coder server with `--dangerous-allow-path-app-sharing`.
92
+
- Users with the site `owner` role cannot use their admin privileges to access path-based apps for workspace unless the server is started with `--dangerous-allow-path-app-site-owner-access`.
0 commit comments