Skip to content

Commit 8fb3a3c

Browse files
committed
Merge remote-tracking branch 'origin/staging' into wip/fx29-staging
Brings in #9869 (keyless Snowflake, Microsoft app-only and Google keyless credentials, GitHub and Bitbucket tokens, DocuSign JWT Grant). - Legacy files this branch deleted (credential-selector, integration-block-detail, suggested-actions with its new connect-candidates, special-tags) stay deleted. Their one change, passing the OAuth service to the connect dialog so Google keyless is offered only for a Google Cloud service, is ported to the kept extension chat's special-tags; the Platform ports follow separately. - The new Snowflake, Microsoft app and Google keyless dialogs move to components/integrations/connect-service-account-modal on emcn-legacy, with field hints folded into labels; DocuSign's descriptor hints fold the same way. - useOAuthConnections stays deleted (only the deleted suggested actions read it). - The connect modal keeps this branch's removal of credentialDescription. - AWS and Databricks trust snippets wait for an audience, now optional in the workload-identity setup response; the Platform config form does the same. - Tool-registry baseline: three-way merge of the rows, the higher value where both sides grew.
2 parents c086c75 + 9ab4e6f commit 8fb3a3c

247 files changed

Lines changed: 8145 additions & 522 deletions

File tree

Some content is hidden

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

‎apps/docs/components/docs/icon-mapping/icon-mapping.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
481481
generic_webhook: Webhook,
482482
github: GithubIcon,
483483
github_v2: GithubIcon,
484+
github_v3: GithubIcon,
484485
gitlab: GitLabIcon,
485486
gitlab_v2: GitLabIcon,
486487
gmail: GmailIcon,

