8000 docs: add section about how to disable path based apps to security be… · coder/coder@ab254ad · GitHub
[go: up one dir, main page]

Skip to content

Commit ab254ad

Browse files
docs: add section about how to disable path based apps to security best practices (#18419)
add a new section specifically about how to disable path-based apps to the security best practices doc ## todo - [x] copy review - [x] cross-linking --------- Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com> Co-authored-by: Dean Sheather <dean@deansheather.com>
1 parent d14e9be commit ab254ad

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

docs/admin/setup/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ If you are providing TLS certificates directly to the Coder server, either
6060
options (these both take a comma separated list of files; list certificates
6161
and their respective keys in the same order).
6262

63+
After you enable the wildcard access URL, you should [disable path-based apps](../../tutorials/best-practices/security-best-practices.md#disable-path-based-apps) for security.
64+
6365
## TLS & Reverse Proxy
6466

6567
The Coder server can directly use TLS certificates with `CODER_TLS_ENABLE` and

docs/tutorials/best-practices/security-best-practices.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,33 @@ logs (which have `msg: audit_log`) and retain them for a minimum of two years
6666
If a security incident with Coder does occur, audit logs are invaluable in
6767
determining the nature and scope of the impact.
6868

69+
### Disable path-based apps
70+
71+
For production deployments, we recommend that you disable path-based apps after you've configured a wildcard access URL.
72+
73+
Path-based apps share the same origin as the Coder API, which can be convenient for trialing Coder,
74+
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.
76+
77+
1. [Enable sub-domain apps with a wildcard DNS record](../../admin/setup/index.md#wildcard-access-url) (like `*.coder.example.com`)
78+
79+
1. Disable path-based apps:
80+
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
88+
malicious workspaces accessing other workspaces owned by the same user or performing requests against the Coder API.
89+
90+
If you do keep path-based apps enabled:
91+
92+
- Path-based apps cannot be shared with other users unless you start the Coder server with `--dangerous-allow-path-app-sharing`.
93+
- Users with the site `owner` role cannot use their admin privileges to access path-based apps for workspaces unless the
94+
server is started with `--dangerous-allow-path-app-site-owner-access`.
95+
6996
## PostgreSQL
7097

7198
PostgreSQL is the persistent datastore underlying the entire Coder deployment.

0 commit comments

Comments
 (0)
0