Skip to content

Commit 10e853a

Browse files
authored
Merge branch 'main' into feature/gerrit-authentication
2 parents fb380a8 + dea1807 commit 10e853a

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

+653
-382
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [4.5.2] - 2025-07-19
11+
1012
### Changed
1113
- Fixed typos in UI, docs, code [#369](https://github.com/sourcebot-dev/sourcebot/pull/369)
14+
- Add anonymous access option to core and deprecate the `enablePublicAccess` config setting. [#385](https://github.com/sourcebot-dev/sourcebot/pull/385)
1215

1316
## [4.5.1] - 2025-07-14
1417

demo-site-config.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@
238238
}
239239
},
240240
"settings": {
241-
"reindexIntervalMs": 86400000, // 24 hours
242-
"enablePublicAccess": true
241+
"reindexIntervalMs": 86400000 // 24 hours
243242
}
244243
}

docs/docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"pages": [
7474
"docs/configuration/auth/overview",
7575
"docs/configuration/auth/providers",
76-
"docs/configuration/auth/inviting-members",
76+
"docs/configuration/auth/access-settings",
7777
"docs/configuration/auth/roles-and-permissions",
7878
"docs/configuration/auth/faq"
7979
]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: Access Settings
3+
sidebarTitle: Access settings
4+
---
5+
6+
There are various settings to control how users access your Sourcebot deployment.
7+
8+
# Anonymous access
9+
10+
<Note>Anonymous access cannot be enabled if you have an enterprise license. If you have any questions about this restriction [reach out to us](https://www.sourcebot.dev/contact).</Note>
11+
12+
By default, your Sourcebot deployment is gated with a login page. If you'd like users to access the deployment anonymously, you can enable anonymous access.
13+
14+
This can be enabled by navigating to **Settings -> Access** or by setting the `FORCE_ENABLE_ANONYMOUS_ACCESS` environment variable.
15+
16+
When accessing Sourcebot anonymously, a user's permissions are limited to that of the [Guest](/docs/configuration/auth/roles-and-permissions) role.
17+
18+
# Member Approval
19+
20+
By default, Sourcebot requires new members to be approved by the owner of the deployment. This section explains how approvals work and how
21+
to configure this behavior.
22+
23+
### Configuration
24+
Member approval can be configured by the owner of the deployment by navigating to **Settings -> Members**:
25+
26+
![Member Approval Toggle](/images/member_approval_toggle.png)
27+
28+
### Managing Requests
29+
30+
If member approval is enabled, new members will be asked to submit a join request after signing up. They will not have access to the Sourcebot deployment
31+
until this request is approved by the owner.
32+
33+
The owner can see and manage all pending join requests by navigating to **Settings -> Members**.
34+
35+
## Invite link
36+
37+
If member approval is required, an owner of the deployment can enable an invite link. When enabled, users
38+
can use this invite link to register and be automatically added to the organization without approval:
39+
40+
![Invite Link Toggle](/images/invite_link_toggle.png)

docs/docs/configuration/auth/inviting-members.mdx

Lines changed: 0 additions & 30 deletions
This file was deleted.

docs/docs/configuration/auth/roles-and-permissions.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ Each member has a role which defines their permissions within an organization:
1010
| Role | Permission |
1111
| :--- | :--------- |
1212
| `Owner` | Each organization has a single `Owner`. This user has full access rights, including: connection management, organization management, and inviting new members. |
13-
| `Member` | Read-only access to the organization. A `Member` can search across the repos indexed by an organization's connections, but may not manage the organization or its connections. |
13+
| `Member` | Read-only access to the organization. A `Member` can search across the repos indexed by an organization's connections, as well as view the organizations configuration and member list. However, they cannot modify this configuration or invite new members. |
14+
| `Guest` | When accessing Sourcebot [anonymously](/docs/configuration/auth/access-settings#anonymous-access), a user has the `Guest` role. `Guest`'s can search across repos indexed by an organization's connections, but cannot view any information regarding the organizations configuration or members. |

docs/docs/configuration/environment-variables.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ The following environment variables allow you to configure your Sourcebot deploy
2121
| `DATABASE_DATA_DIR` | `$DATA_CACHE_DIR/db` | <p>The data directory for the default Postgres database.</p> |
2222
| `DATABASE_URL` | `postgresql://postgres@ localhost:5432/sourcebot` | <p>Connection string of your Postgres database. By default, a Postgres database is automatically provisioned at startup within the container.</p><p>If you'd like to use a non-default schema, you can provide it as a parameter in the database url </p> |
2323
| `EMAIL_FROM_ADDRESS` | `-` | <p>The email address that transactional emails will be sent from. See [this doc](/docs/configuration/transactional-emails) for more info.</p> |
24+
| `FORCE_ENABLE_ANONYMOUS_ACCESS` | `false` | <p>When enabled, [anonymous access](/docs/configuration/auth/access-settings#anonymous-access) to the organization will always be enabled</p>
2425
| `REDIS_DATA_DIR` | `$DATA_CACHE_DIR/redis` | <p>The data directory for the default Redis instance.</p> |
2526
| `REDIS_URL` | `redis://localhost:6379` | <p>Connection string of your Redis instance. By default, a Redis database is automatically provisioned at startup within the container.</p> |
2627
| `REDIS_REMOVE_ON_COMPLETE` | `0` | <p>Controls how many completed jobs are allowed to remain in Redis queues</p> |

docs/docs/connections/github.mdx

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,29 @@ Sourcebot can sync code from GitHub.com, GitHub Enterprise Server, and GitHub En
104104

105105
## Authenticating with GitHub
106106

107-
In order to index private repositories, you'll need to generate a GitHub Personal Access Token (PAT). Create a new PAT [here](https://github.com/settings/tokens/new) and make sure you select the `repo` scope:
107+
In order to index private repositories, you'll need to generate a access token and provide it to Sourcebot. GitHub provides [two types](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#types-of-personal-access-tokens) of access tokens:
108108

109-
![GitHub PAT Scope](/images/github_pat_scopes.png)
110109

111-
Next, provide the PAT via the `token` property, either as an environment variable or a secret:
110+
<AccordionGroup>
111+
<Accordion title="Fine-grained personal access tokens" defaultOpen>
112+
Create a new fine-grained PAT [here](https://github.com/settings/personal-access-tokens/new). First, select the resource owner and the repositories that you want Sourcebot to have access to.
113+
114+
Next, under "Repository permissions", select permissions `Contents` and `Metadata` with access `Read-only`. The permissions should look like the following:
115+
116+
![GitHub PAT Scope](/images/github_pat_scopes_fine_grained.png)
117+
118+
[GitHub docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#fine-grained-personal-access-tokens)
119+
</Accordion>
120+
<Accordion title="Personal access tokens (classic)">
121+
Create a new PAT [here](https://github.com/settings/tokens/new) and make sure you select the `repo` scope:
122+
123+
![GitHub PAT Scope](/images/github_pat_scopes.png)
124+
125+
[GitHub docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#personal-access-tokens-classic)
126+
</Accordion>
127+
</AccordionGroup>
128+
129+
Next, provide the access token via the `token` property, either as an environment variable or a secret:
112130

113131
<Tabs>
114132
<Tab title="Environment Variable">

docs/docs/deployment-guide.mdx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,6 @@ import SupportedPlatforms from '/snippets/platform-support.mdx'
77
The following guide will walk you through the steps to deploy Sourcebot on your own infrastructure. Sourcebot is distributed as a [single docker container](/docs/overview#architecture) that can be deployed to a k8s cluster, a VM, or any platform that supports docker.
88

99

10-
## Walkthrough video
11-
---
12-
13-
Watch this quick walkthrough video to learn how to deploy Sourcebot using Docker.
14-
15-
<iframe
16-
src="https://youtube.com/embed/TPQh0z7Qcjg"
17-
title="YouTube video player"
18-
frameborder="0"
19-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
20-
allowfullscreen
21-
className="aspect-video w-full"
22-
></iframe>
23-
24-
## Step-by-step guide
25-
---
26-
2710
<Note>Hit an issue? Please let us know on [GitHub discussions](https://github.com/sourcebot-dev/sourcebot/discussions/categories/support) or by [emailing us](mailto:[email protected]).</Note>
2811

2912
<Steps>
22.9 KB
Loading

0 commit comments

Comments
 (0)