Skip to content

docs: restructure docs #14182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 96 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
13d4f56
docs offsite day 1
bpmct May 22, 2024
3cf73ed
updated coder tour and screenshots
stirby May 23, 2024
5bcaf81
edit manifest
bpmct May 23, 2024
e97dcba
incomplete info on schedule
stirby May 23, 2024
1352640
changes
bpmct May 23, 2024
56ef29e
rebase on `main`
matifali Aug 6, 2024
d9b2b76
removed stub on coder tour
stirby May 23, 2024
de4599c
workspace README page and tour cleanup
stirby May 23, 2024
2c277df
fixed tour MD linksg
stirby May 23, 2024
ad4bb0c
replaced broken pngs
stirby May 23, 2024
920ac48
moved workspace access to a directory
stirby May 23, 2024
133721a
rebase on `main`
matifali Aug 6, 2024
762b680
workspace access docs
stirby May 23, 2024
f74f54d
user guides manifest
stirby May 23, 2024
eab79b3
rebase on `main`
matifali Aug 6, 2024
af700c3
vscode
stirby May 23, 2024
442b6fd
add schedule
bpmct May 23, 2024
c4de546
title case for user guides
stirby May 24, 2024
248bbc2
workspace scheduling
stirby May 24, 2024
48bdc86
added workspace updating to main user guide
stirby May 24, 2024
39185ed
dotfiles page done
stirby May 24, 2024
0cc2d32
fleshed out vscode page
stirby May 24, 2024
bec25cb
weekend
stirby May 26, 2024
79ee974
templates
bpmct May 24, 2024
a3f2e84
integrations
stirby May 26, 2024
c0784a4
removed other platforms page
stirby May 26, 2024
1753902
cleanup
stirby May 29, 2024
90d92e1
some reorg and writing
bpmct May 27, 2024
03f5a93
migrated guides to tutorials
stirby May 30, 2024
ee2c576
infrastructure landing page
bpmct Jun 8, 2024
2dcf91e
add guide for creating templates
bpmct Jun 8, 2024
1907108
new format
bpmct Jun 8, 2024
1215e22
consider linking to tf
bpmct Jun 8, 2024
ca1a458
install landing page
bpmct Jun 8, 2024
9b55009
post pto sync
stirby Jun 12, 2024
6267964
in flight admin-workspace changes
stirby Jun 12, 2024
13716a1
fixing images in about page
stirby Jun 12, 2024
17fcea1
reference/cli proper structure
bpmct Jun 15, 2024
fc159ce
rebase on `main`
matifali Aug 6, 2024
330132b
rebase on `main`
matifali Aug 6, 2024
1efad16
fixups for cli and api gen
bpmct Jun 15, 2024
215a3ac
modify to look for Command Line nested in manifest
bpmct Jun 15, 2024
0041e8c
rebase on `main`
matifali Aug 6, 2024
822130a
wip
matifali Aug 6, 2024
293e07c
wip
matifali Aug 6, 2024
259668b
add screenshots
bpmct Jun 15, 2024
bcfe8ba
workspace lifecycle WIP
stirby Jun 20, 2024
dd73049
added workspace lifecycle to manifest for preview
stirby Jun 20, 2024
d6f2a8c
moved resource definition outside of user guides
stirby Jun 20, 2024
15592cb
fixed manifext typo
stirby Jun 20, 2024
875274d
rough draft of workspace lifecycle
stirby Jun 20, 2024
ce0cd54
cleaned up user guide for workspace scheduling
stirby Jun 20, 2024
d47245b
linked workspace scheduling guide in workspace lifecycle
stirby Jun 20, 2024
bc7db22
started 'extending templates' rearranged resource persistence
stirby Jun 22, 2024
2da48b9
copied secrets.md under admin/security
stirby Jun 24, 2024
5d07ed9
wip
matifali Aug 6, 2024
1235238
partial completion of admin/templates/extending-templates
stirby Jun 24, 2024
22c4a55
additional extending templates refactors
stirby Jun 24, 2024
8add1d7
finished 'extending templates' with variables.md from old docs
stirby Jun 24, 2024
51365cd
added manifest for extending templates
stirby Jun 24, 2024
3a46ccd
added secrets to manifest
stirby Jun 24, 2024
6c269eb
added FAQs as a subsection of guides. Going to keep them for now.
stirby Jul 19, 2024
9ac4f3f
migrated networking docs
stirby Jul 19, 2024
cf13803
added control plane configuration docs
stirby Jul 19, 2024
4098a8c
add integration guides
matifali Aug 6, 2024
34b2ed6
fix manifest
matifali Aug 6, 2024
5ca11b0
fmt and typos
matifali Aug 6, 2024
1447aea
fixup!
matifali Aug 6, 2024
d00cc9b
fix some links
matifali Aug 6, 2024
cafa035
fixup!
matifali Aug 6, 2024
7963a1a
`make fmt`
matifali Aug 6, 2024
aa7d43c
`make gen`
matifali Aug 6, 2024
adfc34c
`make fmt`
matifali Aug 6, 2024
1d21c9a
fixup!
matifali Aug 6, 2024
5f5b3d9
fix capitalization
matifali Aug 6, 2024
4e43821
add scaling to manifest
matifali Aug 6, 2024
0d20438
fix link
matifali Aug 6, 2024
0763b35
rebase on `main`
matifali Aug 7, 2024
bf5535c
rebase on `main`
matifali Aug 7, 2024
2e4b218
fmt and typos
matifali Aug 6, 2024
0996219
`make fmt`
matifali Aug 7, 2024
990d440
`make gen`
matifali Aug 7, 2024
66ff05e
chore: bump github.com/ory/dockertest/v3 from 3.10.0 to 3.11.0 (#14237)
dependabot[bot] Aug 12, 2024
3b099fd
added workspace proxies from lost branch
stirby Aug 13, 2024
2f14a08
chore(docs): move scaling docs under admin/infrastructure (#14270)
stirby Aug 15, 2024
ad16573
chore(docs): add WebRDP to restructure docs (#14385)
stirby Aug 21, 2024
579778e
wip
matifali Aug 22, 2024
e8eb3e4
fixup!
matifali Aug 22, 2024
4b9c2c6
fmt
matifali Aug 22, 2024
01707ec
add snap
matifali Aug 22, 2024
e034239
fixup!
matifali Aug 22, 2024
c021161
fix IDEs mess
matifali Aug 22, 2024
3ef9932
fmt
matifali Aug 23, 2024
d3b4b78
link change management
matifali Aug 23, 2024
18a498d
add terraform modules
matifali Aug 23, 2024
801d4fa
delete filebrowser
matifali Aug 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rebase on main
  • Loading branch information
matifali committed Aug 12, 2024
commit 56ef29ed0471e61866edb50ff0876b0797576dea
250 changes: 250 additions & 0 deletions docs/admin-old/auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
# Authentication

![OIDC with Coder Sequence Diagram](../images/oidc-sequence-diagram.svg).

By default, Coder is accessible via password authentication. Coder does not
recommend using password authentication in production, and recommends using an
authentication provider with properly configured multi-factor authentication
(MFA). It is your responsibility to ensure the auth provider enforces MFA
correctly.

The following steps explain how to set up GitHub OAuth or OpenID Connect.

## GitHub

### Step 1: Configure the OAuth application in GitHub

First,
[register a GitHub OAuth app](https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/).
GitHub will ask you for the following Coder parameters:

- **Homepage URL**: Set to your Coder deployments
[`CODER_ACCESS_URL`](../cli/server.md#--access-url) (e.g.
`https://coder.domain.com`)
- **User Authorization Callback URL**: Set to `https://coder.domain.com`

> Note: If you want to allow multiple coder deployments hosted on subdomains
> e.g. coder1.domain.com, coder2.domain.com, to be able to authenticate with the
> same GitHub OAuth app, then you can set **User Authorization Callback URL** to
> the `https://domain.com`

Note the Client ID and Client Secret generated by GitHub. You will use these
values in the next step.

Coder will need permission to access user email addresses. Find the "Account
Permissions" settings for your app and select "read-only" for "Email addresses".

### Step 2: Configure Coder with the OAuth credentials

Navigate to your Coder host and run the following command to start up the Coder
server:

```shell
coder server --oauth2-github-allow-signups=true --oauth2-github-allowed-orgs="your-org" --oauth2-github-client-id="8d1...e05" --oauth2-github-client-secret="57ebc9...02c24c"
```

> For GitHub Enterprise support, specify the
> `--oauth2-github-enterprise-base-url` flag.

Alternatively, if you are running Coder as a system service, you can achieve the
same result as the command above by adding the following environment variables
to the `/etc/coder.d/coder.env` file:

```env
CODER_OAUTH2_GITHUB_ALLOW_SIGNUPS=true
CODER_OAUTH2_GITHUB_ALLOWED_ORGS="your-org"
CODER_OAUTH2_GITHUB_CLIENT_ID="8d1...e05"
CODER_OAUTH2_GITHUB_CLIENT_SECRET="57ebc9...02c24c"
```

**Note:** To allow everyone to signup using GitHub, set:

```env
CODER_OAUTH2_GITHUB_ALLOW_EVERYONE=true
```

Once complete, run `sudo service coder restart` to reboot Coder.

If deploying Coder via Helm, you can set the above environment variables in the
`values.yaml` file as such:

```yaml
coder:
env:
- name: CODER_OAUTH2_GITHUB_ALLOW_SIGNUPS
value: "true"
- name: CODER_OAUTH2_GITHUB_CLIENT_ID
value: "533...des"
- name: CODER_OAUTH2_GITHUB_CLIENT_SECRET
value: "G0CSP...7qSM"
# If setting allowed orgs, comment out CODER_OAUTH2_GITHUB_ALLOW_EVERYONE and its value
- name: CODER_OAUTH2_GITHUB_ALLOWED_ORGS
value: "your-org"
# If allowing everyone, comment out CODER_OAUTH2_GITHUB_ALLOWED_ORGS and it's value
#- name: CODER_OAUTH2_GITHUB_ALLOW_EVERYONE
# value: "true"
```

To upgrade Coder, run:

```shell
helm upgrade <release-name> coder-v2/coder -n <namespace> -f values.yaml
```

> We recommend requiring and auditing MFA usage for all users in your GitHub
> organizations. This can be enforced from the organization settings page in the
> "Authentication security" sidebar tab.

## OpenID Connect

The following steps through how to integrate any OpenID Connect provider (Okta,
Active Directory, etc.) to Coder.

### Step 1: Set Redirect URI with your OIDC provider

Your OIDC provider will ask you for the following parameter:

- **Redirect URI**: Set to `https://coder.domain.com/api/v2/users/oidc/callback`

### Step 2: Configure Coder with the OpenID Connect credentials

Navigate to your Coder host and run the following command to start up the Coder
server:

```shell
coder server --oidc-issuer-url="https://issuer.corp.com" --oidc-email-domain="your-domain-1,your-domain-2" --oidc-client-id="533...des" --oidc-client-secret="G0CSP...7qSM"
```

If you are running Coder as a system service, you can achieve the same result as
the command above by adding the following environment variables to the
`/etc/coder.d/coder.env` file:

```env
CODER_OIDC_ISSUER_URL="https://issuer.corp.com"
CODER_OIDC_EMAIL_DOMAIN="your-domain-1,your-domain-2"
CODER_OIDC_CLIENT_ID="533...des"
CODER_OIDC_CLIENT_SECRET="G0CSP...7qSM"
```

Once complete, run `sudo service coder restart` to reboot Coder.

If deploying Coder via Helm, you can set the above environment variables in the
`values.yaml` file as such:

```yaml
coder:
env:
- name: CODER_OIDC_ISSUER_URL
value: "https://issuer.corp.com"
- name: CODER_OIDC_EMAIL_DOMAIN
value: "your-domain-1,your-domain-2"
- name: CODER_OIDC_CLIENT_ID
value: "533...des"
- name: CODER_OIDC_CLIENT_SECRET
value: "G0CSP...7qSM"
```

To upgrade Coder, run:

```shell
helm upgrade <release-name> coder-v2/coder -n <namespace> -f values.yaml
```

## OIDC Claims

When a user logs in for the first time via OIDC, Coder will merge both the
claims from the ID token and the claims obtained from hitting the upstream
provider's `userinfo` endpoint, and use the resulting data as a basis for
creating a new user or looking up an existing user.

To troubleshoot claims, set `CODER_VERBOSE=true` and follow the logs while
signing in via OIDC as a new user. Coder will log the claim fields returned by
the upstream identity provider in a message containing the string
`got oidc claims`, as well as the user info returned.

> **Note:** If you need to ensure that Coder only uses information from the ID
> token and does not hit the UserInfo endpoint, you can set the configuration
> option `CODER_OIDC_IGNORE_USERINFO=true`.

### Email Addresses

By default, Coder will look for the OIDC claim named `email` and use that value
for the newly created user's email address.

If your upstream identity provider users a different claim, you can set
`CODER_OIDC_EMAIL_FIELD` to the desired claim.

> **Note** If this field is not present, Coder will attempt to use the claim
> field configured for `username` as an email address. If this field is not a
> valid email address, OIDC logins will fail.

### Email Address Verification

Coder requires all OIDC email addresses to be verified by default. If the
`email_verified` claim is present in the token response from the identity
provider, Coder will validate that its value is `true`. If needed, you can
disable this behavior with the following setting:

```env
CODER_OIDC_IGNORE_EMAIL_VERIFIED=true
```

> **Note:** This will cause Coder to implicitly treat all OIDC emails as
> "verified", regardless of what the upstream identity provider says.

### Usernames

When a new user logs in via OIDC, Coder will by default use the value of the
claim field named `preferred_username` as the the username.

If your upstream identity provider uses a different claim, you can set
`CODER_OIDC_USERNAME_FIELD` to the desired claim.

> **Note:** If this claim is empty, the email address will be stripped of the
> domain, and become the username (e.g. `example@coder.com` becomes `example`).
> To avoid conflicts, Coder may also append a random word to the resulting
> username.

## OIDC Login Customization

If you'd like to change the OpenID Connect button text and/or icon, you can
configure them like so:

```env
CODER_OIDC_SIGN_IN_TEXT="Sign in with Gitea"
CODER_OIDC_ICON_URL=https://gitea.io/images/gitea.png
```

To change the icon and text above the OpenID Connect button, see application
name and logo url in [appearance](./appearance.md) settings.

## Disable Built-in Authentication

To remove email and password login, set the following environment variable on
your Coder deployment:

```env
CODER_DISABLE_PASSWORD_AUTH=true
```

## SCIM (enterprise)

Coder supports user provisioning and deprovisioning via SCIM 2.0 with header
authentication. Upon deactivation, users are
[suspended](./users.md#suspend-a-user) and are not deleted.
[Configure](./configure.md) your SCIM application with an auth key and supply it
the Coder server.

```env
CODER_SCIM_API_KEY="your-api-key"
```

## TLS

If your OpenID Connect provider requires client TLS certificates for
authentication, you can configure them like so:

```env
CODER_TLS_CLIENT_CERT_FILE=/path/to/cert.pem
CODER_TLS_CLIENT_KEY_FILE=/path/to/key.pem
```
Empty file added docs/admin-old/healthcheck.md
Empty file.
72 changes: 72 additions & 0 deletions docs/admin-old/users.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Users

This article walks you through the user roles available in Coder and creating
and managing users.

## Roles

Coder offers these user roles in the community edition:

| | Auditor | User Admin | Template Admin | Owner |
| ----------------------------------------------------- | ------- | ---------- | -------------- | ----- |
| Add and remove Users | | ✅ | | ✅ |
| Manage groups (enterprise) | | ✅ | | ✅ |
| Change User roles | | | | ✅ |
| Manage **ALL** Templates | | | ✅ | ✅ |
| View **ALL** Workspaces | | | ✅ | ✅ |
| Update and delete **ALL** Workspaces | | | | ✅ |
| Run [external provisioners](./provisioners.md) | | | ✅ | ✅ |
| Execute and use **ALL** Workspaces | | | | ✅ |
| View all user operation [Audit Logs](./audit-logs.md) | ✅ | | | ✅ |

A user may have one or more roles. All users have an implicit Member role that
may use personal workspaces.

## Security notes

A malicious Template Admin could write a template that executes commands on the
host (or `coder server` container), which potentially escalates their privileges
or shuts down the Coder server. To avoid this, run
[external provisioners](./provisioners.md).

In low-trust environments, we do not recommend giving users direct access to
edit templates. Instead, use
[CI/CD pipelines to update templates](../templates/change-management.md) with
proper security scans and code reviews in place.

## User status

Coder user accounts can have different status types: active, dormant, and
suspended.

### Active user

An _active_ user account in Coder is the default and desired state for all
users. When a user's account is marked as _active_, they have complete access to
the Coder platform and can utilize all of its features and functionalities
without any limitations. Active users can access workspaces, templates, and
interact with Coder using CLI.

### Dormant user

A user account is set to _dormant_ status when they have not yet logged in, or
have not logged into the Coder platform for the past 90 days. Once the user logs
in to the platform, the account status will switch to _active_.

Dormant accounts do not count towards the total number of licensed seats in a
Coder subscription, allowing organizations to optimize their license usage.

### Suspended user

When a user's account is marked as _suspended_ in Coder, it means that the
account has been temporarily deactivated, and the user is unable to access the
platform.

Only user administrators or owners have the necessary permissions to manage
suspended accounts and decide whether to lift the suspension and allow the user
back into the Coder environment. This level of control ensures that
administrators can enforce security measures and handle any compliance-related
issues promptly.

Similar to dormant users, suspended users do not count towards the total number
of licensed seats.
5 changes: 4 additions & 1 deletion docs/admin/infrastructure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ Guides for setting up and scaling Coder infrastructure.

## Architecture

Coder is a self-hosted platform that runs on your own infrastructure. For large deployments, we recommend running the control plane on Kubernetes. Workspaces can be run as VMs or Kubernetes pods. The control plane (`coderd`) runs in a single region. However, workspace proxies, provisioners, and workspaces can run across regions or even cloud providers.
Coder is a self-hosted platform that runs on your own infrastructure. For large deployments, we recommend running the control plane on Kubernetes. Workspaces can be run as VMs or Kubernetes pods. The control plane (`coderd`) runs in a single region. However, workspace proxies, provisioners, and workspaces can run across regions or even cloud providers for the optimal developer experience.

Learn more about Coder's architecture and concepts: [Concepts](./architecture.md)

### Kubernetes

- [Kubernetes Best Practices](#)
- [Multi-region architecture](#)
- Reference Architectures
-
Expand Down
Loading