Skip to content

Fix: cross-org WS authorization, heartbeat auth, entitlements rename, LDAP flake - #138

Merged
fclairamb merged 57 commits into
mainfrom
batch/2026-07-15
Jul 15, 2026
Merged

fclairamb merged 57 commits into
mainfrom
batch/2026-07-15

Conversation

@fclairamb

Copy link
Copy Markdown
Owner

Summary

  • solidping-action: GitHub Action that heartbeats scheduled workflows
  • Heartbeat ingestion: Authorization Bearer header token + structured JSON body, rendered as its own result-detail card in dash0
  • Cross-org navigation: enforce org authorization on all REST /orgs/:org routes, unify with WS, auto-switch-org on cross-org nav
  • Rename entitlement limit maxSsoUsers → maxUsers (provider-neutral seat cap), enforced at invitation acceptance
  • Mint signed billing upgrade token for org admins; seed entitlements.billing_inbound_secret from env in SaaS mode
  • Change embedded-PostgreSQL default port 5434 → 5433
  • Fix flaky wall-clock assertion in TestLogin_LocalPasswordTakesPriorityOverLDAP

Test plan

  • CI passes (backend + dash0 tests, lint)
  • Spot-check heartbeat ingestion via header auth + structured body
  • Spot-check cross-org navigation no longer breaks the live WS
  • Spot-check usage page shows renamed "Users" seat limit

🤖 Generated with Claude Code

fclairamb added 30 commits July 15, 2026 08:35
…P flakes under parallel-suite load because it asserts a wall-clock bound
…ecause the WS is the only surface enforcing org scope (REST has none)
…y with WS

Closes a cross-tenant data leak: every /orgs/:org/* REST group was
RequireAuth-only, which never checks org membership, so any authenticated
user of any org could read any other org's checks, incidents and member
list. Route them all through a structural orgGroup helper that stamps
RequireAuth + RequireOrgAccess.

Extract the access rule into auth.AuthorizeOrgAccess (token-scope equality
plus membership) and have both middleware.RequireOrgAccess and
realtimews.authorizeOrg call it, so REST and the live WS can no longer
drift. Split the WS org-not-found close code (4410) from org-denied (4403).
…inal WS 4403

OrgLayout re-mints the session for the URL's org when a non-super-admin
member lands on an org different from the token's, gating child render (and
the live WS dial) until the token matches — so no org-scoped request fires
with a foreign-scoped token now that REST enforces org scope.

live-socket.ts no longer treats a 4403 as terminal: it refreshes the
session and redials once (a cross-org nav can leave the handshake cookie
scoped to the previous org) and only disables on a second consecutive 4403.
The new 4410 (org-not-found) close code is terminal.
@fclairamb fclairamb changed the title Batch 2026-07-15: heartbeat auth, cross-org WS fix, entitlements rename, solidping-action Fix: cross-org WS authorization, heartbeat auth, entitlements rename, LDAP flake Jul 15, 2026
@fclairamb
fclairamb merged commit aa1ff56 into main Jul 15, 2026
11 checks passed
@fclairamb
fclairamb deleted the batch/2026-07-15 branch July 15, 2026 23:25
@fclairamb fclairamb mentioned this pull request Jul 15, 2026
This was referenced Sep 8, 2026
fclairamb added a commit that referenced this pull request Nov 23, 2026
…on diagnostics (#990)

## What changed

- **Checks search** (solidping-business#105): every word of a multi-word
query must now match the name or the slug (`ts- ssh` finds `ts-ssh-…`);
`%` and `_` typed in a search are matched literally.
- **Escalation policy editor** (#107, finding 1): the step target Select
stays controlled, no more React "uncontrolled to controlled" warning.
- **Webhook deliveries** (#106): the HTTP status is classified. 4xx (and
3xx) are permanent failures, logged at WARN instead of ERROR; 5xx, 429
and 408 are retried up to `MaxRetryCount`, honouring `Retry-After`
(seconds or date, capped at 15 min). The `Job failed` log line carries
`status_code`. A notification webhook keeps the same `webhook-id` (the
root job UID) across its retries, so receivers can deduplicate.
- **iOS Safari session loss** (#107, finding 2): not reproduced under
Playwright WebKit iPhone emulation, so only diagnostics ship: PostHog
events `session_missing_on_load` (booleans only, never token values),
`session_cleared` (with the reason, plus a `solidping_session_cleared`
localStorage marker read on the next load) and `session_persist_failed`;
events fired before PostHog loads are queued (max 10). The fix comes
once production events point at the cause.

Breaking (internal): `jobsvc.Service.RetryJob` takes an `after
time.Duration`; `clearToken(reason)` now requires a reason.

## Decided by autopilot

- webhook-status-retry-classification, "same `webhook-id` across
retries?": yes, the root job UID.
- webhook-status-retry-classification, "surface repeated failures as
integration health?": out of scope.
- ios-safari-session-lost, "ship the instrumentation first if not
reproduced?": yes, instrumentation only.
- ios-safari-session-lost, "drop stackless `Script error.` events?": not
yet, only once the events show they don't precede the sign-out.

Closes fclairamb/solidping-business#105
Closes fclairamb/solidping-business#106
Closes fclairamb/solidping-business#107

🤖 Generated with [Claude Code](https://claude.com/claude-code)
- CodeQL js/clear-text-storage-of-sensitive-data,
web/dash0/src/api/client.ts:126/131/135 (alerts #136-#138): dismissed as
false positive, tokens live in localStorage by design until the
HttpOnly-cookie spec (2026-09-15-05 B1), as for #1-#3/#129.

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant