From cbcde572d7f683000977f170d6d4a85145c785b4 Mon Sep 17 00:00:00 2001 From: Charlie Voiselle <464492+angrycub@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:48:11 -0500 Subject: [PATCH 01/11] docs: improve admonition for need to add useHttpPath --- docs/admin/external-auth.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/admin/external-auth.md b/docs/admin/external-auth.md index 51f11f53d2754..2116beb3046e1 100644 --- a/docs/admin/external-auth.md +++ b/docs/admin/external-auth.md @@ -185,6 +185,17 @@ Multiple providers are an Enterprise feature. [Learn more](https://coder.com/pricing#compare-plans). Below is an example configuration with multiple providers. +
+ +**Note:** To support regex matching for paths (e.g. github\.com/org), you'll +need to add this to the [Coder agent startup script][agent_startup]: + +```shell +git config --global credential.useHttpPath true +``` + ++ ```env # Provider 1) github.com CODER_EXTERNAL_AUTH_0_ID=primary-github @@ -204,10 +215,4 @@ CODER_EXTERNAL_AUTH_1_TOKEN_URL="https://github.example.com/login/oauth/access_t CODER_EXTERNAL_AUTH_1_VALIDATE_URL="https://github.example.com/api/v3/user" ``` -To support regex matching for paths (e.g. github\.com/org), you'll need to add -this to the -[Coder agent startup script](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent#startup_script): - -```shell -git config --global credential.useHttpPath true -``` +[agent_startup]: https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent#startup_script From 2145ffaaab3e719173853dbc14c18831a06f041f Mon Sep 17 00:00:00 2001 From: Charlie Voiselle <464492+angrycub@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:49:23 -0500 Subject: [PATCH 02/11] docs: fix list item nesting --- docs/admin/integrations/island.md | 149 ++++++++++++++++-------------- 1 file changed, 80 insertions(+), 69 deletions(-) diff --git a/docs/admin/integrations/island.md b/docs/admin/integrations/island.md index 74cd449f4257f..ed6d7d6cd7392 100644 --- a/docs/admin/integrations/island.md +++ b/docs/admin/integrations/island.md @@ -10,13 +10,12 @@ April 24, 2024 --- -[Island](https://www.island.io/) is an enterprise-grade browser, offering a -Chromium-based experience similar to popular web browsers like Chrome and Edge. -It includes built-in security features for corporate applications and data, -aiming to bridge the gap between consumer-focused browsers and the security -needs of the enterprise. +[Island][] is an enterprise-grade browser, offering a Chromium-based experience +similar to popular web browsers like Chrome and Edge. It includes built-in +security features for corporate applications and data, aiming to bridge the gap +between consumer-focused browsers and the security needs of the enterprise. -Coder natively integrates with Island's feature set, which include data loss +Coder natively integrates with Island’s feature set, which include data loss protection (DLP), application awareness, browser session recording, and single sign-on (SSO). This guide intends to document these feature categories and how they apply to your Coder deployment. @@ -29,98 +28,95 @@ We recommend creating an Application Group specific to Coder in the Island Management console. This Application Group object will be referenced when creating browser policies. -[See the Island documentation for creating an Application Group](https://documentation.island.io/docs/create-and-configure-an-application-group-object). +[See the Island documentation for creating an Application Group][app-group]. ## Advanced Data Loss Protection -Integrate Island's advanced data loss prevention (DLP) capabilities with Coder's -cloud development environment (CDE), enabling you to control the “last mile” -between developers’ CDE and their local devices, ensuring that sensitive IP -remains in your centralized environment. +Integrate Island’s advanced data loss prevention (DLP) capabilities with +Coder’s cloud development environment (CDE), enabling you to control the +“last mile” between developers’ CDE and their local devices, +ensuring that sensitive IP remains in your centralized environment. ### Block cut, copy, paste, printing, screen share -1. [Create a Data Sandbox Profile](https://documentation.island.io/docs/create-and-configure-a-data-sandbox-profile) +1. [Create a Data Sandbox Profile][data-sandbox]. 1. Configure the following actions to allow/block (based on your security - requirements): + requirements). -- Screenshot and Screen Share -- Printing -- Save Page -- Clipboard Limitations + - Screenshot and Screen Share + - Printing + - Save Page + - Clipboard Limitations -1. [Create a Policy Rule](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) - to apply the Data Sandbox Profile +1. [Create a Policy Rule][policy-rule] to apply the Data Sandbox Profile. -1. Define the Coder Application group as the Destination Object +1. Define the Coder Application group as the Destination Object. 1. Define the Data Sandbox Profile as the Action in the Last Mile Protection - section + section. -### Conditionally allow copy on Coder's CLI authentication page +### Conditionally allow copy on Coder’s CLI authentication page -1. [Create a URL Object](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) - with the following configuration: +1. [Create a URL Object][policy-rule] with the following configuration. -- **Include** -- **URL type**: Wildcard -- **URL address**: `coder.example.com/cli-auth` -- **Casing**: Insensitive + - **Include** + - **URL type**: Wildcard + - **URL address**: `coder.example.com/cli-auth` + - **Casing**: Insensitive -1. [Create a Data Sandbox Profile](https://documentation.island.io/docs/create-and-configure-a-data-sandbox-profile) +1. [Create a Data Sandbox Profile][data-sandbox]. -1. Configure action to allow copy/paste +1. Configure action to allow copy/paste. -1. [Create a Policy Rule](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) - to apply the Data Sandbox Profile +1. [Create a Policy Rule][policy-rule] to apply the Data Sandbox Profile. -1. Define the URL Object you created as the Destination Object +1. Define the URL Object you created as the Destination Object. 1. Define the Data Sandbox Profile as the Action in the Last Mile Protection - section + section. ### Prevent file upload/download from the browser -1. Create a Protection Profiles for both upload/download +1. Create a Protection Profiles for both upload/download. -- [Upload documentation](https://documentation.island.io/docs/create-and-configure-an-upload-protection-profile) -- [Download documentation](https://documentation.island.io/v1/docs/en/create-and-configure-a-download-protection-profile) + - [Upload documentation][upload-docs] + - [Download documentation][download-docs] -1. [Create a Policy Rule](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) - to apply the Protection Profiles +1. [Create a Policy Rule][policy-rule] to apply the Protection Profiles. -1. Define the Coder Application group as the Destination Object +1. Define the Coder Application group as the Destination Object. 1. Define the applicable Protection Profile as the Action in the Data Protection - section + section. ### Scan files for sensitive data -1. [Create a Data Loss Prevention scanner](https://documentation.island.io/docs/create-a-data-loss-prevention-scanner) +1. [Create a Data Loss Prevention scanner][dlp-scanner]. -1. [Create a Policy Rule](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) - to apply the DLP Scanner +1. [Create a Policy Rule][policy-rule] to apply the DLP Scanner. -1. Define the Coder Application group as the Destination Object +1. Define the Coder Application group as the Destination Object. -1. Define the DLP Scanner as the Action in the Data Protection section +1. Define the DLP Scanner as the Action in the Data Protection section. ## Application Awareness and Boundaries Ensure that Coder is only accessed through the Island browser, guaranteeing that -your browser-level DLP policies are always enforced, and developers can’t +your browser-level DLP policies are always enforced, and developers can’t sidestep such policies simply by using another browser. ### Configure browser enforcement, conditional access policies 1. Create a conditional access policy for your configured identity provider. -> Note: the configured IdP must be the same for both Coder and Island +
+ The configured IdP must be the same for both Coder and Island +-- [Azure Active Directory/Entra ID](https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-azure-ad#create-and-apply-a-conditional-access-policy) -- [Okta](https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-okta) -- [Google](https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-google-enterprise) + - [Azure Active Directory/Entra ID][island-entra] + - [Okta][island-okta] + - [Google][island-google] ## Browser Activity Logging @@ -129,35 +125,50 @@ screenshots, mouse clicks, and keystrokes. ### Activity Logging Module -1. [Create an Activity Logging Profile](https://documentation.island.io/docs/create-and-configure-an-activity-logging-profile) +1. [Create an Activity Logging Profile][logging-profile]. Supported browser events + include: -Supported browser events include: + - Web Navigation + - File Download + - File Upload + - Clipboard/Drag & Drop + - Print + - Save As + - Screenshots + - Mouse Clicks + - Keystrokes -- Web Navigation -- File Download -- File Upload -- Clipboard/Drag & Drop -- Print -- Save As -- Screenshots -- Mouse Clicks -- Keystrokes +1. [Create a Policy Rule][policy-rule] to apply the Activity Logging Profile. -1. [Create a Policy Rule](https://documentation.island.io/docs/create-and-configure-a-policy-rule-general) - to apply the Activity Logging Profile - -1. Define the Coder Application group as the Destination Object +1. Define the Coder Application group as the Destination Object. 1. Define the Activity Logging Profile as the Action in the Security & - Visibility section + Visibility section. ## Identity-aware logins (SSO) -Integrate Island's identity management system with Coder's authentication +Integrate Island’s identity management system with Coder’s authentication mechanisms to enable identity-aware logins. ### Configure single sign-on (SSO) seamless authentication between Coder and Island Configure the same identity provider (IdP) for both your Island and Coder -deployment. Upon initial login to the Island browser, the user's session token +deployment. Upon initial login to the Island browser, the user’s session token will automatically be passed to Coder and authenticate their Coder session. + + + + +[island]: https://www.island.io/ +[app-group]: https://documentation.island.io/docs/create-and-configure-an-application-group-object +[data-sandbox]: https://documentation.island.io/docs/create-and-configure-a-data-sandbox-profile +[policy-rule]: https://documentation.island.io/docs/create-and-configure-a-policy-rule-general +[url-object]: https://documentation.island.io/docs/create-and-configure-a-policy-rule-general +[logging-profile]: https://documentation.island.io/docs/create-and-configure-an-activity-logging-profile +[dlp-scanner]: https://documentation.island.io/docs/create-a-data-loss-prevention-scanner +[upload-docs]: https://documentation.island.io/docs/create-and-configure-an-upload-protection-profile +[download-docs]: https://documentation.island.io/v1/docs/en/create-and-configure-a-download-protection-profile + +[island-entra]: https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-azure-ad#create-and-apply-a-conditional-access-policy +[island-okta]: https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-okta +[island-google]: https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-google-enterprise From 004ab1a76b5c64c07f68d5b66d1dc971b3ac7827 Mon Sep 17 00:00:00 2001 From: Charlie Voiselle <464492+angrycub@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:51:40 -0500 Subject: [PATCH 03/11] docs: fix list item nesting --- docs/admin/integrations/jfrog-artifactory.md | 197 ++++++++++--------- 1 file changed, 102 insertions(+), 95 deletions(-) diff --git a/docs/admin/integrations/jfrog-artifactory.md b/docs/admin/integrations/jfrog-artifactory.md index 89a8ac99cf52e..5e41e63e2f71a 100644 --- a/docs/admin/integrations/jfrog-artifactory.md +++ b/docs/admin/integrations/jfrog-artifactory.md @@ -37,7 +37,7 @@ two type of modules that automate the JFrog Artifactory and Coder integration. This module is usable by JFrog self-hosted (on-premises) Artifactory as it requires configuring a custom integration. This integration benefits from -Coder's [external-auth](https://coder.com/docs/admin/external-auth) feature and +Coder's [external-auth][] feature and allows each user to authenticate with Artifactory using an OAuth flow and issues user-scoped tokens to each user. @@ -45,75 +45,76 @@ To set this up, follow these steps: 1. Modify your Helm chart `values.yaml` for JFrog Artifactory to add, -```yaml -artifactory: - enabled: true - frontend: - extraEnvironmentVariables: - - name: JF_FRONTEND_FEATURETOGGLER_ACCESSINTEGRATION - value: "true" - access: - accessConfig: - integrations-enabled: true - integration-templates: - - id: "1" - name: "CODER" - redirect-uri: "https://CODER_URL/external-auth/jfrog/callback" - scope: "applied-permissions/user" -``` - -> Note Replace `CODER_URL` with your Coder deployment URL, e.g., ->
+ + Replace `CODER_URL` with your JFrog Artifactory base URL; for example, `coder.mycompany.com`. + +2. Create a new Application Integration by going to
+ + Replace `JFROG_URL` with your JFrog Artifactory base URL; for example, `my-company.jfrog.io`. + ++ +4. Create or edit a Coder template and use the [JFrog-OAuth][] module to configure the integration. -```tf -module "jfrog" { - source = "registry.coder.com/modules/jfrog-oauth/coder" - version = "1.0.0" - agent_id = coder_agent.example.id - jfrog_url = "https://jfrog.example.com" - configure_code_server = true # this depends on the code-server - username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username" - package_managers = { - "npm": "npm", - "go": "go", - "pypi": "pypi" - } -} -``` + ```tf + module "jfrog" { + source = "registry.coder.com/modules/jfrog-oauth/coder" + version = "1.0.0" + agent_id = coder_agent.example.id + jfrog_url = "https://jfrog.example.com" + configure_code_server = true # this depends on the code-server + username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username" + package_managers = { + "npm": "npm", + "go": "go", + "pypi": "pypi" + } + } + ``` ### JFrog-Token -This module makes use of the -[Artifactory terraform provider](https://registry.terraform.io/providers/jfrog/artifactory/latest/docs) +This module makes use of the [Artifactory terraform provider][artifactory-tf-provider] and an admin-scoped token to create user-scoped tokens for each user by matching their Coder email or username with Artifactory. This can be used for both SaaS and self-hosted(on-premises) Artifactory instances. @@ -121,55 +122,61 @@ and self-hosted(on-premises) Artifactory instances. To set this up, follow these steps: 1. Get a JFrog access token from your Artifactory instance. The token must be an - [admin token](https://registry.terraform.io/providers/jfrog/artifactory/latest/docs#access-token) - with scope `applied-permissions/admin`. -2. Create or edit a Coder template and use the - [JFrog-Token](https://registry.coder.com/modules/jfrog-token) module to + [admin token] with scope `applied-permissions/admin`. + +2. Create or edit a Coder template and use the [JFrog-Token][] module to configure the integration and pass the admin token. It is recommended to store the token in a sensitive terraform variable to prevent it from being displayed in plain text in the terraform state. -```tf -variable "artifactory_access_token" { - type = string - sensitive = true -} - -module "jfrog" { - source = "registry.coder.com/modules/jfrog-token/coder" - version = "1.0.0" - agent_id = coder_agent.example.id - jfrog_url = "https://example.jfrog.io" - configure_code_server = true # this depends on the code-server - artifactory_access_token = var.artifactory_access_token - package_managers = { - "npm": "npm", - "go": "go", - "pypi": "pypi" - } -} -``` + ```tf + variable "artifactory_access_token" { + type = string + sensitive = true + } + + module "jfrog" { + source = "registry.coder.com/modules/jfrog-token/coder" + version = "1.0.0" + agent_id = coder_agent.example.id + jfrog_url = "https://example.jfrog.io" + configure_code_server = true # this depends on the code-server + artifactory_access_token = var.artifactory_access_token + package_managers = { + "npm": "npm", + "go": "go", + "pypi": "pypi" + } + } + ```
The admin-level access token is used to provision user tokens and is never exposed to developers or stored in workspaces.-If you do not want to use the official modules, you can check example template -that uses Docker as the underlying compute -[here](https://github.com/coder/coder/tree/main/examples/jfrog/docker). The same -concepts apply to all compute types. +If you don't want to use the official modules, you can read through the +[example template][docker-template], which uses Docker as the underlying compute. +The same concepts apply to all compute types. ## Offline Deployments -See the -[offline deployments](../templates/extending-templates/modules.md#offline-installations) -section for instructions on how to use coder-modules in an offline environment -with Artifactory. +See the [offline deployments][] section for instructions on how to use +coder-modules in an offline environment with Artifactory. ## More reading -- See the full example template - [here](https://github.com/coder/coder/tree/main/examples/jfrog/docker). +- See the [full example Docker template][docker-template]. + - To serve extensions from your own VS Code Marketplace, check out - [code-marketplace](https://github.com/coder/code-marketplace#artifactory-storage). + [code-marketplace][cm-artifactory]. + + +[jfrog-oauth]: https://registry.coder.com/modules/jfrog-oauth +[jfrog-token]: https://registry.coder.com/modules/jfrog-token +[cm-artifactory]:https://github.com/coder/code-marketplace#artifactory-storage +[offline deployments]: ../templates/extending-templates/modules.md#offline-installations +[docker-template]: https://github.com/coder/coder/tree/main/examples/jfrog/docker +[admin token]: https://registry.terraform.io/providers/jfrog/artifactory/latest/docs#access-token +[artifactory-tf-provider]: https://registry.terraform.io/providers/jfrog/artifactory/latest/docs +[external-auth]: https://coder.com/docs/admin/external-auth From aea696720c39855243794a967751642d2ffcfdb9 Mon Sep 17 00:00:00 2001 From: Charlie Voiselle <464492+angrycub@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:52:34 -0500 Subject: [PATCH 04/11] docs: improve admonition for authentication --- docs/admin/integrations/jfrog-xray.md | 86 ++++++++++++++++----------- 1 file changed, 51 insertions(+), 35 deletions(-) diff --git a/docs/admin/integrations/jfrog-xray.md b/docs/admin/integrations/jfrog-xray.md index 933bf2e475edd..39bfbd6248b44 100644 --- a/docs/admin/integrations/jfrog-xray.md +++ b/docs/admin/integrations/jfrog-xray.md @@ -10,61 +10,77 @@ March 17, 2024 --- -This guide will walk you through the process of adding -[JFrog Xray](https://jfrog.com/xray/) integration to Coder Kubernetes workspaces -using Coder's [JFrog Xray Integration](https://github.com/coder/coder-xray). + +This guide describes the process of integrating [JFrog Xray][] to Coder +Kubernetes-backed workspaces using Coder’s [JFrog Xray Integration][`coder-xray`]. ## Prerequisites - A self-hosted JFrog Platform instance. - Kubernetes workspaces running on Coder. -## Deploying the Coder - JFrog Xray Integration -1. Create a JFrog Platform - [Access Token](https://jfrog.com/help/r/jfrog-platform-administration-documentation/access-tokens) - with a user that has the read - [permission](https://jfrog.com/help/r/jfrog-platform-administration-documentation/permissions) - for the repositories you want to scan. -1. Create a Coder [token](../../reference/cli/tokens_create.md#tokens-create) - with a user that has the [`owner`](../users/index.md#roles) role. +## Deploy the **Coder - JFrog Xray** Integration + +1. Create a JFrog Platform [Access Token][] with a user that has the `read` + [permission][] for the repositories you want to scan. + +1. Create a Coder [token][] with a user that has the [`owner`][roles] role. + 1. Create Kubernetes secrets for the JFrog Xray and Coder tokens. ```bash - kubectl create secret generic coder-token --from-literal=coder-token='
+ + **Note**: To authenticate with the Artifactory registry, you may need to + create a [Docker config][docker-advanced-topics] and use it in the + `imagePullSecrets` field of the Kubernetes Pod. See the + [**Defining ImagePullSecrets for Coder workspaces**][image-pull-secret] + guide for more information. + +-[`coder-xray`](https://github.com/coder/coder-xray) will scan all kubernetes -workspaces in the specified namespace. It depends on the `image` available in -Artifactory and indexed by Xray. To ensure that the images are available in -Artifactory, update the Coder template to use the Artifactory registry. +## Validate your installation -```tf -image = "
+ +You can enable + [detailed database metrics](../../reference/cli/server.md#--prometheus-collect-db-metrics) + in Coder's Prometheus endpoint. +If you have [tracing enabled](../../reference/cli/server.md#--trace), these +traces may also contain useful information regarding Coder's database activity. +## DERP @@ -149,8 +149,11 @@ This is not necessarily a fatal error, but a possible indication of a misconfigured reverse HTTP proxy. Additionally, while workspace users should still be able to reach their workspaces, connection performance may be degraded. -> **Note:** This may also be shown if you have -> [forced websocket connections for DERP](../../reference/cli/server.md#--derp-force-websockets). +
+ +**Note:** This may also be shown if you have +[forced websocket connections for DERP](../../reference/cli/server.md#--derp-force-websockets). +**Solution:** ensure that any proxies you use allow connection upgrade with the `Upgrade: derp` header. @@ -300,8 +303,11 @@ that they are able to successfully connect to Coder. Otherwise, ensure [`--provisioner-daemons`](../../reference/cli/server.md#--provisioner-daemons) is set to a value greater than 0. -> Note: This may be a transient issue if you are currently in the process of -> updating your deployment. +
+ +**Note:** This may be a transient issue if you are currently in the process of +updating your deployment. +### EPD02 @@ -315,8 +321,11 @@ of API incompatibility. **Solution:** Update the provisioner daemon to match the currently running version of Coder. -> Note: This may be a transient issue if you are currently in the process of -> updating your deployment. +
+ +**Note:** This may be a transient issue if you are currently in the process of +updating your deployment. +### EPD03 @@ -330,8 +339,11 @@ connect to Coder. **Solution:** Update the provisioner daemon to match the currently running version of Coder. -> Note: This may be a transient issue if you are currently in the process of -> updating your deployment. +
+ +**Note:** This may be a transient issue if you are currently in the process of +updating your deployment. +## EUNKNOWN From 93b6a5b1705717469c773a5cd519df1ef0c15c3c Mon Sep 17 00:00:00 2001 From: Charlie Voiselle <464492+angrycub@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:55:18 -0500 Subject: [PATCH 07/11] docs: improve admonitions --- docs/contributing/frontend.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/contributing/frontend.md b/docs/contributing/frontend.md index c9d972711bce3..990f67b8c8759 100644 --- a/docs/contributing/frontend.md +++ b/docs/contributing/frontend.md @@ -23,14 +23,15 @@ You can run the UI and access the Coder dashboard in two ways: In both cases, you can access the dashboard on `http://localhost:8080`. If using `./scripts/develop.sh` you can log in with the default credentials. -> [!TIP] -> -> **Default Credentials:** `admin@coder.com` and `SomeSecurePassword!`. +
+ +**Default Credentials:** `admin@coder.com` and `SomeSecurePassword!`. +## Tech Stack Overview -All our dependencies are described in `site/package.json` but the following are -the most important: +All our dependencies are described in `site/package.json`, but the following are +the most important. - [React](https://reactjs.org/) for the UI framework - [Typescript](https://www.typescriptlang.org/) to keep our sanity From 504d4267664e4c5247ab15bc52b23877c3348bc2 Mon Sep 17 00:00:00 2001 From: Charlie Voiselle <464492+angrycub@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:55:55 -0500 Subject: [PATCH 08/11] docs: content edits, reference links to make copy easier to read --- docs/admin/integrations/prometheus.md | 35 +++++++++++++++------------ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/docs/admin/integrations/prometheus.md b/docs/admin/integrations/prometheus.md index 059e19da126cc..5c299d73feeee 100644 --- a/docs/admin/integrations/prometheus.md +++ b/docs/admin/integrations/prometheus.md @@ -3,9 +3,8 @@ Coder exposes many metrics which can be consumed by a Prometheus server, and give insight into the current state of a live Coder deployment. -If you don't have an Prometheus server installed, you can follow the Prometheus -[Getting started](https://prometheus.io/docs/prometheus/latest/getting_started/) -guide. +If you don't have a Prometheus server installed, you can follow the Prometheus +[Getting started][prom-get-started] guide. ## Enable Prometheus metrics @@ -19,7 +18,7 @@ use either the environment variable `CODER_PROMETHEUS_ADDRESS` or the flag address. If `coder server --prometheus-enable` is started locally, you can preview the -metrics endpoint in your browser or by using curl: +metrics endpoint in your browser or by using curl. ```console $ curl http://localhost:2112/ @@ -31,13 +30,12 @@ coderd_api_active_users_duration_hour 0 ### Kubernetes deployment -The Prometheus endpoint can be enabled in the -[Helm chart's](https://github.com/coder/coder/tree/main/helm) `values.yml` by -setting the environment variable `CODER_PROMETHEUS_ADDRESS` to `0.0.0.0:2112`. -The environment variable `CODER_PROMETHEUS_ENABLE` will be enabled -automatically. A Service Endpoint will not be exposed; if you need to expose the -Prometheus port on a Service, (for example, to use a `ServiceMonitor`), create a -separate headless service instead: +The Prometheus endpoint can be enabled in the [Helm chart's][coder-helm] +`values.yml` by setting the environment variable `CODER_PROMETHEUS_ADDRESS` to +`0.0.0.0:2112`. The environment variable `CODER_PROMETHEUS_ENABLE` will be +enabled automatically. A Service Endpoint will not be exposed; if you need to +expose the Prometheus port on a Service, (for example, to use a `ServiceMonitor`), +create a separate headless service instead. ```yaml apiVersion: v1 @@ -62,21 +60,22 @@ spec: To allow Prometheus to scrape the Coder metrics, you will need to create a `scape_config` in your `prometheus.yml` file, or in the Prometheus Helm chart -values. Below is an example `scrape_config`: +values. The following is an example `scrape_config`. ```yaml scrape_configs: - job_name: "coder" scheme: "http" static_configs: - - targets: ["
- The configured IdP must be the same for both Coder and Island -+
+ The configured IdP must be the same for both Coder and Island +- - [Azure Active Directory/Entra ID][island-entra] - - [Okta][island-okta] - - [Google][island-google] + - [Azure Active Directory/Entra ID][island-entra] + - [Okta][island-okta] + - [Google][island-google] ## Browser Activity Logging @@ -125,8 +125,8 @@ screenshots, mouse clicks, and keystrokes. ### Activity Logging Module -1. [Create an Activity Logging Profile][logging-profile]. Supported browser events - include: +1. [Create an Activity Logging Profile][logging-profile]. Supported browser + events include: - Web Navigation - File Download @@ -147,28 +147,38 @@ screenshots, mouse clicks, and keystrokes. ## Identity-aware logins (SSO) -Integrate Island’s identity management system with Coder’s authentication -mechanisms to enable identity-aware logins. +Integrate Island’s identity management system with Coder’s +authentication mechanisms to enable identity-aware logins. ### Configure single sign-on (SSO) seamless authentication between Coder and Island Configure the same identity provider (IdP) for both your Island and Coder -deployment. Upon initial login to the Island browser, the user’s session token -will automatically be passed to Coder and authenticate their Coder session. - - +deployment. Upon initial login to the Island browser, the user’s session +token will automatically be passed to Coder and authenticate their Coder +session. + [island]: https://www.island.io/ -[app-group]: https://documentation.island.io/docs/create-and-configure-an-application-group-object -[data-sandbox]: https://documentation.island.io/docs/create-and-configure-a-data-sandbox-profile -[policy-rule]: https://documentation.island.io/docs/create-and-configure-a-policy-rule-general -[url-object]: https://documentation.island.io/docs/create-and-configure-a-policy-rule-general -[logging-profile]: https://documentation.island.io/docs/create-and-configure-an-activity-logging-profile -[dlp-scanner]: https://documentation.island.io/docs/create-a-data-loss-prevention-scanner -[upload-docs]: https://documentation.island.io/docs/create-and-configure-an-upload-protection-profile -[download-docs]: https://documentation.island.io/v1/docs/en/create-and-configure-a-download-protection-profile - -[island-entra]: https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-azure-ad#create-and-apply-a-conditional-access-policy -[island-okta]: https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-okta -[island-google]: https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-google-enterprise +[app-group]: + https://documentation.island.io/docs/create-and-configure-an-application-group-object +[data-sandbox]: + https://documentation.island.io/docs/create-and-configure-a-data-sandbox-profile +[policy-rule]: + https://documentation.island.io/docs/create-and-configure-a-policy-rule-general +[url-object]: + https://documentation.island.io/docs/create-and-configure-a-policy-rule-general +[logging-profile]: + https://documentation.island.io/docs/create-and-configure-an-activity-logging-profile +[dlp-scanner]: + https://documentation.island.io/docs/create-a-data-loss-prevention-scanner +[upload-docs]: + https://documentation.island.io/docs/create-and-configure-an-upload-protection-profile +[download-docs]: + https://documentation.island.io/v1/docs/en/create-and-configure-a-download-protection-profile +[island-entra]: + https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-azure-ad#create-and-apply-a-conditional-access-policy +[island-okta]: + https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-okta +[island-google]: + https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-google-enterprise diff --git a/docs/admin/integrations/jfrog-artifactory.md b/docs/admin/integrations/jfrog-artifactory.md index 5e41e63e2f71a..61e1469898114 100644 --- a/docs/admin/integrations/jfrog-artifactory.md +++ b/docs/admin/integrations/jfrog-artifactory.md @@ -37,35 +37,36 @@ two type of modules that automate the JFrog Artifactory and Coder integration. This module is usable by JFrog self-hosted (on-premises) Artifactory as it requires configuring a custom integration. This integration benefits from -Coder's [external-auth][] feature and -allows each user to authenticate with Artifactory using an OAuth flow and issues -user-scoped tokens to each user. +Coder's [external-auth][] feature and allows each user to authenticate with +Artifactory using an OAuth flow and issues user-scoped tokens to each user. To set this up, follow these steps: 1. Modify your Helm chart `values.yaml` for JFrog Artifactory to add, - ```yaml - artifactory: - enabled: true - frontend: - extraEnvironmentVariables: - - name: JF_FRONTEND_FEATURETOGGLER_ACCESSINTEGRATION - value: "true" - access: - accessConfig: - integrations-enabled: true - integration-templates: - - id: "1" - name: "CODER" - redirect-uri: "https://CODER_URL/external-auth/jfrog/callback" - scope: "applied-permissions/user" - ``` -
- - Replace `CODER_URL` with your JFrog Artifactory base URL; for example, `coder.mycompany.com`. - -+ ```yaml + artifactory: + enabled: true + frontend: + extraEnvironmentVariables: + - name: JF_FRONTEND_FEATURETOGGLER_ACCESSINTEGRATION + value: "true" + access: + accessConfig: + integrations-enabled: true + integration-templates: + - id: "1" + name: "CODER" + redirect-uri: "https://CODER_URL/external-auth/jfrog/callback" + scope: "applied-permissions/user" + ``` + +
+ + Replace `CODER_URL` with your JFrog Artifactory base URL; for example, + `coder.mycompany.com`. + +2. Create a new Application Integration by going to
+ ```env + # JFrog Artifactory External Auth + CODER_EXTERNAL_AUTH_1_ID="jfrog" + CODER_EXTERNAL_AUTH_1_TYPE="jfrog" + CODER_EXTERNAL_AUTH_1_CLIENT_ID="YYYYYYYYYYYYYYY" + CODER_EXTERNAL_AUTH_1_CLIENT_SECRET="XXXXXXXXXXXXXXXXXXX" + CODER_EXTERNAL_AUTH_1_DISPLAY_NAME="JFrog Artifactory" + CODER_EXTERNAL_AUTH_1_DISPLAY_ICON="/icon/jfrog.svg" + CODER_EXTERNAL_AUTH_1_AUTH_URL="https://JFROG_URL/ui/authorization" + CODER_EXTERNAL_AUTH_1_SCOPES="applied-permissions/user" + ``` - Replace `JFROG_URL` with your JFrog Artifactory base URL; for example, `my-company.jfrog.io`. +4. Create or edit a Coder template and use the [JFrog-OAuth][] module to configure the integration. - ```tf - module "jfrog" { - source = "registry.coder.com/modules/jfrog-oauth/coder" - version = "1.0.0" - agent_id = coder_agent.example.id - jfrog_url = "https://jfrog.example.com" - configure_code_server = true # this depends on the code-server - username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username" - package_managers = { - "npm": "npm", - "go": "go", - "pypi": "pypi" - } - } - ``` + ```tf + module "jfrog" { + source = "registry.coder.com/modules/jfrog-oauth/coder" + version = "1.0.0" + agent_id = coder_agent.example.id + jfrog_url = "https://jfrog.example.com" + configure_code_server = true # this depends on the code-server + username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username" + package_managers = { + "npm": "npm", + "go": "go", + "pypi": "pypi" + } + } + ``` ### JFrog-Token -This module makes use of the [Artifactory terraform provider][artifactory-tf-provider] -and an admin-scoped token to create user-scoped tokens for each user by matching -their Coder email or username with Artifactory. This can be used for both SaaS -and self-hosted(on-premises) Artifactory instances. +This module makes use of the [Artifactory terraform +provider][artifactory-tf-provider] and an admin-scoped token to create +user-scoped tokens for each user by matching their Coder email or username with +Artifactory. This can be used for both SaaS and self-hosted(on-premises) +Artifactory instances. To set this up, follow these steps: @@ -129,40 +133,40 @@ To set this up, follow these steps: store the token in a sensitive terraform variable to prevent it from being displayed in plain text in the terraform state. - ```tf - variable "artifactory_access_token" { - type = string - sensitive = true - } - - module "jfrog" { - source = "registry.coder.com/modules/jfrog-token/coder" - version = "1.0.0" - agent_id = coder_agent.example.id - jfrog_url = "https://example.jfrog.io" - configure_code_server = true # this depends on the code-server - artifactory_access_token = var.artifactory_access_token - package_managers = { - "npm": "npm", - "go": "go", - "pypi": "pypi" - } - } - ``` + ```tf + variable "artifactory_access_token" { + type = string + sensitive = true + } + + module "jfrog" { + source = "registry.coder.com/modules/jfrog-token/coder" + version = "1.0.0" + agent_id = coder_agent.example.id + jfrog_url = "https://example.jfrog.io" + configure_code_server = true # this depends on the code-server + artifactory_access_token = var.artifactory_access_token + package_managers = { + "npm": "npm", + "go": "go", + "pypi": "pypi" + } + } + ```-+ Replace `JFROG_URL` with your JFrog Artifactory base URL; for example, + `my-company.jfrog.io`. + +
The admin-level access token is used to provision user tokens and is never exposed to developers or stored in workspaces.-If you don't want to use the official modules, you can read through the -[example template][docker-template], which uses Docker as the underlying compute. -The same concepts apply to all compute types. +If you don't want to use the official modules, you can read through the [example +template][docker-template], which uses Docker as the underlying compute. The +same concepts apply to all compute types. ## Offline Deployments -See the [offline deployments][] section for instructions on how to use -coder-modules in an offline environment with Artifactory. +See the [offline deployments][] section for instructions on how to use coder-modules +in an offline environment with Artifactory. ## More reading @@ -172,11 +176,16 @@ coder-modules in an offline environment with Artifactory. [code-marketplace][cm-artifactory]. + [jfrog-oauth]: https://registry.coder.com/modules/jfrog-oauth [jfrog-token]: https://registry.coder.com/modules/jfrog-token -[cm-artifactory]:https://github.com/coder/code-marketplace#artifactory-storage -[offline deployments]: ../templates/extending-templates/modules.md#offline-installations -[docker-template]: https://github.com/coder/coder/tree/main/examples/jfrog/docker -[admin token]: https://registry.terraform.io/providers/jfrog/artifactory/latest/docs#access-token -[artifactory-tf-provider]: https://registry.terraform.io/providers/jfrog/artifactory/latest/docs +[cm-artifactory]: https://github.com/coder/code-marketplace#artifactory-storage +[offline deployments]: + ../templates/extending-templates/modules.md#offline-installations +[docker-template]: + https://github.com/coder/coder/tree/main/examples/jfrog/docker +[admin token]: + https://registry.terraform.io/providers/jfrog/artifactory/latest/docs#access-token +[artifactory-tf-provider]: + https://registry.terraform.io/providers/jfrog/artifactory/latest/docs [external-auth]: https://coder.com/docs/admin/external-auth diff --git a/docs/admin/integrations/jfrog-xray.md b/docs/admin/integrations/jfrog-xray.md index 39bfbd6248b44..65974def647b3 100644 --- a/docs/admin/integrations/jfrog-xray.md +++ b/docs/admin/integrations/jfrog-xray.md @@ -10,20 +10,18 @@ March 17, 2024 --- - -This guide describes the process of integrating [JFrog Xray][] to Coder -Kubernetes-backed workspaces using Coder’s [JFrog Xray Integration][`coder-xray`]. +This guide describes the process of integrating [JFrog Xray][] to Coder Kubernetes-backed +workspaces using Coder’s [JFrog Xray Integration][`coder-xray`]. ## Prerequisites - A self-hosted JFrog Platform instance. - Kubernetes workspaces running on Coder. - ## Deploy the **Coder - JFrog Xray** Integration -1. Create a JFrog Platform [Access Token][] with a user that has the `read` - [permission][] for the repositories you want to scan. +1. Create a JFrog Platform [Access Token][] with a user that has the `read` [permission][] + for the repositories you want to scan. 1. Create a Coder [token][] with a user that has the [`owner`][roles] role. @@ -31,13 +29,13 @@ Kubernetes-backed workspaces using Coder’s [JFrog Xray Integration][`coder ```bash kubectl create secret generic coder-token \ - --from-literal=coder-token='
You can enable - [detailed database metrics](../../reference/cli/server.md#--prometheus-collect-db-metrics) - in Coder's Prometheus endpoint. -If you have [tracing enabled](../../reference/cli/server.md#--trace), these -traces may also contain useful information regarding Coder's database activity. +[detailed database metrics](../../reference/cli/server.md#--prometheus-collect-db-metrics) +in Coder's Prometheus endpoint. If you have +[tracing enabled](../../reference/cli/server.md#--trace), these traces may also +contain useful information regarding Coder's database activity. +## DERP @@ -153,6 +154,7 @@ still be able to reach their workspaces, connection performance may be degraded. **Note:** This may also be shown if you have [forced websocket connections for DERP](../../reference/cli/server.md#--derp-force-websockets). + **Solution:** ensure that any proxies you use allow connection upgrade with the @@ -307,6 +309,7 @@ is set to a value greater than 0. **Note:** This may be a transient issue if you are currently in the process of updating your deployment. + ### EPD02 @@ -325,6 +328,7 @@ version of Coder. **Note:** This may be a transient issue if you are currently in the process of updating your deployment. + ### EPD03 @@ -343,6 +347,7 @@ version of Coder. **Note:** This may be a transient issue if you are currently in the process of updating your deployment. + ## EUNKNOWN diff --git a/docs/contributing/frontend.md b/docs/contributing/frontend.md index 990f67b8c8759..0869bb6ac0879 100644 --- a/docs/contributing/frontend.md +++ b/docs/contributing/frontend.md @@ -26,6 +26,7 @@ In both cases, you can access the dashboard on `http://localhost:8080`. If using
**Default Credentials:** `admin@coder.com` and `SomeSecurePassword!`. +## Tech Stack Overview From b5b2e918aefa37e37b14573022cc76682d3ed9a9 Mon Sep 17 00:00:00 2001 From: EdwardAngert
The admin-level access token is used to provision user tokens and is never exposed to developers or stored in workspaces. - +If you don't want to use the official modules, you can read through the [example diff --git a/docs/admin/integrations/jfrog-xray.md b/docs/admin/integrations/jfrog-xray.md index e7016fc739485..bb1b9db106611 100644 --- a/docs/admin/integrations/jfrog-xray.md +++ b/docs/admin/integrations/jfrog-xray.md @@ -11,8 +11,8 @@ March 17, 2024 --- -This guide describes the process of integrating [JFrog Xray][] to Coder Kubernetes-backed -workspaces using Coder’s [JFrog Xray Integration][`coder-xray`]. +This guide describes the process of integrating [JFrog Xray](https://jfrog.com/xray/) to Coder Kubernetes-backed +workspaces using Coder's [JFrog Xray Integration](https://github.com/coder/coder-xray). ## Prerequisites @@ -21,10 +21,10 @@ workspaces using Coder’s [JFrog Xray Integration][`coder-xray`]. ## Deploy the **Coder - JFrog Xray** Integration -1. Create a JFrog Platform [Access Token][] with a user that has the `read` [permission][] +1. Create a JFrog Platform [Access Token](https://jfrog.com/help/r/jfrog-platform-administration-documentation/access-tokens) with a user that has the `read` [permission](https://jfrog.com/help/r/jfrog-platform-administration-documentation/permissions) for the repositories you want to scan. -1. Create a Coder [token][] with a user that has the [`owner`][roles] role. +1. Create a Coder [token](../../reference/cli/tokens_create.md#tokens-create) with a user that has the [`owner`](../users#roles) role. 1. Create Kubernetes secrets for the JFrog Xray and Coder tokens. @@ -58,10 +58,9 @@ workspaces using Coder’s [JFrog Xray Integration][`coder-xray`].
- **Note**: To authenticate with the Artifactory registry, you may need to - create a [Docker config][docker-advanced-topics] and use it in the - `imagePullSecrets` field of the Kubernetes Pod. See the [**Defining - ImagePullSecrets for Coder workspaces**][image-pull-secret] guide for more + To authenticate with the Artifactory registry, you may need to + create a [Docker config](https://jfrog.com/help/r/jfrog-artifactory-documentation/docker-advanced-topics) and use it in the + `imagePullSecrets` field of the Kubernetes Pod. See the [Defining ImagePullSecrets for Coder workspaces](../../tutorials/image-pull-secret.md) guide for more information.@@ -72,18 +71,3 @@ Once installed, configured workspaces will now have a banner appear on any workspace with vulnerabilities reported by JFrog Xray.
- The configured IdP must be the same for both Coder and Island -+Note that the configured IdP must be the same for both Coder and Island. - - [Azure Active Directory/Entra ID](https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-azure-ad#create-and-apply-a-conditional-access-policy) - - [Okta](https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-okta) - - [Google](https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-google-enterprise) +- [Azure Active Directory/Entra ID](https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-azure-ad#create-and-apply-a-conditional-access-policy) +- [Okta](https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-okta) +- [Google](https://documentation.island.io/docs/configure-browser-enforcement-for-island-with-google-enterprise) ## Browser Activity Logging diff --git a/docs/admin/integrations/jfrog-artifactory.md b/docs/admin/integrations/jfrog-artifactory.md index a71d58d6ea3c0..afc94d6158b94 100644 --- a/docs/admin/integrations/jfrog-artifactory.md +++ b/docs/admin/integrations/jfrog-artifactory.md @@ -137,8 +137,7 @@ To set this up, follow these steps: -If you don't want to use the official modules, you can read through the [example -template][docker-template], which uses Docker as the underlying compute. The +If you don't want to use the official modules, you can read through the [example template](https://github.com/coder/coder/tree/main/examples/jfrog/docker), which uses Docker as the underlying compute. The same concepts apply to all compute types. ## Offline Deployments
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: