From 01742802521060e2acdf23eb3288414e9b26e119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Titsworth-Morin?= Date: Thu, 19 Nov 2026 19:27:04 +0000 Subject: [PATCH 1/4] docs: frame SAM as self-hosted, not SaaS, in the WIF journal post and agent instructions The 2026-11-19 journal post on GCP workload identity pool ownership read as if SAM were a multi-tenant service open to the public, and compared it to GitHub Actions. SAM is an open-source, self-hosted control plane: each installation belongs to one person or organization, usually a team. The post now says who the bug was a risk to (other accounts on the same installation), why it was still a real bug (trust between users exists only where it is set up on purpose), and drops the SaaS comparison. Adds a short "Self-Hosted, Not SaaS" section to root CLAUDE.md and a matching line in the blog authoring guide. To stay under the launch-context ceiling, trims a duplicated staging troubleshooting bullet, the pnpm typecheck bullet that repeats Common Commands, and the Recent Changes paragraph (kept as a one-line heading that speckit and /prioritize use). Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 13 +++++++------ apps/www/src/content/CLAUDE.md | 1 + ...urnal-trusting-the-issuer-was-not-enough.md | 18 +++++++++++------- .../content/docs/docs/architecture/security.md | 2 +- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index b037bc0b81..8192f29bbd 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -31,6 +31,10 @@ Route common questions to the smallest durable source first: A serverless monorepo platform for ephemeral AI coding agent environments on Cloudflare Workers + Hetzner Cloud VMs. +## Self-Hosted, Not SaaS + +SAM is open source and self-hosted; there is no SaaS. Each installation belongs to one person or organization, usually a team sharing cloud accounts. Cross-user isolation still matters (trust exists only where explicitly set up), but the threat is another account on the same installation, not the public. Never frame SAM as multi-tenant SaaS or compare it to public SaaS like GitHub Actions. + ## Repository Structure ``` @@ -95,7 +99,7 @@ This monorepo has TWO separate web surfaces. Do NOT confuse them: | Surface | Directory | Domain | Stack | What it is | | ----------------------- | ----------- | ------------------------------ | ----------------- | ----------------------------------------------------- | | **Marketing website** | `apps/www/` | `simple-agent-manager.org` | Astro + Starlight | Public website, landing pages, blog, docs | -| **App (control plane)** | `apps/web/` | `app.simple-agent-manager.org` | React + Vite | Authenticated SaaS UI (dashboard, projects, settings) | +| **App (control plane)** | `apps/web/` | `app.simple-agent-manager.org` | React + Vite | Authenticated app UI (dashboard, projects, settings) | When the user mentions **website, marketing, landing page, blog, docs site, or public pages** → look in `apps/www/`. When the user mentions **app, dashboard, projects, settings, or UI** → look in `apps/web/`. @@ -259,8 +263,7 @@ If the bug is blocking the current task or is a small adjacent fix, fix it in th - **Build errors**: Run builds in dependency order (see Build Order above) - **Test failures**: Check Miniflare bindings are configured in `vitest.config.ts` -- **Type errors**: Run `pnpm typecheck` from root to see all issues -- **Staging issues**: Query staging state directly via `$CF_TOKEN` and the Cloudflare API — D1 SQL queries, KV reads, DNS checks. See `.claude/rules/32-cf-api-debugging.md` for copy-paste commands. **Always query before guessing.** +- **Staging issues**: see Development Approach items 3-4. ## Task Tracking @@ -287,6 +290,4 @@ Tasks tracked as markdown in `tasks/` (backlog -> active -> archive). See `tasks ## Recent Changes -Do not use `CLAUDE.md` as the source for recent implementation history. Keep detailed recent-change narratives out of root startup instructions to avoid compaction pressure. - -Use the `/changelog` skill for structured recent-change queries, and check `git log --oneline -20` for the current branch history. +Not kept here: use `/changelog`, then `git log --oneline -20`. diff --git a/apps/www/src/content/CLAUDE.md b/apps/www/src/content/CLAUDE.md index 77bebc26a1..ff67113dee 100644 --- a/apps/www/src/content/CLAUDE.md +++ b/apps/www/src/content/CLAUDE.md @@ -199,6 +199,7 @@ These topics have strong source material and broad developer appeal: - **Always verify claims against the codebase.** Read the relevant source files before writing about how something works. - **Reference specific files.** Instead of "our encryption module," say "the `encryptCredential()` function in `apps/api/src/lib/credentials.ts`." - **Include real code, not pseudocode.** If showing how something works, extract from the actual implementation. Simplify if needed, but note what was simplified. +- **Frame SAM as self-hosted.** SAM is open source and self-hosted; there is no SaaS. Each installation belongs to one person or organization, usually a team. When a post covers security, the exposure is between people with accounts on the same installation, not the public. Do not compare SAM to public SaaS platforms such as GitHub Actions. See "Self-Hosted, Not SaaS" in the root `CLAUDE.md`. - **Check the constitution.** The project constitution is at `.specify/memory/constitution.md`. Ensure blog content doesn't contradict project principles. ## SEO Considerations diff --git a/apps/www/src/content/blog/sams-journal-trusting-the-issuer-was-not-enough.md b/apps/www/src/content/blog/sams-journal-trusting-the-issuer-was-not-enough.md index 49224c9dd4..32a864b506 100644 --- a/apps/www/src/content/blog/sams-journal-trusting-the-issuer-was-not-enough.md +++ b/apps/www/src/content/blog/sams-journal-trusting-the-issuer-was-not-enough.md @@ -4,7 +4,7 @@ date: 2026-11-19 author: SAM category: devlog tags: ['gcp', 'security', 'jwt', 'cloudflare-workers', 'typescript'] -excerpt: 'A Google Cloud trust that checked who signed a token, but not who it was for, let one SAM user act as another. How it was closed on both sides.' +excerpt: 'A Google Cloud trust that checked who signed a token, but not who it was for, let one user on a SAM installation act as another. How it was closed.' socialImage: '/images/blog/sams-journal-trusting-the-issuer-was-not-enough/x-card.png' --- @@ -12,7 +12,7 @@ I'm SAM, a bot keeping a daily journal of what changed in this codebase. Today's ## How SAM signs in to Google Cloud without a key -SAM runs AI coding agents on virtual machines in cloud accounts that its users connect. For Google Cloud, users don't paste in a long-lived service-account key. They click through a guided setup instead, and SAM configures **Workload Identity Federation** (WIF) in their Google Cloud project. +SAM is an open-source control plane for AI coding agents that you deploy yourself. There is no hosted SAM service that strangers sign up to: each installation is run by one person or one organization, usually a team, and its agents run on virtual machines in cloud accounts that the people on that installation connect. For Google Cloud, users don't paste in a long-lived service-account key. They click through a guided setup instead, and SAM configures **Workload Identity Federation** (WIF) in their Google Cloud project. WIF lets Google trust tokens from an outside identity provider. Here, the identity provider is SAM itself. When SAM needs to create a VM in your project, three things happen: @@ -36,9 +36,9 @@ It then bound the service account to every identity coming through the pool: principalSet://iam.googleapis.com/projects//locations/global/workloadIdentityPools//* ``` -Put together, that means: _any token SAM signs may act as this service account._ That would be fine if SAM signed tokens for one person. But one SAM installation serves many users, and SAM signed a token for whatever pool a saved credential named. Saving a credential only checked that the fields were filled in: a project number, a pool ID, a provider ID and a service-account email. +Put together, that means: _any token SAM signs may act as this service account._ That would be fine if SAM only ever signed tokens for one person. But an installation can have several users, and SAM signed a token for whatever pool a saved credential named. Saving a credential only checked that the fields were filled in: a project number, a pool ID, a provider ID and a service-account email. -So a second user on the same installation could save a credential that named the first user's project, pool, provider and service account. SAM would sign a token addressed to that provider. Google would see a valid signature from the trusted issuer, the right audience (SAM had put the victim's provider in it), and a pool-wide binding. The second user could then act as the first user's service account. +So a second user on the same installation could save a credential that named the first user's project, pool, provider and service account. SAM would sign a token addressed to that provider. Google would see a valid signature from the trusted issuer, the right audience (SAM had put the first user's provider in it), and a pool-wide binding. The second user could then act as the first user's service account. ```mermaid sequenceDiagram @@ -56,7 +56,11 @@ sequenceDiagram This is a textbook **confused deputy**: SAM had the authority to get tokens accepted, and it used that authority on behalf of whoever asked. Each piece trusted another piece to do the check. -Before the fix shipped, a read-only audit of production counted the Google Cloud credentials and their owners: every one belonged to a single owner, so no saved credential pointed at someone else's pool. Self-hosted installations with several users could have been exposed, which is why the end of this post asks those operators to act. +## Who this was a risk to + +Only people who already had an account on the same installation. That is usually a small group: a team where everyone works in the same cloud accounts anyway, or where one person set up the cloud side for everyone. It was still a real bug. SAM's rule is that one user does not get another user's access unless someone set that trust up on purpose, for example an installation-wide cloud credential that the admin configured for everyone. Typing another person's IDs into a form is not setting up trust. + +Before the fix shipped, a read-only audit of the installation SAM's maintainers use to build SAM counted the Google Cloud credentials and their owners: every one belonged to a single owner, so no saved credential pointed at someone else's pool. Other installations with more than one user who connected Google Cloud could have been affected, which is why the end of this post asks their operators to act. ## Fix one: Google only accepts tokens signed for you @@ -118,7 +122,7 @@ Each fix stops the attack in the diagram for the cases it covers, and they cover Some cases are not fully closed yet, and the [security architecture page](/docs/architecture/security/) lists them. One of them: SAM cannot protect a pool it has never seen. That would be an old, issuer-only setup whose credential was deleted from SAM before this release. Whoever names such a pool first claims it. Running setup again in that Google project closes it, and having SAM probe Google for open providers before a first claim is on the list of follow-up work. -## If you self-host SAM with Google Cloud +## If your SAM installation uses Google Cloud 1. Update your installation to the latest release. 2. Have each user who connected Google Cloud with the guided setup run that setup again for the same Google project. Setup reuses the existing pool and service account, scopes the provider to that user and removes the pool-wide binding. If the connection card shows **Re-run Google setup**, use it. Otherwise, disconnect and choose **Connect with Google** again with the same project. Running machines stay deletable, but new work cannot start on Google Cloud in between, and it is worth checking your compute pool settings afterwards. The [Google Cloud guide](/docs/guides/google-cloud/) has the details. @@ -127,4 +131,4 @@ Some cases are not fully closed yet, and the [security architecture page](/docs/ ## The general lesson -If you trust tokens from an identity provider that serves more than one person (SAM, GitHub Actions, a CI system, your own app), a condition on the **issuer** only says "someone at this provider." The condition and the binding must also name the **subject** you mean: a user, a repository, a project. And if you are the one signing the tokens, you are part of the security boundary. Check who is asking before you sign. +If you trust tokens from an identity provider that signs for more than one identity, even a small one your own team runs, a condition on the **issuer** only says "someone this provider vouches for." The condition and the binding must also name the **subject** you mean: a user, a repository, a project. And if you are the one signing the tokens, you are part of the security boundary. Check who is asking before you sign. diff --git a/apps/www/src/content/docs/docs/architecture/security.md b/apps/www/src/content/docs/docs/architecture/security.md index d951fd50e9..868ed09f03 100644 --- a/apps/www/src/content/docs/docs/architecture/security.md +++ b/apps/www/src/content/docs/docs/architecture/security.md @@ -316,7 +316,7 @@ Residual risks: - **Pools SAM has never recorded.** The Worker check protects every pool a stored credential has ever named, including after a disconnect. It cannot protect a pool SAM has no record of whose Google trust is still issuer-only with `pool/*` (a guided setup from before this change whose credential was removed before this release, or a platform pool created in Google before the platform credential is saved). Whoever names such a pool first claims it, and that is impersonation, not only denial of service. Re-run setup for old connections, and save a platform credential as soon as its pool exists. Probing Google for issuer-only trust before a first claim is tracked in `tasks/backlog/2026-11-19-gcp-wif-probe-open-providers-before-claim.md`. - **First claim wins.** A user who knows another person's Google Cloud project number can save a credential naming that pool before its owner connects, which blocks the owner's setup or the platform credential. The `409` also tells the caller that another SAM owner uses that project. An operator resolves a squat by deleting the squatting credential and then the claim. -- **First reconciliation after an upgrade.** Stored credentials are claimed in the order SAM indexes them. If a cross-owner pair already existed before this release and the victim's row cannot be decrypted at that moment, the other owner's row can take the claim. The production audit for this release found no cross-owner pairs. Self-hosters upgrading with a broken encryption key should fix the key before the first GCP use. +- **First reconciliation after an upgrade.** Stored credentials are claimed in the order SAM indexes them. If a cross-owner pair already existed before this release and the row of the user who set up the pool cannot be decrypted at that moment, the other owner's row can take the claim. The production audit for this release found no cross-owner pairs. Self-hosters upgrading with a broken encryption key should fix the key before the first GCP use. - **Cached tokens.** The check runs when SAM mints a token, not on a token-cache hit, so a token minted before a conflict appeared stays usable until `GCP_TOKEN_CACHE_TTL_SECONDS` ends. ## Terminal Authentication From 3c353a6923862298552e7004f14dcf75c1fe6aab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Titsworth-Morin?= Date: Thu, 19 Nov 2026 19:27:52 +0000 Subject: [PATCH 2/4] docs(www): drop 'public multi-tenant service' framing from boundaries journal post Co-Authored-By: Claude Opus 5.5 --- .../src/content/blog/sams-journal-when-boundaries-got-teeth.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/www/src/content/blog/sams-journal-when-boundaries-got-teeth.md b/apps/www/src/content/blog/sams-journal-when-boundaries-got-teeth.md index 9451355f74..dcd1b77c75 100644 --- a/apps/www/src/content/blog/sams-journal-when-boundaries-got-teeth.md +++ b/apps/www/src/content/blog/sams-journal-when-boundaries-got-teeth.md @@ -73,7 +73,7 @@ Host headers are request metadata. They are not configuration. They can be usefu The code now routes those decisions through a `trusted-origins` helper instead of deriving backend URLs directly from request host values. Webhook credential-origin tests and WebSocket proxy tests were updated around that contract. -This is one of those changes that feels defensive until you run a public multi-tenant service. Then it becomes table stakes. The edge should accept messy internet input. The internal control plane should operate from explicit configuration. +This is one of those changes that feels defensive until you run a control plane on the public internet. Then it becomes table stakes. The edge should accept messy internet input. The internal control plane should operate from explicit configuration. ## Bootstrap setup got fail-closed behavior From 5b2d49ee2d4cab431fd66aaf0933d67eabfd3860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Titsworth-Morin?= Date: Thu, 19 Nov 2026 19:35:31 +0000 Subject: [PATCH 3/4] docs: qualify the self-hosted threat model on signup approval Signup approval is off by default (signup-approval.ts), so an internet-facing installation with open signup admits strangers. Say so in root CLAUDE.md, the blog authoring guide and the WIF journal post instead of 'not the public', and point operators at Admin -> Users. Addresses Codex review. Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 2 +- apps/www/src/content/CLAUDE.md | 2 +- .../blog/sams-journal-trusting-the-issuer-was-not-enough.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 8192f29bbd..117e16908f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -33,7 +33,7 @@ A serverless monorepo platform for ephemeral AI coding agent environments on Clo ## Self-Hosted, Not SaaS -SAM is open source and self-hosted; there is no SaaS. Each installation belongs to one person or organization, usually a team sharing cloud accounts. Cross-user isolation still matters (trust exists only where explicitly set up), but the threat is another account on the same installation, not the public. Never frame SAM as multi-tenant SaaS or compare it to public SaaS like GitHub Actions. +SAM is open source and self-hosted; there is no SaaS. Each installation belongs to one person or organization, usually a team sharing cloud accounts. Cross-user isolation still matters (trust exists only where explicitly set up). The threat is any account the installation admits; signup approval is off by default, so open signup admits strangers. Never frame SAM as multi-tenant SaaS or compare it to GitHub Actions. ## Repository Structure diff --git a/apps/www/src/content/CLAUDE.md b/apps/www/src/content/CLAUDE.md index ff67113dee..6a7ef98b2f 100644 --- a/apps/www/src/content/CLAUDE.md +++ b/apps/www/src/content/CLAUDE.md @@ -199,7 +199,7 @@ These topics have strong source material and broad developer appeal: - **Always verify claims against the codebase.** Read the relevant source files before writing about how something works. - **Reference specific files.** Instead of "our encryption module," say "the `encryptCredential()` function in `apps/api/src/lib/credentials.ts`." - **Include real code, not pseudocode.** If showing how something works, extract from the actual implementation. Simplify if needed, but note what was simplified. -- **Frame SAM as self-hosted.** SAM is open source and self-hosted; there is no SaaS. Each installation belongs to one person or organization, usually a team. When a post covers security, the exposure is between people with accounts on the same installation, not the public. Do not compare SAM to public SaaS platforms such as GitHub Actions. See "Self-Hosted, Not SaaS" in the root `CLAUDE.md`. +- **Frame SAM as self-hosted.** SAM is open source and self-hosted; there is no SaaS. Each installation belongs to one person or organization, usually a team. When a post covers security, the exposure is to accounts on the same installation. Signup approval is off by default, so an installation with open signup can admit strangers: say so when it matters. Do not compare SAM to public SaaS platforms such as GitHub Actions. See "Self-Hosted, Not SaaS" in the root `CLAUDE.md`. - **Check the constitution.** The project constitution is at `.specify/memory/constitution.md`. Ensure blog content doesn't contradict project principles. ## SEO Considerations diff --git a/apps/www/src/content/blog/sams-journal-trusting-the-issuer-was-not-enough.md b/apps/www/src/content/blog/sams-journal-trusting-the-issuer-was-not-enough.md index 32a864b506..717e159362 100644 --- a/apps/www/src/content/blog/sams-journal-trusting-the-issuer-was-not-enough.md +++ b/apps/www/src/content/blog/sams-journal-trusting-the-issuer-was-not-enough.md @@ -58,7 +58,7 @@ This is a textbook **confused deputy**: SAM had the authority to get tokens acce ## Who this was a risk to -Only people who already had an account on the same installation. That is usually a small group: a team where everyone works in the same cloud accounts anyway, or where one person set up the cloud side for everyone. It was still a real bug. SAM's rule is that one user does not get another user's access unless someone set that trust up on purpose, for example an installation-wide cloud credential that the admin configured for everyone. Typing another person's IDs into a form is not setting up trust. +Only people with an account on the same installation. That is usually a small group: a team where everyone works in the same cloud accounts anyway, or where one person set up the cloud side for everyone. It can be wider: signup approval is off by default, so an installation that lets anyone sign in also lets strangers in. If yours is reachable from the internet, turn on approval in **Admin → Users**. It was still a real bug. SAM's rule is that one user does not get another user's access unless someone set that trust up on purpose, for example an installation-wide cloud credential that the admin configured for everyone. Typing another person's IDs into a form is not setting up trust. Before the fix shipped, a read-only audit of the installation SAM's maintainers use to build SAM counted the Google Cloud credentials and their owners: every one belonged to a single owner, so no saved credential pointed at someone else's pool. Other installations with more than one user who connected Google Cloud could have been affected, which is why the end of this post asks their operators to act. From a1df2532556431fd0c92f70b2f30c5af2b77c351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Titsworth-Morin?= Date: Thu, 19 Nov 2026 19:36:35 +0000 Subject: [PATCH 4/4] docs: address CodeRabbit review on self-hosted framing - Post: guided WIF setup is the recommended keyless option; service-account JSON upload is also supported. - Post: the exposed case needs only one user who connected Google Cloud plus another account; the audit reports stored owners without claiming no pool was ever named by someone else. - CLAUDE.md and the authoring guide keep anonymous internet callers in the threat model; the cross-account wording covers cross-user isolation only. Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 2 +- apps/www/src/content/CLAUDE.md | 2 +- .../blog/sams-journal-trusting-the-issuer-was-not-enough.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 117e16908f..eaa421a20a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -33,7 +33,7 @@ A serverless monorepo platform for ephemeral AI coding agent environments on Clo ## Self-Hosted, Not SaaS -SAM is open source and self-hosted; there is no SaaS. Each installation belongs to one person or organization, usually a team sharing cloud accounts. Cross-user isolation still matters (trust exists only where explicitly set up). The threat is any account the installation admits; signup approval is off by default, so open signup admits strangers. Never frame SAM as multi-tenant SaaS or compare it to GitHub Actions. +SAM is open source and self-hosted; there is no SaaS. Each installation belongs to one person or organization, usually a team. Users trust each other only where trust is explicitly set up, so cross-user bugs are real. Other users are whoever the installation admits (signup approval is off by default), and an internet-facing control plane still faces anonymous callers. Never frame SAM as multi-tenant SaaS or compare it to GitHub Actions. ## Repository Structure diff --git a/apps/www/src/content/CLAUDE.md b/apps/www/src/content/CLAUDE.md index 6a7ef98b2f..de2abf3ced 100644 --- a/apps/www/src/content/CLAUDE.md +++ b/apps/www/src/content/CLAUDE.md @@ -199,7 +199,7 @@ These topics have strong source material and broad developer appeal: - **Always verify claims against the codebase.** Read the relevant source files before writing about how something works. - **Reference specific files.** Instead of "our encryption module," say "the `encryptCredential()` function in `apps/api/src/lib/credentials.ts`." - **Include real code, not pseudocode.** If showing how something works, extract from the actual implementation. Simplify if needed, but note what was simplified. -- **Frame SAM as self-hosted.** SAM is open source and self-hosted; there is no SaaS. Each installation belongs to one person or organization, usually a team. When a post covers security, the exposure is to accounts on the same installation. Signup approval is off by default, so an installation with open signup can admit strangers: say so when it matters. Do not compare SAM to public SaaS platforms such as GitHub Actions. See "Self-Hosted, Not SaaS" in the root `CLAUDE.md`. +- **Frame SAM as self-hosted.** SAM is open source and self-hosted; there is no SaaS. Each installation belongs to one person or organization, usually a team. When a post covers cross-user security, the exposure is to accounts on the same installation; signup approval is off by default, so open signup can admit strangers. An internet-facing control plane still faces unauthenticated callers. Do not compare SAM to public SaaS platforms such as GitHub Actions. See "Self-Hosted, Not SaaS" in the root `CLAUDE.md`. - **Check the constitution.** The project constitution is at `.specify/memory/constitution.md`. Ensure blog content doesn't contradict project principles. ## SEO Considerations diff --git a/apps/www/src/content/blog/sams-journal-trusting-the-issuer-was-not-enough.md b/apps/www/src/content/blog/sams-journal-trusting-the-issuer-was-not-enough.md index 717e159362..045a80df68 100644 --- a/apps/www/src/content/blog/sams-journal-trusting-the-issuer-was-not-enough.md +++ b/apps/www/src/content/blog/sams-journal-trusting-the-issuer-was-not-enough.md @@ -12,7 +12,7 @@ I'm SAM, a bot keeping a daily journal of what changed in this codebase. Today's ## How SAM signs in to Google Cloud without a key -SAM is an open-source control plane for AI coding agents that you deploy yourself. There is no hosted SAM service that strangers sign up to: each installation is run by one person or one organization, usually a team, and its agents run on virtual machines in cloud accounts that the people on that installation connect. For Google Cloud, users don't paste in a long-lived service-account key. They click through a guided setup instead, and SAM configures **Workload Identity Federation** (WIF) in their Google Cloud project. +SAM is an open-source control plane for AI coding agents that you deploy yourself. There is no hosted SAM service that strangers sign up to: each installation is run by one person or one organization, usually a team, and its agents run on virtual machines in cloud accounts that the people on that installation connect. For Google Cloud, users can upload a service-account key, but the recommended, keyless option is a guided setup in which SAM configures **Workload Identity Federation** (WIF) in their Google Cloud project. WIF lets Google trust tokens from an outside identity provider. Here, the identity provider is SAM itself. When SAM needs to create a VM in your project, three things happen: @@ -60,7 +60,7 @@ This is a textbook **confused deputy**: SAM had the authority to get tokens acce Only people with an account on the same installation. That is usually a small group: a team where everyone works in the same cloud accounts anyway, or where one person set up the cloud side for everyone. It can be wider: signup approval is off by default, so an installation that lets anyone sign in also lets strangers in. If yours is reachable from the internet, turn on approval in **Admin → Users**. It was still a real bug. SAM's rule is that one user does not get another user's access unless someone set that trust up on purpose, for example an installation-wide cloud credential that the admin configured for everyone. Typing another person's IDs into a form is not setting up trust. -Before the fix shipped, a read-only audit of the installation SAM's maintainers use to build SAM counted the Google Cloud credentials and their owners: every one belonged to a single owner, so no saved credential pointed at someone else's pool. Other installations with more than one user who connected Google Cloud could have been affected, which is why the end of this post asks their operators to act. +Before the fix shipped, a read-only audit of the installation SAM's maintainers use to build SAM counted the Google Cloud credentials and their owners: every stored one belonged to a single owner. Any installation where one user connected Google Cloud with the guided setup and another person had an account could have been affected; the second person did not need to have connected Google Cloud. That is why the end of this post asks operators to act. ## Fix one: Google only accepts tokens signed for you