|
| 1 | +--- |
| 2 | +title: Shared security responsibility |
| 3 | +description: |
| 4 | + Learn how Coder and its users carry security-related responsibilities. |
| 5 | +--- |
| 6 | + |
| 7 | +To guarantee the security of the Coder workspace, which includes the entire |
| 8 | +ecosystem of components needed to support the developer's user experience, |
| 9 | +several parties must carry different responsibilities. While this is not an |
| 10 | +exhaustive list, this article lists the security responsibilities for both Coder |
| 11 | +and its users (specifically the site admin/site managers). |
| 12 | + |
| 13 | +There are two categories of integration points for a Coder workspace: |
| 14 | + |
| 15 | +1. Kubernetes and networking |
| 16 | +1. External tie-ins (authentication, container registries, Git providers, etc.) |
| 17 | + |
| 18 | +## Kubernetes and networking |
| 19 | + |
| 20 | +Like most software, Coder depends on the system on which it is installed to |
| 21 | +provide some security boundaries. Coder is installed onto Kubernetes clusters |
| 22 | +and includes expectations of how to cluster is configured. As such, changes to |
| 23 | +the following aspects of your cluster may impact Coder's security and |
| 24 | +performance: |
| 25 | + |
| 26 | +- Storage |
| 27 | + - Quotas |
| 28 | + - Encryption |
| 29 | + - Cloud access to volumes |
| 30 | + - Depletion as denial of service |
| 31 | + - PVC |
| 32 | + - Ephemeral |
| 33 | +- Networking |
| 34 | + - Encryption (mTLS) |
| 35 | + - Certificates |
| 36 | + - TLS certificates presented by `coderd` |
| 37 | + - TLS certificats presented by the applications with which Coder |
| 38 | + interacts |
| 39 | + - Boundaries (e.g., network policies) |
| 40 | + - External interactions (ingress and egress) |
| 41 | + - IP address depletion as denial of service |
| 42 | + - Each workspace gets an IP address in the `pod` subset |
| 43 | + - Each dev URL gets an IP address in the `services` subnet |
| 44 | +- Kubernetes roles |
| 45 | + - Service accounts for Coder to create pods |
| 46 | + - Cluster admins (use of cluster admins can pose a security risk) |
| 47 | + - Cloud access to the control plane |
| 48 | +- Node security |
| 49 | + - Upgrades to keep up with Kubernetes |
| 50 | + - Access to node user accounts |
| 51 | + - Cloud access to nodes |
| 52 | + |
| 53 | +### Recommendations |
| 54 | + |
| 55 | +We recommend that you **deploy Coder to its own cluster**. With this option, the |
| 56 | +security boundary is around the cluster, so things like PVC access, password |
| 57 | +resets, and database access are clearly actions taken against Coder. Cluster |
| 58 | +admins can perform any necessary action, while all others are constrained by |
| 59 | +their Coder role. |
| 60 | + |
| 61 | +Though you can deploy Coder to a shared cluster, the security boundary is |
| 62 | +threaded through the components mentioned in the section above due to the |
| 63 | +multiple applications present in the cluster. |
| 64 | + |
| 65 | +## External tie-ins |
| 66 | + |
| 67 | +Coder makes assumptions about how the following tie-ins are configured when |
| 68 | +deploying security controls: |
| 69 | + |
| 70 | +- Authentication provider |
| 71 | + - Changing the authentication provider settings can render Coder insecure |
| 72 | + - Site admins could convert a user authenticating via OIDC to built-in, |
| 73 | + allowing the admin to impersonate the user |
| 74 | +- Container registry |
| 75 | + - The registry account used to access images should be a specific |
| 76 | + Coder-only account so that Coder users can only pull approved images |
| 77 | + - CVMs can only pull unauthenticated containers, which means that any user can |
| 78 | + reference any container within the registry |
| 79 | +- Git provider |
| 80 | + - OAuth linkage allows Coder admins to perform actions as the linked Git user |
| 81 | + - SSH keys generated by Coder and added to workspaces can be used to |
| 82 | + circumvent 2FA to GitLab via Coder |
| 83 | + - Git integration request both SSH and HTTPS access to function |
| 84 | + - Access to all user repos must be added to a Coder workspace to clone private |
| 85 | + dotfiles repos |
| 86 | + - Coder doesn't allow the linking of multiple Git providers of the same type |
| 87 | + - Disabling the OAuth linking account may cause a denial of service |
0 commit comments