Skip to content

Commit 449c76f

Browse files
authored
feat(ee): Add ability to link external accounts (#595)
1 parent 26ec7af commit 449c76f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+7463
-343
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## Added
1111
- [Experimental][Sourcebot EE] Added GitLab permission syncing. [#585](https://github.com/sourcebot-dev/sourcebot/pull/585)
12+
- [Sourcebot EE] Added external identity provider config and support for multiple accounts. [#595](https://github.com/sourcebot-dev/sourcebot/pull/595)
1213

1314
### Fixed
1415
- [ask sb] Fixed issue where reasoning tokens would appear in `text` content for openai compatible models. [#582](https://github.com/sourcebot-dev/sourcebot/pull/582)

docs/docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
]
8080
},
8181
"docs/configuration/language-model-providers",
82+
"docs/configuration/idp",
8283
{
8384
"group": "Authentication",
8485
"pages": [

docs/docs/configuration/auth/providers.mdx

Lines changed: 2 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -26,95 +26,5 @@ See [transactional emails](/docs/configuration/transactional-emails) for more de
2626

2727
# Enterprise Authentication Providers
2828

29-
The following authentication providers require an [enterprise license](/docs/license-key) to be enabled.
30-
31-
### GitHub
32-
---
33-
34-
[Auth.js GitHub Provider Docs](https://authjs.dev/getting-started/providers/github)
35-
36-
Authentication using both a **GitHub OAuth App** and a **GitHub App** is supported. In both cases, you must provide Sourcebot the `CLIENT_ID` and `SECRET_ID` and configure the
37-
callback URL correctly (more info in Auth.js docs).
38-
39-
When using a **GitHub App** for auth, enable the following permissions:
40-
- `“Email addresses” account permissions (read)`
41-
- `"Metadata" repository permissions (read)` (only needed if enabling [permission syncing](/docs/features/permission-syncing))
42-
43-
**Required environment variables:**
44-
- `AUTH_EE_GITHUB_CLIENT_ID`
45-
- `AUTH_EE_GITHUB_CLIENT_SECRET`
46-
47-
Optional environment variables:
48-
- `AUTH_EE_GITHUB_BASE_URL` - Base URL for GitHub Enterprise (defaults to https://github.com)
49-
50-
### GitLab
51-
---
52-
53-
[Auth.js GitLab Provider Docs](https://authjs.dev/getting-started/providers/gitlab)
54-
55-
Authentication using GitLab is supported via a [OAuth2.0 app](https://docs.gitlab.com/integration/oauth_provider/#create-an-instance-wide-application) installed on the GitLab instance. Follow the instructions in the [GitLab docs](https://docs.gitlab.com/integration/oauth_provider/) to create an app. The callback URL should be configurd to `<sourcebot_deployment_url>/api/auth/callback/gitlab`, and the following scopes need to be set:
56-
57-
| Scope | Required | Notes |
58-
|------------|----------|----------------------------------------------------------------------------------------------------|
59-
| read_user | Yes | Allows Sourcebot to read basic user information required for authentication. |
60-
| read_api | Conditional | Required **only** when [permission syncing](/docs/features/permission-syncing) is enabled. Enables Sourcebot to list all repositories and projects for the authenticated user. |
61-
62-
63-
**Required environment variables:**
64-
- `AUTH_EE_GITLAB_CLIENT_ID`
65-
- `AUTH_EE_GITLAB_CLIENT_SECRET`
66-
67-
Optional environment variables:
68-
- `AUTH_EE_GITLAB_BASE_URL` - Base URL for GitLab instance (defaults to https://gitlab.com)
69-
70-
### Google
71-
---
72-
73-
[Auth.js Google Provider Docs](https://authjs.dev/getting-started/providers/google)
74-
75-
**Required environment variables:**
76-
- `AUTH_EE_GOOGLE_CLIENT_ID`
77-
- `AUTH_EE_GOOGLE_CLIENT_SECRET`
78-
79-
### GCP IAP
80-
---
81-
82-
<Note>If you're running Sourcebot in an environment that blocks egress, make sure you allow the [IAP IP ranges](https://www.gstatic.com/ipranges/goog.json)</Note>
83-
84-
Custom provider built to enable automatic Sourcebot account registration/login when using GCP IAP.
85-
86-
**Required environment variables**
87-
- `AUTH_EE_GCP_IAP_ENABLED`
88-
- `AUTH_EE_GCP_IAP_AUDIENCE`
89-
- This can be found by selecting the ⋮ icon next to the IAP-enabled backend service and pressing `Get JWT audience code`
90-
91-
### Okta
92-
---
93-
94-
[Auth.js Okta Provider Docs](https://authjs.dev/getting-started/providers/okta)
95-
96-
**Required environment variables:**
97-
- `AUTH_EE_OKTA_CLIENT_ID`
98-
- `AUTH_EE_OKTA_CLIENT_SECRET`
99-
- `AUTH_EE_OKTA_ISSUER`
100-
101-
### Keycloak
102-
---
103-
104-
[Auth.js Keycloak Provider Docs](https://authjs.dev/getting-started/providers/keycloak)
105-
106-
**Required environment variables:**
107-
- `AUTH_EE_KEYCLOAK_CLIENT_ID`
108-
- `AUTH_EE_KEYCLOAK_CLIENT_SECRET`
109-
- `AUTH_EE_KEYCLOAK_ISSUER`
110-
111-
### Microsoft Entra ID
112-
113-
[Auth.js Microsoft Entra ID Provider Docs](https://authjs.dev/getting-started/providers/microsoft-entra-id)
114-
115-
**Required environment variables:**
116-
- `AUTH_EE_MICROSOFT_ENTRA_ID_CLIENT_ID`
117-
- `AUTH_EE_MICROSOFT_ENTRA_ID_CLIENT_SECRET`
118-
- `AUTH_EE_MICROSOFT_ENTRA_ID_ISSUER`
119-
120-
---
29+
Sourcebot supports authentication using several different [external identity providers](/docs/configuration/idp) as well. These identity providers require an
30+
[enterprise license](/docs/license-key)

0 commit comments

Comments
 (0)