You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Sourcebot EE] Added external identity provider config and support for multiple accounts. [#595](https://github.com/sourcebot-dev/sourcebot/pull/595)
13
+
- Added ability to configure environment variables from the config. [#597](https://github.com/sourcebot-dev/sourcebot/pull/597)
13
14
14
15
### Fixed
15
16
-[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)
When self-hosting Sourcebot, you **must** provide it a config file. This is done by defining a config file in a volume that's mounted to Sourcebot, and providing the path to this
7
10
file in the `CONFIG_PATH` environment variable. For example:
8
11
@@ -49,3 +52,103 @@ The following are settings that can be provided in your config file to modify So
49
52
|`enablePublicAccess`**(deprecated)**| boolean | false | — | Use the `FORCE_ENABLE_ANONYMOUS_ACCESS` environment variable instead. |
50
53
|`experiment_repoDrivenPermissionSyncIntervalMs`| number | 24 hours | 1 | Interval at which the repo permission syncer should run. |
51
54
|`experiment_userDrivenPermissionSyncIntervalMs`| number | 24 hours | 1 | Interval at which the user permission syncer should run. |
55
+
56
+
# Tokens
57
+
58
+
Tokens are used to securely pass secrets to Sourcebot in a config file. They are used in various places, including connections, language model providers, auth providers, etc. Tokens can be passed as either environment variables or Google Cloud secrets:
# Overriding environment variables from the config
82
+
83
+
You can override / set environment variables from the config file by using the `environmentOverrides` property. Overrides can be of type `string`, `number`, `boolean`, or a [token](/docs/configuration/config-file#tokens). Tokens are useful when you want to configure a environment variable using a Google Cloud Secret or other supported secret management service.
Copy file name to clipboardExpand all lines: docs/docs/configuration/environment-variables.mdx
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
---
2
2
title: Environment variables
3
3
sidebarTitle: Environment variables
4
-
mode: "wide"
5
4
---
6
5
7
6
<Note>This page provides a detailed reference of all environment variables supported by Sourcebot. If you're just looking to get up and running, we recommend starting with the [deployment guide](/docs/deployment-guide) instead.</Note>
@@ -71,3 +70,6 @@ The following environment variables allow you to configure your Sourcebot deploy
71
70
|`REVIEW_AGENT_LOGGING_ENABLED`|`true`| <p>Enables/disables logging for the review agent. Logs are saved in `DATA_CACHE_DIR/review-agent`</p> |
72
71
|`REVIEW_AGENT_REVIEW_COMMAND`|`review`| <p>The command used to trigger a code review by the review agent.</p> |
73
72
73
+
### Overriding environment variables from the config
74
+
75
+
You can override environment variables from the config file by using the `environmentOverrides` property. See [this doc](/docs/configuration/config-file#overriding-environment-variables-from-the-config) for more info.
Copy file name to clipboardExpand all lines: docs/docs/configuration/idp.mdx
+2-5Lines changed: 2 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,11 +20,6 @@ External identity providers can be used for [authentication](/docs/configuration
20
20
"provider": "github",
21
21
"purpose": "account_linking",
22
22
"accountLinkingRequired": true,
23
-
/*
24
-
Secrets are provided through environment variables. Set the secret into
25
-
an env var and provide the name here to tell Sourcebot where to get
26
-
the value
27
-
*/
28
23
"clientId": {
29
24
"env": "GITHUB_IDENTITY_PROVIDER_CLIENT_ID"
30
25
},
@@ -45,6 +40,8 @@ the value
45
40
}
46
41
```
47
42
43
+
Secret values (such as `clientId` and `clientSecret`) can be provided as environment variables or Google Cloud secrets via [tokens](/docs/configuration/config-file#tokens).
44
+
48
45
# Supported External Identity Providers
49
46
50
47
Sourcebot uses [Auth.js](https://authjs.dev/) to connect to external identity providers. If there's a provider supported by Auth.js that you don't see below, please submit a
Copy file name to clipboardExpand all lines: docs/docs/connections/ado-cloud.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ If you're not familiar with Sourcebot [connections](/docs/connections/overview),
86
86
Azure Devops Cloud requires you to provide a PAT in order to index your repositories. To learn how to create PAT, check out the [Azure Devops docs](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows).
87
87
Sourcebot needs the `Read` access for the `Code` scope in order to find and clone your repos.
88
88
89
-
Next, provide the access token via an environment variable which is referenced in the `token` property:
89
+
Next, provide the access [token](/docs/configuration/config-file#tokens) via an environment variable which is referenced in the `token` property:
Copy file name to clipboardExpand all lines: docs/docs/connections/ado-server.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,7 +100,7 @@ If you're not familiar with Sourcebot [connections](/docs/connections/overview),
100
100
Azure Devops Server requires you to provide a PAT in order to index your repositories. To learn how to create PAT, check out the [Azure Devops docs](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows).
101
101
Sourcebot needs the `Read` access for the `Code` scope in order to find and clone your repos.
102
102
103
-
Next, provide the access token via an environment variable which is referenced in the `token` property:
103
+
Next, provide the access [token](/docs/configuration/config-file#tokens) via an environment variable which is referenced in the `token` property:
Copy file name to clipboardExpand all lines: docs/docs/connections/bitbucket-cloud.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ If you're not familiar with Sourcebot [connections](/docs/connections/overview),
78
78
79
79
## Authenticating with Bitbucket Cloud
80
80
81
-
In order to index private repositories, you'll need to provide authentication credentials. You can do this using an `App Password` or an `Access Token`
81
+
In order to index private repositories, you'll need to provide authentication credentials via a [token](/docs/configuration/config-file#tokens). You can do this using an `App Password` or an `Access Token`
0 commit comments