‎apps/docs/content/docs/integrations/aws-credentials.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ Generate a key with `openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:204
6565
To rotate the signing key without failed runs:
6666

6767
1. Set the new key as `WORKLOAD_IDENTITY_PREVIOUS_KEY` and redeploy (including any background workers that run workflows). Sim publishes it but keeps signing with the current key.
68-
2. Wait at least 5 minutes, so every cached copy of the published keys includes the new one.
68+
2. Wait at least 5 minutes, so every cached copy of the published keys includes the new one. If any keyless [Snowflake connection](/integrations/snowflake-service-account#keyless-service-user) exists, wait 60 minutes instead: Snowflake caches an issuer's keys for up to an hour.
6969
3. Swap them: set the new key as `WORKLOAD_IDENTITY_SIGNING_KEY` and the old key as `WORKLOAD_IDENTITY_PREVIOUS_KEY`, and redeploy everything that runs workflows.
70-
4. Once every instance signs with the new key, wait 5 more minutes, then remove `WORKLOAD_IDENTITY_PREVIOUS_KEY`.
70+
4. Once every instance signs with the new key, wait 5 more minutes (10 with keyless Snowflake connections, whose tokens last that long), then remove `WORKLOAD_IDENTITY_PREVIOUS_KEY`.
7171

7272
Without a signing key, the keyless option is unavailable and access keys work as usual.
7373

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: Bitbucket access tokens
3+
description: Connect Bitbucket Cloud to Sim with a workspace, project, or repository access token instead of a personal account
4+
---
5+
6+
import { Callout } from '@/components/ui/callout'
7+
import { Step, Steps } from '@/components/ui/steps'
8+
9+
Connect Bitbucket Cloud with an access token when a workflow should act as an integration rather than as the person who connected it. An access token belongs to a workspace, project, or repository, not to a user, so it keeps working when people leave and its reach is limited to what it was created for.
10+
11+
Bitbucket shows actions taken with the token (comments, merges, pipeline runs) under the token's name.
12+
13+
## Prerequisites
14+
15+
Admin access to the workspace, project, or repository the token is for. Workspace access tokens require a Bitbucket Cloud Premium plan; project and repository access tokens do not.
16+
17+
## Create the access token [#creating-the-access-token]
18+
19+
<Steps>
20+
<Step>
21+
Open the repository, project, or workspace settings in Bitbucket Cloud and go to **Access tokens**
22+
</Step>
23+
<Step>
24+
Click **Create access token** and give it a name (e.g. `Sim workflows`) — this is the name Bitbucket shows on everything the workflow does
25+
</Step>
26+
<Step>
27+
Select **Repositories: Read** (`repository`). Add **Pull requests**, **Repositories: Write**, or **Pipelines** scopes for the actions the workflow takes
28+
</Step>
29+
<Step>
30+
Create the token and copy it right away — Bitbucket shows it only once
31+
</Step>
32+
</Steps>
33+
34+
<Callout type="warn">
35+
A repository access token can only reach its repository, and a project access token only the repositories in its project. Treat the token like a password; Sim encrypts it at rest.
36+
</Callout>
37+
38+
## Add the access token to Sim [#adding-the-access-token-to-sim]
39+
40+
<Steps>
41+
<Step>
42+
Open **Integrations** from your workspace sidebar
43+
</Step>
44+
<Step>
45+
Search for "Bitbucket" and open it, then click **Add to Sim** and choose **Add access token**
46+
</Step>
47+
<Step>
48+
Paste the token and enter a repository it can read as `workspace/repository` (the `my-workspace/my-repository` in `bitbucket.org/my-workspace/my-repository`). For a repository access token, that is its own repository
49+
</Step>
50+
<Step>
51+
Click **Add access token**. Sim verifies the token by reading that repository once, so the token needs the `repository` scope
52+
</Step>
53+
</Steps>
54+
55+
## Use the credential in workflows [#using-the-credential-in-workflows]
56+
57+
Add a Bitbucket block and select the saved access token in the account dropdown, then choose the workspace and repository. The block calls `api.bitbucket.org` with the token, exactly as it does with a connected account.
58+
59+
Two things need a signed-in account and do not work with an access token:
60+
61+
- **List Workspaces** lists the workspaces of the person who connected the account, so Sim refuses to run it with an access token. Use a connected account for it.
62+
- The workspace picker lists a person's workspaces, so it cannot load them for an access token. Switch the workspace field to manual entry and type the slug.
63+
64+
## Rotate tokens and handle permission failures
65+
66+
If validation succeeds but an action fails, the token is likely missing that action's scope, or the repository is outside the token's project or repository. Access tokens cannot be edited after creation: create a replacement with the right scopes, update the credential in Sim, test the workflow, and then revoke the old token. See [Bitbucket's access token documentation](https://support.atlassian.com/bitbucket-cloud/docs/access-tokens/).

‎apps/docs/content/docs/integrations/bitbucket.mdx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ import { ReferenceDetails } from "@sim/emcn-docs/reference-details"
1212
{/* MANUAL-CONTENT-START:intro */}
1313
Use [Bitbucket](https://bitbucket.org/) Cloud to read repositories, branches, commits, files, and diffs; create or delete branches; and manage pull requests and comments. Pipeline actions list runs and steps, start or stop runs, and retrieve step logs.
1414

15-
Connect a Bitbucket account through OAuth. Triggers can start workflows on pushes, repository changes, build status updates, and pull request events; Sim manages their webhooks. For example, a workflow can read a failed pipeline's logs or review a newly opened pull request.
15+
Connect a Bitbucket account through OAuth, or a workspace, project, or repository [access token](/integrations/bitbucket-service-account). Triggers can start workflows on pushes, repository changes, build status updates, and pull request events; Sim manages their webhooks. For example, a workflow can read a failed pipeline's logs or review a newly opened pull request.
1616
{/* MANUAL-CONTENT-END */}
1717

18+
Connection guides: [Access tokens](/integrations/bitbucket-service-account).
19+
1820
## OAuth scopes [#oauth-scopes]
1921

2022
Sim requests these scopes when someone connects a Bitbucket account. For a self-hosted deployment, register your own app with the provider using the settings below. See [Integrations and OAuth](/platform/self-hosting/integrations-oauth) for setup.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: DocuSign JWT Grant
3+
description: Connect DocuSign to Sim with an integration key and RSA keypair that acts as one DocuSign user, instead of a personal OAuth connection
4+
---
5+
6+
import { Callout } from '@/components/ui/callout'
7+
import { Step, Steps } from '@/components/ui/steps'
8+
9+
Connect DocuSign with JWT Grant when a workflow should keep working without anyone signing in again. Sim signs a short-lived assertion with your app's RSA private key, exchanges it for an access token that acts as one DocuSign user, and repeats that every hour. DocuSign issues no refresh token for JWT Grant, so nothing expires as long as the key and the user's consent stay in place.
10+
11+
Every envelope, template, and download runs as the impersonated user, with that user's DocuSign permissions. Use a dedicated user when you can.
12+
13+
## Prerequisites
14+
15+
- A DocuSign account in the environment you want: a free developer account (demo) or a production account
16+
- Admin access to **Apps and Keys** in that account, to create the integration key
17+
18+
## Create the integration key [#creating-the-integration-key]
19+
20+
<Steps>
21+
<Step>
22+
In DocuSign, open the **Apps and Keys** page and add an app. Give it a name (e.g. `Sim workflows`) and click **ADD**
23+
</Step>
24+
<Step>
25+
Copy the integration key DocuSign assigns (a GUID)
26+
</Step>
27+
<Step>
28+
Under **RSA key pair**, click **GENERATE RSA**. Copy the private key before you close the dialog, including its `BEGIN` and `END` lines. DocuSign masks it afterwards and can't show it again
29+
</Step>
30+
<Step>
31+
Under **Redirect URI**, click **ADD URI** and enter the address you open Sim at (for example `https://sim.ai`). DocuSign requires a redirect URI for the consent step; Sim never uses what it receives there
32+
</Step>
33+
<Step>
34+
Leave **User Application** set to **Yes** (the default) and click **SAVE**
35+
</Step>
36+
</Steps>
37+
38+
<Callout type="warn">
39+
The private key lets anyone holding it act as any user who has consented to this integration key. Sim encrypts it at rest and never shows it again. Treat it like a password.
40+
</Callout>
41+
42+
## Find the user ID [#finding-the-user-id]
43+
44+
The **Apps and Keys** page shows your **User ID** and **API Account ID**, both GUIDs. To act as a different user, use that user's ID instead. Use the user ID, not an email address.
45+
46+
The account ID is optional. Sim uses the user's default account unless you enter one, so you only need it when the user belongs to more than one account.
47+
48+
## Add the credential to Sim [#adding-the-credential-to-sim]
49+
50+
<Steps>
51+
<Step>
52+
Open **Integrations** from your workspace sidebar
53+
</Step>
54+
<Step>
55+
Search for "DocuSign" and open it, then click **Add to Sim** and choose **Add JWT Grant app**
56+
</Step>
57+
<Step>
58+
Choose the **Environment** the integration key was created in: **Developer (demo)** or **Production**. A key that hasn't gone live only works in the developer environment
59+
</Step>
60+
<Step>
61+
Paste the integration key, the impersonated user ID, the RSA private key, and optionally the account ID
62+
</Step>
63+
<Step>
64+
Click **Add JWT Grant app**. Sim requests a token and reads the user's accounts once to check everything matches
65+
</Step>
66+
</Steps>
67+
68+
## Grant consent [#granting-consent]
69+
70+
DocuSign won't issue tokens for a user until that user (or an organization admin) consents to the integration key. The first time you add the credential, Sim shows an error with the exact consent link for your integration key and environment. Open the link signed in as the impersonated user and click **Accept**. DocuSign then redirects to the redirect URI you added; the page it lands on doesn't matter, so close it and add the credential again.
71+
72+
You only need to consent once per user and integration key, unless the user revokes it.
73+
74+
## Use the credential in workflows [#using-the-credential-in-workflows]
75+
76+
Add a DocuSign block and select the saved credential in the account dropdown. Every DocuSign operation works with it the same way as with a connected account. Sim calls the eSignature REST API for the account it found when it last requested a token, in the environment stored on the credential.
77+
78+
Knowledge base syncs from DocuSign can use the credential too. They read the same account in the same environment, and envelope links open in that environment's DocuSign web app.
79+
80+
## Fix connection errors
81+
82+
| Error | What to check |
83+
| ----- | ------------- |
84+
| Needs the impersonated user's consent | Open the consent link from the error signed in as that user, accept, and add the credential again. Consent can also be revoked later, which stops runs until it is granted again |
85+
| Couldn't authenticate | The integration key, user ID, and private key must belong to the same app, in the environment you chose. A key created in the developer environment isn't valid in production until it goes live. A private key from a deleted keypair no longer works |
86+
| User isn't a member of the account | The account ID you entered isn't one the user belongs to. Check it, or leave it blank |
87+
88+
To rotate the key, generate a new RSA keypair on the integration key, reconnect the credential in Sim with the new private key, test a workflow, then delete the old keypair. DocuSign allows up to five keypairs per integration key. See [DocuSign's JWT Grant documentation](https://developers.docusign.com/platform/auth/jwt/jwt-get-token/).

‎apps/docs/content/docs/integrations/docusign.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ import { ReferenceDetails } from "@sim/emcn-docs/reference-details"
1111

1212
{/* MANUAL-CONTENT-START:intro */}
1313
Use [DocuSign](https://www.docusign.com) to send envelopes for e-signature, create them from templates, inspect recipients and signing status, and download completed documents. Pending envelopes can be voided with a reason.
14+
15+
Connect a DocuSign account through OAuth, or an integration key that acts as one user through [JWT Grant](/integrations/docusign-service-account).
1416
{/* MANUAL-CONTENT-END */}
1517

18+
Connection guides: [JWT Grant](/integrations/docusign-service-account).
19+
1620
## OAuth scopes [#oauth-scopes]
1721

1822
Sim requests these scopes when someone connects a DocuSign account. For a self-hosted deployment, register your own app with the provider using the settings below. See [Integrations and OAuth](/platform/self-hosting/integrations-oauth) for setup.

0 commit comments

Comments
 (0)