Skip to content

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 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.

  1. Open Connections.
  2. Select Add connection. The dashboard sends your browser to GitHub.
  3. Sign in to GitHub and approve the install for the account and repositories the VM must reach.
  4. 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.

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.

  1. Open Connections.
  2. The table lists Provider, Account, Status and Actions for every connection. A connection in error shows Refresh failed.

The table does not show the conn_ id. Use the CLI or the API when you need the id for a rule.

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.

Terminal window
curl -sS "https://api.slashinfra.com/connections/conn_6f1c0f0e8a" \
-H "Authorization: Bearer $SI_API_KEY" | python3 -m json.tool
Output
{
"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"
}
}

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.

  1. Open SVMs.
  2. Select Create SVM.
  3. Enter repo-worker in Name.
  4. Choose octo-org in GitHub.
  5. Select Create SVM.

If 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.

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.

  1. Open SVMs.
  2. Select repo-worker.
  3. Open the Security tab.
  4. Choose octo-org in GitHub to attach it, or None to remove it.

A 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 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.

  1. Open SVMs.
  2. Select repo-worker.
  3. Select Delete.
  4. Enter repo-worker in Type repo-worker to confirm.
  5. Select Delete SVM.
  6. Open Connections.
  7. Select More actions on the GitHub row, then Delete.
  8. Wait 5 seconds for the delete to run, or select Undo to keep the connection.
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.

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.

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.

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.

  • 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.com and raw.githubusercontent.com, plus GH_TOKEN=injected unless the VM sets GH_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.