chore: revert docs for git-auth until release (#10044)

This commit is contained in:
Kyle Carberry
2023-10-04 14:33:28 +00:00
committed by GitHub
parent 5e0cb372b4
commit b468415a81
2 changed files with 44 additions and 48 deletions
@@ -1,45 +1,41 @@
# External Authentication # Git Providers
Coder integrates with Git and OpenID Connect to automate away the need for Coder integrates with git providers to automate away the need for developers to
developers to authenticate with external services within their workspace. authenticate with repositories within their workspace.
## Git Providers ## How it works
When developers use `git` inside their workspace, they are prompted to When developers use `git` inside their workspace, they are prompted to
authenticate. After that, Coder will store and refresh tokens for future authenticate. After that, Coder will store and refresh tokens for future
operations. operations.
<video autoplay playsinline loop> <video autoplay playsinline loop>
<source src="https://github.com/coder/coder/blob/main/site/static/external-auth.mp4?raw=true" type="video/mp4"> <source src="https://github.com/coder/coder/blob/main/site/static/gitauth.mp4?raw=true" type="video/mp4">
Your browser does not support the video tag. Your browser does not support the video tag.
</video> </video>
## Configuration ## Configuration
To add an external authentication provider, you'll need to create an OAuth To add a git provider, you'll need to create an OAuth application. The following
application. The following providers are supported: providers are supported:
- [GitHub](#github) - [GitHub](#github-app)
- [GitLab](https://docs.gitlab.com/ee/integration/oauth_provider.html) - [GitLab](https://docs.gitlab.com/ee/integration/oauth_provider.html)
- [BitBucket](https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/) - [BitBucket](https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/)
- [Azure DevOps](https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth?view=azure-devops) - [Azure DevOps](https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth?view=azure-devops)
Example callback URL: Example callback URL:
`https://coder.example.com/external-auth/primary-github/callback`. Use an `https://coder.example.com/gitauth/primary-github/callback`. Use an arbitrary ID
arbitrary ID for your provider (e.g. `primary-github`). for your provider (e.g. `primary-github`).
Set the following environment variables to Set the following environment variables to
[configure the Coder server](./configure.md): [configure the Coder server](./configure.md):
```env ```env
CODER_EXTERNAL_AUTH_0_ID="primary-github" CODER_GITAUTH_0_ID="primary-github"
CODER_EXTERNAL_AUTH_0_TYPE=github|gitlab|azure-devops|bitbucket|<name of service e.g. jfrog> CODER_GITAUTH_0_TYPE=github|gitlab|azure-devops|bitbucket
CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx CODER_GITAUTH_0_CLIENT_ID=xxxxxx
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxxxxxx CODER_GITAUTH_0_CLIENT_SECRET=xxxxxxx
# Optionally, configure a custom display name and icon
CODER_EXTERNAL_AUTH_0_DISPLAY_NAME="Google Calendar"
CODER_EXTERNAL_AUTH_0_DISPLAY_ICON="https://mycustomicon.com/google.svg"
``` ```
### GitHub ### GitHub
@@ -73,9 +69,9 @@ CODER_EXTERNAL_AUTH_0_DISPLAY_ICON="https://mycustomicon.com/google.svg"
GitHub Enterprise requires the following authentication and token URLs: GitHub Enterprise requires the following authentication and token URLs:
```env ```env
CODER_EXTERNAL_AUTH_0_VALIDATE_URL="https://github.example.com/login/oauth/access_token/info" CODER_GITAUTH_0_VALIDATE_URL="https://github.example.com/login/oauth/access_token/info"
CODER_EXTERNAL_AUTH_0_AUTH_URL="https://github.example.com/login/oauth/authorize" CODER_GITAUTH_0_AUTH_URL="https://github.example.com/login/oauth/authorize"
CODER_EXTERNAL_AUTH_0_TOKEN_URL="https://github.example.com/login/oauth/access_token" CODER_GITAUTH_0_TOKEN_URL="https://github.example.com/login/oauth/access_token"
``` ```
### Azure DevOps ### Azure DevOps
@@ -83,13 +79,13 @@ CODER_EXTERNAL_AUTH_0_TOKEN_URL="https://github.example.com/login/oauth/access_t
Azure DevOps requires the following environment variables: Azure DevOps requires the following environment variables:
```env ```env
CODER_EXTERNAL_AUTH_0_ID="primary-azure-devops" CODER_GITAUTH_0_ID="primary-azure-devops"
CODER_EXTERNAL_AUTH_0_TYPE=azure-devops CODER_GITAUTH_0_TYPE=azure-devops
CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx CODER_GITAUTH_0_CLIENT_ID=xxxxxx
# Ensure this value is your "Client Secret", not "App Secret" # Ensure this value is your "Client Secret", not "App Secret"
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxxxxxx CODER_GITAUTH_0_CLIENT_SECRET=xxxxxxx
CODER_EXTERNAL_AUTH_0_AUTH_URL="https://app.vssps.visualstudio.com/oauth2/authorize" CODER_GITAUTH_0_AUTH_URL="https://app.vssps.visualstudio.com/oauth2/authorize"
CODER_EXTERNAL_AUTH_0_TOKEN_URL="https://app.vssps.visualstudio.com/oauth2/token" CODER_GITAUTH_0_TOKEN_URL="https://app.vssps.visualstudio.com/oauth2/token"
``` ```
### Self-managed git providers ### Self-managed git providers
@@ -98,9 +94,9 @@ Custom authentication and token URLs should be used for self-managed Git
provider deployments. provider deployments.
```env ```env
CODER_EXTERNAL_AUTH_0_AUTH_URL="https://github.example.com/oauth/authorize" CODER_GITAUTH_0_AUTH_URL="https://github.example.com/oauth/authorize"
CODER_EXTERNAL_AUTH_0_TOKEN_URL="https://github.example.com/oauth/token" CODER_GITAUTH_0_TOKEN_URL="https://github.example.com/oauth/token"
CODER_EXTERNAL_AUTH_0_VALIDATE_URL="https://your-domain.com/oauth/token/info" CODER_GITAUTH_0_VALIDATE_URL="https://your-domain.com/oauth/token/info"
``` ```
### Custom scopes ### Custom scopes
@@ -108,10 +104,10 @@ CODER_EXTERNAL_AUTH_0_VALIDATE_URL="https://your-domain.com/oauth/token/info"
Optionally, you can request custom scopes: Optionally, you can request custom scopes:
```env ```env
CODER_EXTERNAL_AUTH_0_SCOPES="repo:read repo:write write:gpg_key" CODER_GITAUTH_0_SCOPES="repo:read repo:write write:gpg_key"
``` ```
### Multiple External Providers (enterprise) ### Multiple git providers (enterprise)
Multiple providers are an Enterprise feature. [Learn more](../enterprise.md). Multiple providers are an Enterprise feature. [Learn more](../enterprise.md).
@@ -120,21 +116,21 @@ limit auth scope. Here's a sample config:
```env ```env
# Provider 1) github.com # Provider 1) github.com
CODER_EXTERNAL_AUTH_0_ID=primary-github CODER_GITAUTH_0_ID=primary-github
CODER_EXTERNAL_AUTH_0_TYPE=github CODER_GITAUTH_0_TYPE=github
CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx CODER_GITAUTH_0_CLIENT_ID=xxxxxx
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxxxxxx CODER_GITAUTH_0_CLIENT_SECRET=xxxxxxx
CODER_EXTERNAL_AUTH_0_REGEX=github.com/orgname CODER_GITAUTH_0_REGEX=github.com/orgname
# Provider 2) github.example.com # Provider 2) github.example.com
CODER_EXTERNAL_AUTH_1_ID=secondary-github CODER_GITAUTH_1_ID=secondary-github
CODER_EXTERNAL_AUTH_1_TYPE=github CODER_GITAUTH_1_TYPE=github
CODER_EXTERNAL_AUTH_1_CLIENT_ID=xxxxxx CODER_GITAUTH_1_CLIENT_ID=xxxxxx
CODER_EXTERNAL_AUTH_1_CLIENT_SECRET=xxxxxxx CODER_GITAUTH_1_CLIENT_SECRET=xxxxxxx
CODER_EXTERNAL_AUTH_1_REGEX=github.example.com CODER_GITAUTH_1_REGEX=github.example.com
CODER_EXTERNAL_AUTH_1_AUTH_URL="https://github.example.com/login/oauth/authorize" CODER_GITAUTH_1_AUTH_URL="https://github.example.com/login/oauth/authorize"
CODER_EXTERNAL_AUTH_1_TOKEN_URL="https://github.example.com/login/oauth/access_token" CODER_GITAUTH_1_TOKEN_URL="https://github.example.com/login/oauth/access_token"
CODER_EXTERNAL_AUTH_1_VALIDATE_URL="https://github.example.com/login/oauth/access_token/info" CODER_GITAUTH_1_VALIDATE_URL="https://github.example.com/login/oauth/access_token/info"
``` ```
To support regex matching for paths (e.g. github.com/orgname), you'll need to To support regex matching for paths (e.g. github.com/orgname), you'll need to
+3 -3
View File
@@ -308,9 +308,9 @@
"icon_path": "./images/icons/toggle_on.svg" "icon_path": "./images/icons/toggle_on.svg"
}, },
{ {
"title": "External Auth", "title": "Git Providers",
"description": "Learn how connect Coder with external auth providers", "description": "Learn how connect Coder with external git providers",
"path": "./admin/external-auth.md", "path": "./admin/git-providers.md",
"icon_path": "./images/icons/git.svg" "icon_path": "./images/icons/git.svg"
}, },
{ {