Skip to content

Commit 64692f0

Browse files
authored
chore: update docs for external-auth (#10046)
1 parent defef46 commit 64692f0

File tree

2 files changed

+47
-43
lines changed

2 files changed

+47
-43
lines changed

docs/admin/git-providers.md renamed to docs/admin/external-auth.md

+44-40
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Git Providers
1+
# External Authentication
22

3-
Coder integrates with git providers to automate away the need for developers to
4-
authenticate with repositories within their workspace.
3+
Coder integrates with Git and OpenID Connect to automate away the need for
4+
developers to authenticate with external services within their workspace.
55

6-
## How it works
6+
## Git Providers
77

88
When developers use `git` inside their workspace, they are prompted to
99
authenticate. After that, Coder will store and refresh tokens for future
@@ -16,26 +16,30 @@ Your browser does not support the video tag.
1616

1717
## Configuration
1818

19-
To add a git provider, you'll need to create an OAuth application. The following
20-
providers are supported:
19+
To add an external authentication provider, you'll need to create an OAuth
20+
application. The following providers are supported:
2121

22-
- [GitHub](#github-app)
22+
- [GitHub](#github)
2323
- [GitLab](https://docs.gitlab.com/ee/integration/oauth_provider.html)
2424
- [BitBucket](https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/)
2525
- [Azure DevOps](https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth?view=azure-devops)
2626

2727
Example callback URL:
28-
`https://coder.example.com/gitauth/primary-github/callback`. Use an arbitrary ID
29-
for your provider (e.g. `primary-github`).
28+
`https://coder.example.com/external-auth/primary-github/callback`. Use an
29+
arbitrary ID for your provider (e.g. `primary-github`).
3030

3131
Set the following environment variables to
3232
[configure the Coder server](./configure.md):
3333

3434
```env
35-
CODER_GITAUTH_0_ID="primary-github"
36-
CODER_GITAUTH_0_TYPE=github|gitlab|azure-devops|bitbucket
37-
CODER_GITAUTH_0_CLIENT_ID=xxxxxx
38-
CODER_GITAUTH_0_CLIENT_SECRET=xxxxxxx
35+
CODER_EXTERNAL_AUTH_0_ID="primary-github"
36+
CODER_EXTERNAL_AUTH_0_TYPE=github|gitlab|azure-devops|bitbucket|<name of service e.g. jfrog>
37+
CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx
38+
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxxxxxx
39+
40+
# Optionally, configure a custom display name and icon
41+
CODER_EXTERNAL_AUTH_0_DISPLAY_NAME="Google Calendar"
42+
CODER_EXTERNAL_AUTH_0_DISPLAY_ICON="https://mycustomicon.com/google.svg"
3943
```
4044

4145
### GitHub
@@ -69,23 +73,23 @@ CODER_GITAUTH_0_CLIENT_SECRET=xxxxxxx
6973
GitHub Enterprise requires the following authentication and token URLs:
7074

7175
```env
72-
CODER_GITAUTH_0_VALIDATE_URL="https://github.example.com/login/oauth/access_token/info"
73-
CODER_GITAUTH_0_AUTH_URL="https://github.example.com/login/oauth/authorize"
74-
CODER_GITAUTH_0_TOKEN_URL="https://github.example.com/login/oauth/access_token"
76+
CODER_EXTERNAL_AUTH_0_VALIDATE_URL="https://github.example.com/login/oauth/access_token/info"
77+
CODER_EXTERNAL_AUTH_0_AUTH_URL="https://github.example.com/login/oauth/authorize"
78+
CODER_EXTERNAL_AUTH_0_TOKEN_URL="https://github.example.com/login/oauth/access_token"
7579
```
7680

7781
### Azure DevOps
7882

7983
Azure DevOps requires the following environment variables:
8084

8185
```env
82-
CODER_GITAUTH_0_ID="primary-azure-devops"
83-
CODER_GITAUTH_0_TYPE=azure-devops
84-
CODER_GITAUTH_0_CLIENT_ID=xxxxxx
86+
CODER_EXTERNAL_AUTH_0_ID="primary-azure-devops"
87+
CODER_EXTERNAL_AUTH_0_TYPE=azure-devops
88+
CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx
8589
# Ensure this value is your "Client Secret", not "App Secret"
86-
CODER_GITAUTH_0_CLIENT_SECRET=xxxxxxx
87-
CODER_GITAUTH_0_AUTH_URL="https://app.vssps.visualstudio.com/oauth2/authorize"
88-
CODER_GITAUTH_0_TOKEN_URL="https://app.vssps.visualstudio.com/oauth2/token"
90+
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxxxxxx
91+
CODER_EXTERNAL_AUTH_0_AUTH_URL="https://app.vssps.visualstudio.com/oauth2/authorize"
92+
CODER_EXTERNAL_AUTH_0_TOKEN_URL="https://app.vssps.visualstudio.com/oauth2/token"
8993
```
9094

9195
### Self-managed git providers
@@ -94,20 +98,20 @@ Custom authentication and token URLs should be used for self-managed Git
9498
provider deployments.
9599

96100
```env
97-
CODER_GITAUTH_0_AUTH_URL="https://github.example.com/oauth/authorize"
98-
CODER_GITAUTH_0_TOKEN_URL="https://github.example.com/oauth/token"
99-
CODER_GITAUTH_0_VALIDATE_URL="https://your-domain.com/oauth/token/info"
101+
CODER_EXTERNAL_AUTH_0_AUTH_URL="https://github.example.com/oauth/authorize"
102+
CODER_EXTERNAL_AUTH_0_TOKEN_URL="https://github.example.com/oauth/token"
103+
CODER_EXTERNAL_AUTH_0_VALIDATE_URL="https://your-domain.com/oauth/token/info"
100104
```
101105

102106
### Custom scopes
103107

104108
Optionally, you can request custom scopes:
105109

106110
```env
107-
CODER_GITAUTH_0_SCOPES="repo:read repo:write write:gpg_key"
111+
CODER_EXTERNAL_AUTH_0_SCOPES="repo:read repo:write write:gpg_key"
108112
```
109113

110-
### Multiple git providers (enterprise)
114+
### Multiple External Providers (enterprise)
111115

112116
Multiple providers are an Enterprise feature. [Learn more](../enterprise.md).
113117

@@ -116,21 +120,21 @@ limit auth scope. Here's a sample config:
116120

117121
```env
118122
# Provider 1) github.com
119-
CODER_GITAUTH_0_ID=primary-github
120-
CODER_GITAUTH_0_TYPE=github
121-
CODER_GITAUTH_0_CLIENT_ID=xxxxxx
122-
CODER_GITAUTH_0_CLIENT_SECRET=xxxxxxx
123-
CODER_GITAUTH_0_REGEX=github.com/orgname
123+
CODER_EXTERNAL_AUTH_0_ID=primary-github
124+
CODER_EXTERNAL_AUTH_0_TYPE=github
125+
CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx
126+
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxxxxxx
127+
CODER_EXTERNAL_AUTH_0_REGEX=github.com/orgname
124128
125129
# Provider 2) github.example.com
126-
CODER_GITAUTH_1_ID=secondary-github
127-
CODER_GITAUTH_1_TYPE=github
128-
CODER_GITAUTH_1_CLIENT_ID=xxxxxx
129-
CODER_GITAUTH_1_CLIENT_SECRET=xxxxxxx
130-
CODER_GITAUTH_1_REGEX=github.example.com
131-
CODER_GITAUTH_1_AUTH_URL="https://github.example.com/login/oauth/authorize"
132-
CODER_GITAUTH_1_TOKEN_URL="https://github.example.com/login/oauth/access_token"
133-
CODER_GITAUTH_1_VALIDATE_URL="https://github.example.com/login/oauth/access_token/info"
130+
CODER_EXTERNAL_AUTH_1_ID=secondary-github
131+
CODER_EXTERNAL_AUTH_1_TYPE=github
132+
CODER_EXTERNAL_AUTH_1_CLIENT_ID=xxxxxx
133+
CODER_EXTERNAL_AUTH_1_CLIENT_SECRET=xxxxxxx
134+
CODER_EXTERNAL_AUTH_1_REGEX=github.example.com
135+
CODER_EXTERNAL_AUTH_1_AUTH_URL="https://github.example.com/login/oauth/authorize"
136+
CODER_EXTERNAL_AUTH_1_TOKEN_URL="https://github.example.com/login/oauth/access_token"
137+
CODER_EXTERNAL_AUTH_1_VALIDATE_URL="https://github.example.com/login/oauth/access_token/info"
134138
```
135139

136140
To support regex matching for paths (e.g. github.com/orgname), you'll need to

docs/manifest.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,9 @@
308308
"icon_path": "./images/icons/toggle_on.svg"
309309
},
310310
{
311-
"title": "Git Providers",
312-
"description": "Learn how connect Coder with external git providers",
313-
"path": "./admin/git-providers.md",
311+
"title": "External Auth",
312+
"description": "Learn how connect Coder with external auth providers",
313+
"path": "./admin/external-auth.md",
314314
"icon_path": "./images/icons/git.svg"
315315
},
316316
{

0 commit comments

Comments
 (0)