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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
10
10
### Added
11
11
- Added PostHog events for chat UI interactions (details card expand/collapse, copy answer, table of contents toggle) and repo tracking in `wa_chat_message_sent`. [#922](https://github.com/sourcebot-dev/sourcebot/pull/922)
12
+
- Added Bitbucket Cloud OAuth identity provider support (`provider: "bitbucket-cloud"`) for SSO and account-linked permission syncing. [#924](https://github.com/sourcebot-dev/sourcebot/pull/924)
13
+
- Added permission syncing support for Bitbucket Cloud. [#925](https://github.com/sourcebot-dev/sourcebot/pull/925)
14
+
15
+
### Changed
16
+
- Hide version upgrade toast for askgithub deployment (`EXPERIMENT_ASK_GH_ENABLED`). [#931](https://github.com/sourcebot-dev/sourcebot/pull/931)
17
+
18
+
### Fixed
19
+
- Fixed text inside angle brackets (e.g., `<id>`) being hidden in chat prompt display due to HTML parsing. [#929](https://github.com/sourcebot-dev/sourcebot/pull/929)[#932](https://github.com/sourcebot-dev/sourcebot/pull/932)
A Bitbucket Cloud connection can be used for [authentication](/docs/configuration/auth) and/or [permission syncing](/docs/features/permission-syncing). This is controlled using the `purpose` field
173
+
in the Bitbucket Cloud identity provider config.
174
+
175
+
<Accordiontitle="instructions">
176
+
<Steps>
177
+
<Steptitle="Register an OAuth Consumer">
178
+
To begin, you must register an OAuth consumer in Bitbucket to facilitate the identity provider connection.
179
+
180
+
Navigate to your Bitbucket workspace settings at `https://bitbucket.org/<your-workspace>/workspace/settings/api` and create a new **OAuth consumer** under the **OAuth consumers** section.
181
+
182
+
When configuring your consumer:
183
+
- Set the callback URL to `<sourcebot_url>/api/auth/callback/bitbucket-cloud` (ex. https://sourcebot.coolcorp.com/api/auth/callback/bitbucket-cloud)
184
+
- Enable **Account: Read**
185
+
- If using for permission syncing, also enable **Repositories: Read**
186
+
187
+
The result of creating an OAuth consumer is a `Key` (`CLIENT_ID`) and `Secret` (`CLIENT_SECRET`) which you'll provide to Sourcebot.
188
+
</Step>
189
+
<Steptitle="Define environment variables">
190
+
To provide Sourcebot the client id and secret for your OAuth consumer you must set them as environment variables. These can be named whatever you like
191
+
(ex. `BITBUCKET_CLOUD_IDENTITY_PROVIDER_CLIENT_ID` and `BITBUCKET_CLOUD_IDENTITY_PROVIDER_CLIENT_SECRET`)
192
+
</Step>
193
+
<Steptitle="Define the identity provider config">
194
+
Finally, pass the client id and secret to Sourcebot by defining a `identityProvider` object in the [config file](/docs/configuration/config-file):
@@ -78,6 +78,28 @@ Permission syncing works with **GitLab Self-managed** and **GitLab Cloud**. User
78
78
- OAuth tokens require the `read_api` scope in order to use the [List projects for the authenticated user API](https://docs.gitlab.com/ee/api/projects.html#list-all-projects) during [User driven syncing](/docs/features/permission-syncing#how-it-works).
79
79
-[Internal GitLab projects](https://docs.gitlab.com/user/public_access/#internal-projects-and-groups) are **not** enforced by permission syncing and therefore are visible to all users. Only [private projects](https://docs.gitlab.com/user/public_access/#private-projects-and-groups) are enforced.
80
80
81
+
## Bitbucket Cloud
82
+
83
+
Prerequisites:
84
+
- Configure Bitbucket Cloud as an [external identity provider](/docs/configuration/idp).
85
+
86
+
Permission syncing works with **Bitbucket Cloud**. OAuth tokens must assume the `account` and `repository` scopes.
87
+
88
+
<Warning>
89
+
**Partial coverage for repo-driven syncing.** Bitbucket Cloud's [repository user permissions API](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-permissions-config-users-get) only returns users who have been **directly and explicitly** granted access to a repository. Users who have access via any of the following are **not** captured by repo-driven syncing:
90
+
91
+
- Membership in a [group that is added to the repository](https://support.atlassian.com/bitbucket-cloud/docs/grant-repository-access-to-users-and-groups/)
92
+
- Membership in the [project that contains the repository](https://support.atlassian.com/bitbucket-cloud/docs/configure-project-permissions-for-users-and-groups/)
93
+
- Membership in a group that is part of a project containing the repository
94
+
95
+
These users **will** still gain access via [user-driven syncing](/docs/features/permission-syncing#how-it-works), which fetches all private repositories accessible to each authenticated user. However, there may be a delay between when a repository is added and when affected users gain access in Sourcebot (up to the `experiment_userDrivenPermissionSyncIntervalMs` interval, which defaults to 24 hours).
96
+
97
+
If your workspace relies heavily on group or project-level permissions rather than direct user grants, we recommend reducing the `experiment_userDrivenPermissionSyncIntervalMs` interval to limit the window of delay.
98
+
</Warning>
99
+
100
+
**Notes:**
101
+
- A Bitbucket Cloud [external identity provider](/docs/configuration/idp) must be configured to (1) correlate a Sourcebot user with a Bitbucket Cloud user, and (2) to list repositories that the user has access to for [User driven syncing](/docs/features/permission-syncing#how-it-works).
102
+
- OAuth tokens require the `account` and `repository` scopes. The `repository` scope is required to list private repositories during [User driven syncing](/docs/features/permission-syncing#how-it-works).
Copy file name to clipboardExpand all lines: docs/snippets/schemas/v3/identityProvider.schema.mdx
+170Lines changed: 170 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -648,6 +648,91 @@
648
648
"audience"
649
649
]
650
650
},
651
+
"BitbucketCloudIdentityProviderConfig": {
652
+
"type": "object",
653
+
"additionalProperties": false,
654
+
"properties": {
655
+
"provider": {
656
+
"const": "bitbucket-cloud"
657
+
},
658
+
"purpose": {
659
+
"enum": [
660
+
"sso",
661
+
"account_linking"
662
+
]
663
+
},
664
+
"clientId": {
665
+
"anyOf": [
666
+
{
667
+
"type": "object",
668
+
"properties": {
669
+
"env": {
670
+
"type": "string",
671
+
"description": "The name of the environment variable that contains the token."
672
+
}
673
+
},
674
+
"required": [
675
+
"env"
676
+
],
677
+
"additionalProperties": false
678
+
},
679
+
{
680
+
"type": "object",
681
+
"properties": {
682
+
"googleCloudSecret": {
683
+
"type": "string",
684
+
"description": "The resource name of a Google Cloud secret. Must be in the format `projects/<project-id>/secrets/<secret-name>/versions/<version-id>`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"
685
+
}
686
+
},
687
+
"required": [
688
+
"googleCloudSecret"
689
+
],
690
+
"additionalProperties": false
691
+
}
692
+
]
693
+
},
694
+
"clientSecret": {
695
+
"anyOf": [
696
+
{
697
+
"type": "object",
698
+
"properties": {
699
+
"env": {
700
+
"type": "string",
701
+
"description": "The name of the environment variable that contains the token."
702
+
}
703
+
},
704
+
"required": [
705
+
"env"
706
+
],
707
+
"additionalProperties": false
708
+
},
709
+
{
710
+
"type": "object",
711
+
"properties": {
712
+
"googleCloudSecret": {
713
+
"type": "string",
714
+
"description": "The resource name of a Google Cloud secret. Must be in the format `projects/<project-id>/secrets/<secret-name>/versions/<version-id>`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"
715
+
}
716
+
},
717
+
"required": [
718
+
"googleCloudSecret"
719
+
],
720
+
"additionalProperties": false
721
+
}
722
+
]
723
+
},
724
+
"accountLinkingRequired": {
725
+
"type": "boolean",
726
+
"default": false
727
+
}
728
+
},
729
+
"required": [
730
+
"provider",
731
+
"purpose",
732
+
"clientId",
733
+
"clientSecret"
734
+
]
735
+
},
651
736
"AuthentikIdentityProviderConfig": {
652
737
"type": "object",
653
738
"additionalProperties": false,
@@ -1511,6 +1596,91 @@
1511
1596
"clientSecret",
1512
1597
"issuer"
1513
1598
]
1599
+
},
1600
+
{
1601
+
"type": "object",
1602
+
"additionalProperties": false,
1603
+
"properties": {
1604
+
"provider": {
1605
+
"const": "bitbucket-cloud"
1606
+
},
1607
+
"purpose": {
1608
+
"enum": [
1609
+
"sso",
1610
+
"account_linking"
1611
+
]
1612
+
},
1613
+
"clientId": {
1614
+
"anyOf": [
1615
+
{
1616
+
"type": "object",
1617
+
"properties": {
1618
+
"env": {
1619
+
"type": "string",
1620
+
"description": "The name of the environment variable that contains the token."
1621
+
}
1622
+
},
1623
+
"required": [
1624
+
"env"
1625
+
],
1626
+
"additionalProperties": false
1627
+
},
1628
+
{
1629
+
"type": "object",
1630
+
"properties": {
1631
+
"googleCloudSecret": {
1632
+
"type": "string",
1633
+
"description": "The resource name of a Google Cloud secret. Must be in the format `projects/<project-id>/secrets/<secret-name>/versions/<version-id>`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"
1634
+
}
1635
+
},
1636
+
"required": [
1637
+
"googleCloudSecret"
1638
+
],
1639
+
"additionalProperties": false
1640
+
}
1641
+
]
1642
+
},
1643
+
"clientSecret": {
1644
+
"anyOf": [
1645
+
{
1646
+
"type": "object",
1647
+
"properties": {
1648
+
"env": {
1649
+
"type": "string",
1650
+
"description": "The name of the environment variable that contains the token."
1651
+
}
1652
+
},
1653
+
"required": [
1654
+
"env"
1655
+
],
1656
+
"additionalProperties": false
1657
+
},
1658
+
{
1659
+
"type": "object",
1660
+
"properties": {
1661
+
"googleCloudSecret": {
1662
+
"type": "string",
1663
+
"description": "The resource name of a Google Cloud secret. Must be in the format `projects/<project-id>/secrets/<secret-name>/versions/<version-id>`. See https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets"
0 commit comments