Skip to content

Commit 9dce5d1

Browse files
Merge branch 'main' into konrad/public-api-auth
2 parents 6d0cf26 + 2fa86ff commit 9dce5d1

File tree

7 files changed

+57
-4
lines changed

7 files changed

+57
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Added
1010
- Added documentation for public API authentication in the generated OpenAPI spec and docs. [#101](https://github.com/sourcebot-dev/sourcebot/issues/101)
1111

12+
## [4.16.3] - 2026-03-27
13+
1214
### Added
1315
- Added support for `.gitattributes` `linguist-language` overrides in the file viewer ([#1048](https://github.com/sourcebot-dev/sourcebot/pull/1048))
16+
- Added Basic language syntax highlighting in the file viewer ([#1054](https://github.com/sourcebot-dev/sourcebot/pull/1054))
1417

1518
### Fixed
1619
- Fixed Ask GitHub landing page chat box placement to be centered on the page instead of at the bottom. [#1046](https://github.com/sourcebot-dev/sourcebot/pull/1046)

docs/api-reference/sourcebot-public.openapi.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
"openapi": "3.0.3",
33
"info": {
44
"title": "Sourcebot Public API",
5-
"version": "v4.16.2",
5+
"version": "v4.16.3",
66
"description": "OpenAPI description for the public Sourcebot REST endpoints used for search, repository listing, and file browsing. Authentication is instance-dependent: API keys are the standard integration mechanism, OAuth bearer tokens are EE-only, and some instances may allow anonymous access."
7+
78
},
89
"security": [
910
{

docs/docs/configuration/idp.mdx

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,12 +418,16 @@ A Keycloak connection can be used for [authentication](/docs/configuration/auth)
418418
</Steps>
419419
</Accordion>
420420

421-
### Microsoft Entra ID
421+
### Microsoft Entra ID (Azure AD)
422422

423423
[Auth.js Microsoft Entra ID Provider Docs](https://authjs.dev/getting-started/providers/microsoft-entra-id)
424424

425425
A Microsoft Entra ID connection can be used for [authentication](/docs/configuration/auth).
426426

427+
<Info>
428+
Microsoft renamed Azure Active Directory (Azure AD) to Microsoft Entra ID in 2023. If you have an existing Azure AD setup, these instructions will work for you. The underlying authentication infrastructure is the same.
429+
</Info>
430+
427431
<Accordion title="instructions">
428432
<Steps>
429433
<Step title="Register an OAuth Application">
@@ -570,4 +574,47 @@ A JumpCloud connection can be used for [authentication](/docs/configuration/auth
570574
</Steps>
571575
</Accordion>
572576

577+
### Google Cloud IAP
578+
579+
[Google Cloud IAP Documentation](https://cloud.google.com/iap/docs)
580+
581+
Google Cloud Identity-Aware Proxy (IAP) can be used for [authentication](/docs/configuration/auth). IAP provides a layer of security for applications deployed on Google Cloud, allowing you to control access based on user identity and context.
582+
583+
<Info>
584+
GCP IAP works differently from other identity providers. Instead of redirecting users to an OAuth flow, IAP intercepts requests at the infrastructure level and adds a signed JWT header that Sourcebot validates. This means users are automatically authenticated when accessing Sourcebot through an IAP-protected endpoint.
585+
</Info>
586+
587+
<Accordion title="instructions">
588+
<Steps>
589+
<Step title="Enable IAP for your application">
590+
Your Sourcebot deployment must be behind Google Cloud IAP. Follow [this guide](https://cloud.google.com/iap/docs/enabling-on-premises-howto) by Google to enable IAP for your application.
591+
592+
After enabling IAP, note the **Signed Header JWT Audience**. You can find this in the Google Cloud Console under **Security → Identity-Aware Proxy → (your application) → Edit OAuth Client → Application settings**.
593+
594+
The audience will be in the format: `/projects/<project-number>/global/backendServices/<service-id>` or `/projects/<project-number>/apps/<project-id>`.
595+
</Step>
596+
<Step title="Define environment variables">
597+
Set the IAP audience as an environment variable. This can be named whatever you like (ex. `GCP_IAP_AUDIENCE`).
598+
</Step>
599+
<Step title="Define the identity provider config">
600+
Create a `identityProvider` object in the [config file](/docs/configuration/config-file) with the following fields:
601+
602+
```json wrap icon="code"
603+
{
604+
"$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
605+
"identityProviders": [
606+
{
607+
"provider": "gcp-iap",
608+
"purpose": "sso",
609+
"audience": {
610+
"env": "GCP_IAP_AUDIENCE"
611+
}
612+
}
613+
]
614+
}
615+
```
616+
</Step>
617+
</Steps>
618+
</Accordion>
619+
573620

packages/shared/src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// This file is auto-generated by .github/workflows/release-sourcebot.yml
2-
export const SOURCEBOT_VERSION = "v4.16.2";
2+
export const SOURCEBOT_VERSION = "v4.16.3";

packages/web/src/lib/codemirrorLanguage.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ export const codemirrorLanguageMap = {
169169
"xml": xml(),
170170
"yaml": yaml(),
171171
"zig": zig(),
172+
"basic": StreamLanguage.define(vb),
172173
// Legacy CodeMirror 5 modes
173174
"apl": StreamLanguage.define(apl),
174175
"ceylon": StreamLanguage.define(ceylon),

packages/web/src/lib/languageDetection.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const ambiguousExtensionOverrides: Record<string, string> = {
1616
'.txt': 'Text', // Not Adblock Filter List, Vim Help File
1717
'.yaml': 'YAML', // Not MiniYAML, OASv2-yaml, OASv3-yaml
1818
'.yml': 'YAML',
19+
'.bas': 'BASIC'
1920
};
2021

2122
const extensionToLanguage = new Map<string, string>();

packages/web/src/lib/languageMetadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export const languageMetadataMap: LanguageMetadataMap = {
190190
},
191191
"BASIC": {
192192
"iconify": "devicon:visualbasic",
193-
"codemirrorLanguage": null,
193+
"codemirrorLanguage": 'basic',
194194
},
195195
"BQN": {
196196
"iconify": null,

0 commit comments

Comments
 (0)