You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
security: Dashboard identity cache is keyed on the STS ARN, which all Cognito identity-pool users share #1589
From the pre-1.0 security audit (spore-host/spore-host#649, 2026-11-11), audit id tenant-8. Verified: plausible, severity low (reviewer said medium).
Where:lambda/dashboard-api/auth.go:269 (at origin/main on 2026-11-11)
Evidence
getUserFromCredentialsHeader sets userID := *identity.Arn, then cached, err := getUserAccount(ctx, cfg, userID), and on a hit returns cached.CliIamArn without re-checking email. Identity-pool credentials (web/js/auth.js getCredentialsForIdentity) always resolve to arn:aws:sts::<acct>:assumed-role/Cognito_SpawnDashboard_Auth_Role/CognitoIdentityCredentials, a fixed session name. createUserAccountWithIdentity (l.386-411) writes that ARN as user_id for the first linked web user, and the comment at l.258-262 shows the assumption that assumed-role ARNs are per-session.
Scenario
Suppose one row is ever written for the shared Cognito ARN, either by a future API Gateway authorizer that supplies email claims or by a backfill script. Every later Google/GitHub/Globus sign-in then resolves to that user's cli_iam_arn and sees their sweeps, watches, cost history and teams. They can also cancel or delete that user's sweeps and add members to that user's teams, all of which the Lambda reads with its own DynamoDB credentials. Today, with HTTP API and no authorizer, the email lookup fails first, so this is latent.
Verifier
spawn lambda/dashboard-api/auth.go:254 sets userID to the STS ARN and checks the cache (auth.go:269-282) before verifying email, so a cache hit returns cached.CliIamArn directly. Cognito identity-pool credentials share a fixed session name, so all web users would collide on one key. Today extractEmailFromRequest (auth.go:327-344) finds no authorizer claims on the HTTP API, the web path fails before createUserAccountWithIdentity writes a row, and the flaw is latent. It becomes live only if such a row exists, which needs a check of the spawn-user-accounts table.
Suggested fix
Never key the cache on an assumed-role ARN. Key it on a per-user verified value (the Cognito IdentityId from a verified Logins token, or the IdP sub), or skip caching for assumed roles entirely, as the portal path already does. Re-verify the email link on every request for web identities.
Deployed-state check
Scan spawn-user-accounts for user_id values containing 'assumed-role/' (especially 'CognitoIdentityCredentials'). Any such row is actively mapping strangers to that user.
Activity
Dashboard: no broadcast of ownerless sweeps; no cache under a shared …
Dashboard: no broadcast of ownerless sweeps; no cache under a shared …
Dashboard: no broadcast of ownerless sweeps; no cache under a shared …