A connection links an outside account, such as GitHub, to your organization. Attach it to a VM with one github field: the VM sends requests without the token, and the key vault adds a token that lasts one hour, refreshed for you, only on GitHub’s hosts.
Start a connection
Section titled “Start a connection”Start returns the provider’s authorization URL. The connection exists only after you open that URL, sign in and approve; the URL is single use and expires after 10 minutes.
For GitHub, the URL opens the app’s install page. Choose the account and repositories that the VM must reach, then approve the install.
- Open Connections.
- Select Add connection. The dashboard sends your browser to GitHub.
- Sign in to GitHub and approve the install for the account and repositories the VM must reach.
- GitHub returns you to the dashboard, which says
GitHub connected.
You can also select Connect GitHub… in the GitHub field of a create form, a profile or a VM’s Security tab. The install opens in a new tab, and the field picks the new connection when you approve, so the form keeps what you entered.
si org connection add githubhttps://github.com/apps/slashinfra/installations/new?state=...waiting for the approval in the browserconnected github octo-org (conn_6f1c0f0e8a)The command opens the URL and waits until you approve, for up to 10 minutes. With --json it prints the answer of the API at once and does not wait.
curl -sS -X POST "https://api.slashinfra.com/connections" \ -H "Authorization: Bearer $SI_API_KEY" -H "Content-Type: application/json" \ -d '{"provider":"github"}'API reference: Control API operation
{"id":"conn_6f1c0f0e8a","authorize_url":"https://github.com/apps/slashinfra/installations/new?state=..."}id is the id the connection gets when you approve. GET /connections/conn_6f1c0f0e8a answers 404 connection_not_found until then, so a script polls it to know when the install finished.
import os, requests
res = requests.post( "https://api.slashinfra.com/connections", headers={"Authorization": f"Bearer {os.environ['SI_API_KEY']}"}, json={"provider": "github"},)res.raise_for_status()print(res.json()["authorize_url"])https://github.com/apps/slashinfra/installations/new?state=...const res = await fetch('https://api.slashinfra.com/connections', { method: 'POST', headers: { Authorization: `Bearer ${process.env.SI_API_KEY!}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ provider: 'github' }),})if (!res.ok) throw new Error(await res.text())const { authorize_url: authorizeUrl } = (await res.json()) as { authorize_url: string}console.log(authorizeUrl)https://github.com/apps/slashinfra/installations/new?state=...List connections
Section titled “List connections”List returns every connection of the organization, newest first. A connection has no name; its conn_ id identifies it, and every answer carries the provider, account, status and creation time, never the token.
- Open Connections.
- The table lists Provider, Account, Status and Actions for every connection. A connection in
errorshows Refresh failed.
The table does not show the conn_ id. Use the CLI or the API when you need the id for a rule.
si org connection lsid provider account status createdconn_6f1c0f0e8a github octo-org active 2026-11-29 14:17:51Zcurl -sS "https://api.slashinfra.com/connections" \ -H "Authorization: Bearer $SI_API_KEY"API reference: Control API operation
[{"id":"conn_6f1c0f0e8a","provider":"github","account":"octo-org","status":"active","created_ms":1795961796394}]import os, requests
res = requests.get( "https://api.slashinfra.com/connections", headers={"Authorization": f"Bearer {os.environ['SI_API_KEY']}"},)res.raise_for_status()for connection in res.json(): print(connection["id"], connection["provider"], connection["account"])conn_6f1c0f0e8a github octo-orgconst res = await fetch('https://api.slashinfra.com/connections', { headers: { Authorization: `Bearer ${process.env.SI_API_KEY!}` },})if (!res.ok) throw new Error(await res.text())const connections = (await res.json()) as { id: string provider: string account: string}[]for (const connection of connections) console.log(connection.id, connection.provider, connection.account)conn_6f1c0f0e8a github octo-orgGet a connection
Section titled “Get a connection”Get returns one connection, the rules that the github field adds for it, and the env that those rules need. You do not need them to attach a connection: send github instead, as in Use a connection in a VM. Get is for a client that writes its own rules.
curl -sS "https://api.slashinfra.com/connections/conn_6f1c0f0e8a" \ -H "Authorization: Bearer $SI_API_KEY" | python3 -m json.toolAPI reference: Control API operation
{ "id": "conn_6f1c0f0e8a", "provider": "github", "account": "octo-org", "status": "active", "created_ms": 1795961796394, "secret_id": "connection:conn_6f1c0f0e8a", "secret_injections": [ { "domain": "github.com", "header": "authorization", "secret_id": "connection:conn_6f1c0f0e8a", "value_prefix": "", "value_format": "basic_x_access_token" }, { "domain": "api.github.com", "header": "authorization", "secret_id": "connection:conn_6f1c0f0e8a", "value_prefix": "Bearer ", "value_format": "raw" }, { "domain": "uploads.github.com", "header": "authorization", "secret_id": "connection:conn_6f1c0f0e8a", "value_prefix": "Bearer ", "value_format": "raw" }, { "domain": "raw.githubusercontent.com", "header": "authorization", "secret_id": "connection:conn_6f1c0f0e8a", "value_prefix": "Bearer ", "value_format": "raw" } ], "env": { "GH_TOKEN": "injected" }}import os, requests
res = requests.get( "https://api.slashinfra.com/connections/conn_6f1c0f0e8a", headers={"Authorization": f"Bearer {os.environ['SI_API_KEY']}"},)res.raise_for_status()connection = res.json()print(connection["secret_id"])for rule in connection["secret_injections"]: print(rule["domain"], rule["value_format"])connection:conn_6f1c0f0e8agithub.com basic_x_access_tokenapi.github.com rawuploads.github.com rawraw.githubusercontent.com rawconst res = await fetch('https://api.slashinfra.com/connections/conn_6f1c0f0e8a', { headers: { Authorization: `Bearer ${process.env.SI_API_KEY!}` },})if (!res.ok) throw new Error(await res.text())const connection = (await res.json()) as { secret_id: string secret_injections: { domain: string; value_format: string }[]}console.log(connection.secret_id)for (const rule of connection.secret_injections) console.log(rule.domain, rule.value_format)connection:conn_6f1c0f0e8agithub.com basic_x_access_tokenapi.github.com rawuploads.github.com rawraw.githubusercontent.com rawUse a connection in a VM
Section titled “Use a connection in a VM”Send github with the connection id when you create a VM. The VM gets four rules, one for each GitHub host, and GH_TOKEN=injected, so gh sends a header that the vault replaces. An explicit GH_TOKEN in env is kept. The vault adds the token only for each rule’s exact host over HTTPS on port 443, so the VM never holds it. A connection is not in a project, so a VM of any project can use it.
A profile takes github the same way, and a VM created from that profile gets the connection. Send "github": null with the profile to create a VM without it.
- Open SVMs.
- Select Create SVM.
- Enter
repo-workerin Name. - Choose
octo-orgin GitHub. - Select Create SVM.
si create --name repo-worker --github6f1c0f0e8a--github without a value uses the organization’s only active GitHub connection. With several, name one by account or id: --github octo-org.
curl -sS -X POST "https://api.slashinfra.com/svms" \ -H "Authorization: Bearer $SI_API_KEY" -H "Content-Type: application/json" \ -d '{"name":"repo-worker","github":"conn_6f1c0f0e8a"}'API reference: Control API operation
{"id":"6f1c0f0e8a","project":"proj_6f1c0f0e8a","url":"https://6f1c0f0e8a.slashinfra.dev/bin/bash","region":"eu-gra","expires_at":null,"generation":1,"labels":{}}import os, requests
res = requests.post( "https://api.slashinfra.com/svms", headers={"Authorization": f"Bearer {os.environ['SI_API_KEY']}"}, json={"name": "repo-worker", "github": "conn_6f1c0f0e8a"},)res.raise_for_status()print(res.json()["id"])6f1c0f0e8aconst res = await fetch('https://api.slashinfra.com/svms', { method: 'POST', headers: { Authorization: `Bearer ${process.env.SI_API_KEY!}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ name: 'repo-worker', github: 'conn_6f1c0f0e8a' }),})if (!res.ok) throw new Error(await res.text())const svm = (await res.json()) as { id: string }console.log(svm.id)6f1c0f0e8aIf the domain filter of the VM is on, add github.com, api.github.com, uploads.github.com and raw.githubusercontent.com to its allowed hosts: a rule never opens the filter. The dashboard lists each host the filter blocks, with an Allow button.
Attach or remove on a running VM
Section titled “Attach or remove on a running VM”Change an existing VM with github alone. Another connection replaces the GitHub rules, and null removes them and the GH_TOKEN=injected placeholder. Your other rules stay. The change applies at the next wake.
- Open SVMs.
- Select
repo-worker. - Open the Security tab.
- Choose
octo-orgin GitHub to attach it, or None to remove it.
si svm github repo-worker octo-orgsi svm github repo-worker offgithub octo-org (conn_6f1c0f0e8a)github offcurl -sS -X PATCH "https://api.slashinfra.com/svms/repo-worker" \ -H "Authorization: Bearer $SI_API_KEY" -H "Content-Type: application/json" \ -d '{"github":"conn_6f1c0f0e8a"}'API reference: Control API operation
{"id":"6f1c0f0e8a","project":"proj_6f1c0f0e8a","name":"repo-worker",...,"github":"conn_6f1c0f0e8a",...}import os, requests
res = requests.patch( "https://api.slashinfra.com/svms/repo-worker", headers={"Authorization": f"Bearer {os.environ['SI_API_KEY']}"}, json={"github": None},)res.raise_for_status()print(res.json()["github"])Noneconst res = await fetch('https://api.slashinfra.com/svms/repo-worker', { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.SI_API_KEY!}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ github: null }),})if (!res.ok) throw new Error(await res.text())console.log(((await res.json()) as { github: string | null }).github)nullA VM that already sends a secret to a GitHub host, such as the github preset with a personal access token, answers 400 github_conflict. Remove that rule first, then attach the connection.
Delete a connection
Section titled “Delete a connection”Delete removes the connection and its tokens, and it cannot be undone. Delete answers 409 connection_in_use while a VM still has a rule, whether it is awake or asleep, so remove it from the VM (si svm github repo-worker off, or "github": null) or delete the VM first. A profile does not block the delete, but a VM created from a profile that names the deleted connection answers 400 unknown_connection.
- Open SVMs.
- Select
repo-worker. - Select Delete.
- Enter
repo-workerin Type repo-worker to confirm. - Select Delete SVM.
- Open Connections.
- Select More actions on the GitHub row, then Delete.
- Wait 5 seconds for the delete to run, or select Undo to keep the connection.
si org connection rm conn_6f1c0f0e8aerror: This connection is in use. (connection_in_use)Delete repo-worker, then run it again.
si rm repo-workersi org connection rm conn_6f1c0f0e8adeleted 6f1c0f0e8adeleted connection conn_6f1c0f0e8aThe connection is still used by repo-worker:
curl -sS -i -X DELETE "https://api.slashinfra.com/connections/conn_6f1c0f0e8a" \ -H "Authorization: Bearer $SI_API_KEY"API reference: Control API operation
HTTP/1.1 409 Conflict...{"error":"This connection is in use.","code":"connection_in_use"}Delete the VM, then the connection:
curl -sS -i -X DELETE "https://api.slashinfra.com/svms/6f1c0f0e8a" \ -H "Authorization: Bearer $SI_API_KEY"API reference: Control API operation
HTTP/1.1 204 No Content...curl -sS -i -X DELETE "https://api.slashinfra.com/connections/conn_6f1c0f0e8a" \ -H "Authorization: Bearer $SI_API_KEY"API reference: Control API operation
HTTP/1.1 204 No Content...import os, requests
headers = {"Authorization": f"Bearer {os.environ['SI_API_KEY']}"}res = requests.delete("https://api.slashinfra.com/connections/conn_6f1c0f0e8a", headers=headers)print(res.status_code, res.json()["code"])res = requests.delete("https://api.slashinfra.com/svms/6f1c0f0e8a", headers=headers)res.raise_for_status()res = requests.delete("https://api.slashinfra.com/connections/conn_6f1c0f0e8a", headers=headers)res.raise_for_status()print(res.status_code)409 connection_in_use204const headers = { Authorization: `Bearer ${process.env.SI_API_KEY!}` }const refused = await fetch('https://api.slashinfra.com/connections/conn_6f1c0f0e8a', { method: 'DELETE', headers,})console.log(refused.status, ((await refused.json()) as { code: string }).code)const svm = await fetch('https://api.slashinfra.com/svms/6f1c0f0e8a', { method: 'DELETE', headers,})if (!svm.ok) throw new Error(await svm.text())const res = await fetch('https://api.slashinfra.com/connections/conn_6f1c0f0e8a', { method: 'DELETE', headers,})if (!res.ok) throw new Error(await res.text())console.log(res.status)409 connection_in_use204Options
Section titled “Options”| Field | Type | Default | Allowed values | What it changes |
|---|---|---|---|---|
provider |
string | Required | github |
The provider whose account the connection links. |
id (path) |
string | Required | A conn_ id |
The connection that get and delete act on. |
Scroll horizontally to see all columns.
The github field of POST /svms, PATCH /svms/:ref, POST /profiles and PUT /profiles/:ref:
| Field | Type | Default | Allowed values | What it changes |
|---|---|---|---|---|
github |
string or null | Keeps the stored one | A GitHub conn_ id, or null |
Attaches the connection’s four GitHub rules and GH_TOKEN=injected, or removes them for null. |
Scroll horizontally to see all columns.
Every VM and profile answer carries github: the attached connection id, or null.
A connection has no update. To change the account or provider, delete the connection and start another.
States
Section titled “States”| State | What it means for you | What you can do |
|---|---|---|
active |
The token works. The vault refreshes it 10 minutes before it expires, and a VM with the rule gets the new value without a rule change. | Use the connection. Nothing else is needed. |
error |
The last refresh failed. A token that has not expired still works; after expiry the rule injects nothing. | Wait for the retry. If it stays in error, fix the provider access, remove the rules, delete the connection and start again. |
Scroll horizontally to see all columns.
The dashboard shows active as Active and error as Refresh failed.
Errors
Section titled “Errors”| Code | When | Fix |
|---|---|---|
unknown_provider |
Start names a provider other than github. |
Use github. |
provider_unavailable |
Start names GitHub while the deployment has no GitHub App configured. | Ask the operator to configure the GitHub App. |
connection_failed |
The provider did not confirm the sign-in, or the token exchange failed. | Start again. |
connection_refused |
The sign-in at the provider was cancelled or refused. | Start again and approve the install. |
invalid_state |
The callback state expired, was already used, or the flow carried no code. | Start again and finish within 10 minutes. |
installation_unavailable |
The GitHub installation is not one the account that finished the flow can reach. | Choose an installation that the account can reach, or start again with another account. |
connection_not_found |
Get or delete names no connection of your organization. | List the connections and use the id. |
connection_in_use |
Delete runs while a VM still has a rule for the connection. | Remove the rule or delete the VM, then delete the connection. |
github_conflict |
github is sent while a secret rule already sends a credential to a GitHub host. |
Remove that rule, then attach the connection. |
unknown_connection |
A rule or github names a connection that does not exist or is not GitHub. |
List the connections and use an existing id. |
Scroll horizontally to see all columns.
Errors that any request can return are in the error catalog.
Permissions
Section titled “Permissions”| Operation | Who can | Key action |
|---|---|---|
| Start a connection | Any member | secret:write |
| List connections | Any member | secret:read |
| Get a connection | Any member | secret:read |
| Use a connection in a VM | Any member | svm:write |
| Use a connection in a profile | Any member | profile:write |
| Delete a connection | Any member | secret:delete |
Scroll horizontally to see all columns.
Limits
Section titled “Limits”- An authorization URL works once and for 10 minutes. An expired or reused state answers 400
invalid_state. - The vault refreshes a token 10 minutes before it expires, and retries a failed refresh after 10 minutes.
- A GitHub connection expands to four rules:
github.com,api.github.com,uploads.github.comandraw.githubusercontent.com, plusGH_TOKEN=injectedunless the VM setsGH_TOKEN. - A connection id is
conn_and 10 letters and digits. - GitHub is the only provider you can connect.
The full list is in Limits.
- Secrets: the rule fields, hosts and formats that a connection’s rules use.
- Open pull requests: clone a private repository and push a branch from a VM.
- Control API connections: every operation, field and status code.