Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion docs/self-host/hybrid.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ A **hybrid** install runs entirely in your AWS account, like any self-hosted Cod
| **CoderHelm's Jira app**, through the event relay | setting up your own Jira app | link your Jira site once; its events arrive at your install, without the app's secret |
| **CoderHelm's integration apps** (Notion, Confluence, Google Drive) | registering an app with each provider | sign in with one click, as on coderhelm.com |

Each part is a separate choice, at install time (the [install guide](/self-host/install/)) or later in **Settings, System, Hybrid**. **Fully private** (your own domain or the AWS address, your own GitHub App and apps) stays the default and sends nothing to CoderHelm.
Each part is a separate choice, at install time (the [install guide](/self-host/install/)) or later in **Settings, System, Hybrid**. **Fully private** (your own domain or the AWS address, your own GitHub App and apps) sends nothing to CoderHelm and needs no registration.

On a hybrid install, every tool under **Other apps** (Jira, Notion, Confluence, Google Drive) uses CoderHelm's app unless you choose **Use my own app (fully private)** for it ([Other apps](#other-apps)). That only decides which app a sign-in goes through: nothing reaches your install or CoderHelm until someone connects the tool.

## Trust model

Expand Down Expand Up @@ -124,6 +126,15 @@ The **Jira app relay** above is the other way round: a Jira site whose own Jira

The Setup checks show the link as `hybrid_jira` (in Settings, Setup and the install guide's `/api/setup/status`): `no_link` (todo) until it is linked, `syncing` (wait) while your install fetches the proxy settings, `ok` once linked. Linking needs an install admin, so `/api/setup/status` keeps reporting this one check (its code only) after someone has signed up, while Link through CoderHelm is on.

## Other apps

**Settings, System, Hybrid, Other apps** lists each tool with **Use Coderhelm's app (easiest)** or **Use my own app (fully private)**, and one line on what passes through CoderHelm for it. The install guide offers the same choices under **What CoderHelm sets up for you**, all on, and applies them when the install registers.

- **CoderHelm's app is the default** for each tool nobody chose, on a new install and on an install that registered before these choices existed. A tool for which your install already has its own app set up (its own Notion, Atlassian or Google client in its secret) keeps using that until you pick CoderHelm's.
- **A choice is kept.** Picking **Use my own app** for a tool, in Settings or the guide, stays until you change it. An install whose admin had already turned some tools on under Other apps keeps the others on its own app.
- **Nothing starts by itself.** With CoderHelm's app chosen, **Connect** on that tool signs in through CoderHelm's app; until someone connects, no sign-in exists, no event is relayed and nothing is synced. Jira events come through only once CoderHelm's Jira app is installed on your site with your install id, or a site is linked.
- **A tool CoderHelm can't offer yet** (its app for that provider isn't set up on the hosted side) shows **Coderhelm's app isn't set up yet** and uses your own app until it is.

## Integrations

| Integration | Through CoderHelm's app | Notes |
Expand Down
2 changes: 1 addition & 1 deletion docs/self-host/setup-checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The guide's checks come from the install's public `GET /api/setup/status`, the s
- `domain`: when you chose your own domain, the guide shows a Domain step between AWS and GitHub, checks until the code is `ok`, then follows the install to the domain (so the GitHub App gets the domain's URLs). The records to add are in Settings, then System. You can skip it and add the domain later there.
- `github_manifest_ready`: one click when true; the terminal command (`pull`, then `github-app`) when false.
- `setup_open: false` (someone has signed up): the install is shown as ready. A hybrid install with **Link through CoderHelm** on still reports `hybrid_jira` then, because linking a Jira site needs an install admin: the guide's Jira step follows it until `ok`.
- `POST /api/setup/hybrid/settings` (with the setup key, while nobody has signed up) takes `github_mode`, `sharing` and `jira_link`; the guide sends `jira_link: true` when **Use CoderHelm's Jira app** is on, so the install reports `hybrid_jira` from then on.
- `POST /api/setup/hybrid/settings` (with the setup key, while nobody has signed up) takes `github_mode`, `sharing`, `jira_link` and `apps` (per tool, `{"jira": "coderhelm" | "own", "notion": …, "confluence": …, "google_drive": …}`); the guide sends `jira_link: true` when **Use CoderHelm's Jira app** is on, so the install reports `hybrid_jira` from then on, and `apps` with each **Other apps** choice (all `coderhelm` unless turned off).

The answer carries no ids or URLs, so the guide makes its own links: the Bedrock console for the region it launched in, the models a new install calls (the release's defaults with the region's inference profile prefix), the SES console for that region, and `https://github.com/apps/<slug>/installations/new` from the slug the manifest landing hands back.

Expand Down
11 changes: 11 additions & 0 deletions services/common/src/hybrid/integrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ pub fn hosted_ids() -> impl Iterator<Item = &'static str> {
.map(|e| e.id)
}

/// The tools an install picks an app for, one by one (Settings, System,
/// Hybrid, Other apps, and the install guide): every hosted one but GitHub,
/// which has its own choice.
pub fn app_choice_ids() -> impl Iterator<Item = &'static str> {
hosted_ids().filter(|id| *id != "github")
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down Expand Up @@ -153,6 +160,10 @@ mod tests {
ids,
vec!["github", "jira", "notion", "confluence", "google_drive"]
);
assert_eq!(
app_choice_ids().collect::<Vec<_>>(),
vec!["jira", "notion", "confluence", "google_drive"]
);
assert!(entry("github").is_some() && entry("nope").is_none());
let j = serde_json::to_value(entry("slack_commands").unwrap()).unwrap();
assert_eq!(j["mode"], "unavailable");
Expand Down
Loading
Loading