From 4e5db9a9dca1cb127dad831a97b8aaa0b9fa85bb Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 23 Mar 2023 14:29:50 +0000 Subject: [PATCH 1/2] docs: add GHE token & auth URLs --- docs/admin/git-providers.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/admin/git-providers.md b/docs/admin/git-providers.md index 320baa5bf9501..1006f45102dd5 100644 --- a/docs/admin/git-providers.md +++ b/docs/admin/git-providers.md @@ -31,6 +31,16 @@ CODER_GITAUTH_0_CLIENT_ID=xxxxxx CODER_GITAUTH_0_CLIENT_SECRET=xxxxxxx ``` +### GitHub Enterprise + +GitHub Enterprise requires the following authentication and token URLs: + +```console +CODER_GITAUTH_0_VALIDATE_URL="http://github.example.com/login/oauth/access_token/info" +CODER_GITAUTH_0_AUTH_URL="http://github.example.com/login/oauth/authorize" +CODER_GITAUTH_0_TOKEN_URL="http://github.example.com/login/oauth/access_token" +``` + ### Self-managed git providers Custom authentication and token URLs should be @@ -70,8 +80,9 @@ CODER_GITAUTH_1_TYPE=github CODER_GITAUTH_1_CLIENT_ID=xxxxxx CODER_GITAUTH_1_CLIENT_SECRET=xxxxxxx CODER_GITAUTH_1_REGEX=github.example.com -CODER_GITAUTH_1_AUTH_URL="https://github.example.com/oauth/authorize" -CODER_GITAUTH_1_TOKEN_URL="https://github.example.com/oauth/token" +CODER_GITAUTH_1_AUTH_URL="https://github.example.com/login/oauth/authorize" +CODER_GITAUTH_1_TOKEN_URL="https://github.example.com/login/oauth/access_token" +CODER_GITAUTH_0_VALIDATE_URL="http://github.example.com/login/oauth/access_token/info" ``` To support regex matching for paths (e.g. github.com/orgname), 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): From 2785bb9e60930469fcf907c3c47ad6ce543df52d Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 23 Mar 2023 14:34:33 +0000 Subject: [PATCH 2/2] cleanup --- docs/admin/git-providers.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/admin/git-providers.md b/docs/admin/git-providers.md index 1006f45102dd5..122448054cabc 100644 --- a/docs/admin/git-providers.md +++ b/docs/admin/git-providers.md @@ -36,9 +36,9 @@ CODER_GITAUTH_0_CLIENT_SECRET=xxxxxxx GitHub Enterprise requires the following authentication and token URLs: ```console -CODER_GITAUTH_0_VALIDATE_URL="http://github.example.com/login/oauth/access_token/info" -CODER_GITAUTH_0_AUTH_URL="http://github.example.com/login/oauth/authorize" -CODER_GITAUTH_0_TOKEN_URL="http://github.example.com/login/oauth/access_token" +CODER_GITAUTH_0_VALIDATE_URL="https://github.example.com/login/oauth/access_token/info" +CODER_GITAUTH_0_AUTH_URL="https://github.example.com/login/oauth/authorize" +CODER_GITAUTH_0_TOKEN_URL="https://github.example.com/login/oauth/access_token" ``` ### Self-managed git providers @@ -82,7 +82,7 @@ CODER_GITAUTH_1_CLIENT_SECRET=xxxxxxx CODER_GITAUTH_1_REGEX=github.example.com CODER_GITAUTH_1_AUTH_URL="https://github.example.com/login/oauth/authorize" CODER_GITAUTH_1_TOKEN_URL="https://github.example.com/login/oauth/access_token" -CODER_GITAUTH_0_VALIDATE_URL="http://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 add this to the [Coder agent startup script](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent#startup_script):