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
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Using IdP sync and SCIM means that the central Identity Provider is the source o
24
24
25
25
Place Coder behind a TLS-capable reverse-proxy/load balancer, and enable [Strict Transport Security](../../reference/cli/server.md#--strict-transport-security) so that connections from end users are always encrypted.
26
26
27
-
Enable [TLS](../../reference/cli/server#--tls-address) on Coder Server, and encrypt traffic from the reverse-proxy/load balancer to Coder Server, so that even if an attacker gains access to your network, they will be unable to snoop on Coder Server traffic.
27
+
Enable [TLS](../../reference/cli/server.md#--tls-address) on Coder Server, and encrypt traffic from the reverse-proxy/load balancer to Coder Server, so that even if an attacker gains access to your network, they will be unable to snoop on Coder Server traffic.
28
28
29
29
### Encryption at Rest
30
30
@@ -48,18 +48,18 @@ Generate a strong, random password for accessing PostgreSQL and store it securel
48
48
49
49
### Encryption in Transit
50
50
51
-
Enable TLS on PostgreSQL, and set `sslmode=verify-full` in your [postgres URL](../../reference/cli/server#--postgres-url) on Coder Server. This configures Coder Server to only establish TLS connections to PostgreSQL and check that the PostgreSQL server’s certificate is valid and matches the expected hostname.
51
+
Enable TLS on PostgreSQL, and set `sslmode=verify-full` in your [postgres URL](../../reference/cli/server.md#--postgres-url) on Coder Server. This configures Coder Server to only establish TLS connections to PostgreSQL and check that the PostgreSQL server’s certificate is valid and matches the expected hostname.
52
52
53
53
### Encryption at Rest
54
54
55
55
Run PostgreSQL on server(s) with full disk encryption enabled and configured.
56
56
57
-
Additionally, Coder supports [encrypting some particularly sensitive data](../../admin/security/database-encryption) including OIDC tokens using an encryption key managed independently of the database, so even a user with full administrative privileges on the PostgreSQL server(s) cannot read the data without the separate key. If you use this feature:
57
+
Additionally, Coder supports [encrypting some particularly sensitive data](../../admin/security/database-encryption.md) including OIDC tokens using an encryption key managed independently of the database, so even a user with full administrative privileges on the PostgreSQL server(s) cannot read the data without the separate key. If you use this feature:
58
58
59
59
1. Generate the encryption key randomly and store it in a central secrets management system like Vault.
60
60
1. Inject the secret using an environment variable.
61
61
- If in Kubernetes, use a Kubernetes Secret, rather than including the secret directly in the podspec
62
-
1.[Rotate the key immediately](../../admin/security/database-encryption#rotating-keys) if you suspect it has been leaked. Follow any organization policies about key rotation on a fixed schedule.
62
+
1.[Rotate the key immediately](../../admin/security/database-encryption.md#rotating-keys) if you suspect it has been leaked. Follow any organization policies about key rotation on a fixed schedule.
63
63
64
64
## Provisioner Daemons
65
65
@@ -79,7 +79,7 @@ When Coder workspaces are deployed into multiple clusters/clouds, or workspaces
79
79
80
80
### Authentication
81
81
82
-
Use a [Scoped Key](../../admin/provisioners#scoped-key-recommended) to authenticate the provisioner daemons with Coder. These keys can only be used to authenticate provisioner daemons (not other APIs on the Coder Server).
82
+
Use a [Scoped Key](../../admin/provisioners.md#scoped-key-recommended) to authenticate the provisioner daemons with Coder. These keys can only be used to authenticate provisioner daemons (not other APIs on the Coder Server).
83
83
84
84
Store the keys securely and use environment variables to pass them to the provisioner daemon. If on Kubernetes, use a Kubernetes Secret to set the environment variable
85
85
@@ -116,11 +116,11 @@ Workspace proxies have unrestricted access to establish encrypted tunnels to wor
116
116
117
117
### Authentication
118
118
119
-
Securely store the workspace proxy token generated by [`coder wsproxy create`](../../admin/networking/workspace-proxies#step-1-create-the-proxy). Inject the token to the workspace proxy process via an environment variable, rather than via an argument. If on Kubernetes, use a Kubernetes Secret to set the environment variable.
119
+
Securely store the workspace proxy token generated by [`coder wsproxy create`](../../admin/networking/workspace-proxies.md#step-1-create-the-proxy). Inject the token to the workspace proxy process via an environment variable, rather than via an argument. If on Kubernetes, use a Kubernetes Secret to set the environment variable.
120
120
121
121
### Encryption in Transit
122
122
123
-
Enable TLS on Coder Server and ensure you use an https:// URL to access the Coder Server.
123
+
Enable TLS on Coder Server and ensure you use an `https://` URL to access the Coder Server.
124
124
125
125
Communication to the proxied workspace applications is always encrypted with Wireguard. No action is required.
126
126
@@ -217,11 +217,11 @@ All DERP messages are end-to-end encrypted, so the DERP service only learns the
217
217
218
218
[STUN](https://en.wikipedia.org/wiki/STUN) is an IETF standard protocol that allows network endpoints behind NAT to learn their public address / port mappings. It is an essential component of Coder’s networking to enable encrypted tunnels to be established without a relay for best performance. Coder does not ship with a STUN service because it needs to be run directly connected to the network, not behind a reverse proxy or load balancer as Coder usually is.
219
219
220
-
STUN messages are not encrypted, but do not transmit any tunneled data, they simply query the public address / ports. As such, a STUN service learns the public address and port information (i.e. the address and port on the NAT device) of Coder workspaces and the end user device if STUN is configured. Unlike DERP, it doesn’t definitively learn about communicating pairs of IPs. If you consider the public IP and port information to be sensitive, do not use public STUN servers. You may choose not to configure any STUN servers, in which case most workspace traffic will need to be relayed via DERP. You may choose to deploy your own STUN servers, either on the public Internet, or on your corporate network and [configure Coder to use it](../../reference/cli/server#--derp-server-stun-addresses). If you do not consider the addresses and ports to be sensitive, we recommend using the default set of STUN servers operated by Google.
220
+
STUN messages are not encrypted, but do not transmit any tunneled data, they simply query the public address / ports. As such, a STUN service learns the public address and port information (i.e. the address and port on the NAT device) of Coder workspaces and the end user device if STUN is configured. Unlike DERP, it doesn’t definitively learn about communicating pairs of IPs. If you consider the public IP and port information to be sensitive, do not use public STUN servers. You may choose not to configure any STUN servers, in which case most workspace traffic will need to be relayed via DERP. You may choose to deploy your own STUN servers, either on the public Internet, or on your corporate network and [configure Coder to use it](../../reference/cli/server.md#--derp-server-stun-addresses). If you do not consider the addresses and ports to be sensitive, we recommend using the default set of STUN servers operated by Google.
221
221
222
222
#### Workspace Apps
223
223
224
-
Coder workspace apps are a way to allow users to access web applications running in the workspace via the Coder Server or Workspace Proxy. [Disable workspace apps on sub-paths](../../reference/cli/server#--disable-path-apps) of the main Coder domain name, and [use a separate, wildcard domain name](../../admin/setup#wildcard-access-url) for forwarding. Because of the default [same-origin policy](https://en.wikipedia.org/wiki/Same-origin_policy) in browsers, serving web apps on the main Coder domain would allow those apps to send API requests to the Coder Server, authenticated as the logged in user without their explicit consent.
224
+
Coder workspace apps are a way to allow users to access web applications running in the workspace via the Coder Server or Workspace Proxy. [Disable workspace apps on sub-paths](../../reference/cli/server.md#--disable-path-apps) of the main Coder domain name, and [use a separate, wildcard domain name](../../admin/setup/index.md#wildcard-access-url) for forwarding. Because of the default [same-origin policy](https://en.wikipedia.org/wiki/Same-origin_policy) in browsers, serving web apps on the main Coder domain would allow those apps to send API requests to the Coder Server, authenticated as the logged in user without their explicit consent.
0 commit comments