changelog
LogTide 1.0 release notes
4 releases in the 1.0 line, newest first. First beta of the 1.0 line. Tenant data isolation audit, per-org metering with a capability/quota system, typed lifecycle hooks, a hardened outbound webhook dispatcher, a structured audit log primitive, and fail-closed PII masking.
1.0.3: Coordinated-Disclosure Security Fixes
A security-focused release resolving privately reported issues (coordinated disclosure via KIberblick.de): cross-tenant dashboard reads, stored XSS in the service map, an open redirect, SSRF DNS-rebinding, and two races. Trace span attributes are now PII-masked. No migrations - a drop-in upgrade.
- Cross-tenant read on the dashboard API endpoints closed - API-key auth now matches the requested org/project against the key's bound scope
- Stored XSS via OTLP service.name in the service map fixed; service.name is also sanitized at ingestion as defense in depth
- Open redirect on the auth-free login/register path fixed with a shared safe-redirect helper
- SSRF guard now pins the validated IP on the HTTP path (DNS-rebinding hardening)
- PII masking now also covers trace span attributes, including deep-masked request/response bodies
- No database migrations - a drop-in upgrade from 1.0.2
A security-focused release. It resolves a batch of privately reported issues (coordinated disclosure via KIberblick.de): a cross-tenant read on the dashboard API endpoints, stored XSS via OTLP service.name in the service map, an open redirect on the auth-free login/register path, a DNS-rebinding gap in the SSRF guard’s HTTP path, a first-admin bootstrap promotion race, and a capability-limit check-then-act race; trace span attributes are now PII-masked, and service.name is sanitized at ingestion as defense in depth. No database migrations - a drop-in upgrade. Alongside the security work: two correctness follow-ups from the multi-engine bug-hunt sweep (#255) - full SigmaHQ field-modifier chains and a true service-map p95 on every storage engine (validated against real ClickHouse, MongoDB and TimescaleDB) - two operational fixes (a Redis memory leak and a runaway nightly SigmaHQ sync), and a handful of frontend touch-ups.
Security
- Cross-tenant read on the dashboard API endpoints: the dashboard endpoints (
/api/v1/dashboard/stats,/timeseries,/top-services,/timeline-events,/recent-errors,/activity-overview) tookorganizationIdfrom the query string and only ran the membership check behindif (request.user?.id), which is set for session auth only. For API-key auth that check was skipped, so a holder of any full-access key (bound to org A) could read another org’s dashboard data by passing its id. All six handlers now route through a sharedresolveDashboardScopethat, for API-key auth, requires the requested org/project to match the key’s bound scope (defaulting to the bound project when omitted) - mirroring theresolveQueryProjectIdguard that already protects the query and traces routes. Reported privately via KIberblick.de - Stored XSS via OTLP
service.namein the service map:service.nameonly had null bytes stripped at ingestion, so< > " 'survived intospan.service_name, andServiceMap.svelte’s EChartstooltip.formatterreturned a raw HTML string built from it - so aservice.namelike<img src=x onerror=…>executed for any operator who hovered the node/edge. User-derived tooltip values are now HTML-escaped via a sharedescapeHtmlutil (also adopted by the SIEM HTML report builder). Stored data is left raw on purpose - escaping at the sink avoids double-encoding and keeps the JSON API correct. Reported privately via KIberblick.de - Open redirect on the auth-free login/register path: in
authMode === 'none'deployments both pages forwarded the user-suppliedredirectquery parameter viagoto()with no validation. The check now lives in a sharedisSafeInternalPath/safeRedirecthelper used on both paths; it requires a single-leading-slash path and rejects protocol-relative forms including the backslash variant (/\evil.com). Reported privately via KIberblick.de - SSRF guard now pins the validated IP (DNS-rebinding hardening):
safeFetchresolved and validated the host, then letfetch()re-resolve at connect time, leaving a resolve-then-connect window for rebinding (the TCP monitor path already pinned; the HTTP path did not). The HTTP(S) path now connects through a per-request undici dispatcher whose lookup is pinned to the already-validated address, so the socket reaches the exact IP that passed validation; TLS SNI and certificate validation still use the original hostname. Reported privately via KIberblick.de - First-admin bootstrap race:
createUserdecided the automatic first-admin promotion with a non-atomichasAnyAdmin()check followed by a separate insert, so concurrent registrations in the zero-admin window could all be promoted. The check-then-insert now runs inside a transaction holding a Postgres advisory lock, so at most one registration wins (and it is closed entirely whenINITIAL_ADMIN_*is set). Reported privately via KIberblick.de - Capability limit check-then-act race: resource-creating routes (api keys, custom dashboards, alert rules, sigma import/enable, notification channels) ran
COUNT → assertWithinLimit → insertwithout serialization, so parallel requests could each read a count under the limit and then all insert, exceeding a configured finite cap (a quota bypass, not a tenant boundary; the OSS default has no finite limits). The count+create now runs through a sharedwithLimitLockhelper holding a per-organization, per-capability transaction-scoped advisory lock. Reported privately via KIberblick.de - Defense-in-depth on OTLP
service.nameat ingestion: complementing the service-map fix, ingestedservice.name(logs, spans and metrics) is now run through a sharedsanitizeServiceNamethat strips control characters (C0/DEL/C1, including null bytes) and caps the length, while preserving otherwise legitimate characters - so a raw payload can’t resurface through a sink added later. Suggested by KIberblick.de - PII masking now also covers trace span attributes: masking was wired only into log ingestion, so spans were stored with attributes verbatim - including
http.request_body/http.response_body(plaintext credentials, JWTs),net.peer.ipand user agents.tracesService.ingestSpansnow runs the same org/project masking rules over each span’sattributes,resourceAttributesand event/link attributes before storage, and drops (fail-closed) any span whose masking throws. Because request/response bodies are opaque stringified JSON, those are deep-masked (parse, maskpassword/token/email inside, re-serialize) with full redaction as a fallback. Metric attributes are not yet masked (tracked separately)
Added
- Per-occurrence trace links on the error detail page: each log in an error group’s Logs tab now shows a “View Trace” action when the log carries a trace context. The error-group logs endpoint now surfaces the
traceIdit already loaded and previously discarded - no schema change, no migration - Copy buttons on metadata blocks: the log search expanded detail and the Log Context dialog now have a one-click copy on each metadata block, so a log’s metadata JSON can be grabbed without selecting it by hand
- Breadcrumbs timeline in the log search detail: when a log carries
metadata.breadcrumbs, the expanded row renders a collapsible “Breadcrumbs (N)” timeline (the same view used in the Log Context dialog) instead of leaving them buried in the raw metadata JSON - Nested metadata columns: custom metadata columns in log search now accept dot-notation paths (e.g.
sdk.name) to read into nested objects. Exact top-level keys still win first, so flat keys containing dots keep resolving; object/array values render as compact JSON with the full value on hover
Fixed
- Admin usage page returned 403 for orgs the admin wasn’t a member of: the metering endpoints (
/usage,/usage/breakdown,/usage/storage,/usage/capabilities) gated solely on org membership, so the platform Admin → Usage page returned “Forbidden” for any org the admin didn’t personally belong to. Platform admins (is_admin) now bypass the membership check on these read endpoints; queries stay filtered by the requestedorganizationId, so tenant scoping is unchanged - Trace volume / latency dashboard panels were empty on ClickHouse and MongoDB: both panel fetchers read span data straight from the Postgres
spanshypertable and short-circuited to an empty series when the engine wasn’t TimescaleDB. A new multi-enginereservoir.getSpanTimeseries(time-bucketed volume + true window p50/p95/p99 from raw spans -percentile_conton TimescaleDB,quantileon ClickHouse,$percentileon MongoDB) now backs both fetchers - UI dates and numbers no longer follow the machine locale: many
toLocale*calls were made with no locale, so on a non-English host they rendered localized weekdays/months (e.g. “mercoledì”) and number grouping. All user-facing date/time/number formatting is now pinned toen-US(the project convention). Swept 51 files - Error detail trend bars were invisible: the occurrence-trend bars used a percentage
heightwhose parent column had no definite height, so it collapsed to zero. The columns now take full height with the bar anchored in a flex track (a small baseline is kept for non-zero days) - Redis memory leak: completed/failed jobs were never evicted: the BullMQ adapter defined sane
removeOnComplete/removeOnFaildefaults on the queue, but itsadd()passed those keys asundefinedon every job. BullMQ merges per-job options withObject.assign, which copies theundefinedkeys and wiped the cleanup config, so every completed/failed job hash (and its full payload) was retained in Redis forever - growing unbounded with the high-volume ingestion jobs while the dashboard still showed 0 waiting / 0 failed.add()now omits those keys unless the caller sets them, so queue-level retention applies - Nightly SigmaHQ sync re-imported the entire catalog and auto-created alert rules: the 2:30 AM cron called the sync with no rule selection, falling into the “fetch ALL rules” path that pulled the whole catalog (~2000+ rules) and inserted them all as
enabled = true, and passedautoCreateAlerts: true, inserting analert_rulesrow per synced rule - so an org with 5-6 enabled rules woke up with thousands active and matching alerts. The cron now syncs only the rules the org already imported (bysigmahq_path) to refresh their detection content, and never auto-creates alert rules (a one-off cleanup of already-created rows is tracked separately) - Log Context dialog no longer overflows on wide content: a wide metadata
<pre>or breadcrumb stretched the whole dialog (grid children hadmin-width: auto); the content now stays within the dialog and the wide block scrolls on its own axis - Sigma compound field-modifier chains were silently truncated: the matcher split a field key like
CommandLine|utf16le|base64offset|containson|but kept only the first modifier, so transform-plus-comparator chains matched incorrectly. The whole chain is now parsed and applied in order - transforms (base64,base64offset,utf16le/utf16/utf16be/wide,windash) rewrite the pattern, then the final comparator runs, following the canonical SigmaHQ model. Addedcidrand numericgt/gte/lt/ltecomparators while reworking the parser - Sigma
|allmodifier had the wrong semantics: it was implemented as “all whitespace-split words present in any order” rather than the SigmaHQ list quantifier.|allnow flips the default OR over a value list into AND (every element must match) and composes with modifier chains (e.g.cmd|base64|contains|all)
Changed
- Project overview now shows an Activity Overview instead of a logs-only timeline: the project overview page replaced the “Logs Timeline (Last 24 Hours)” chart (log levels only) with the multi-signal Activity Overview, plotting logs, log errors, spans, span errors, detections and alerts over the same 24h window (toggle series from the legend). It reuses the existing custom-dashboard
activity_overviewfetcher via a newGET /api/v1/dashboard/activity-overviewendpoint (org-membership + project-in-org scoped); no new storage or migration - Service-map p95 is now a true window percentile across all engines: the service dependency map previously reported
MAX(duration_p95_ms)from the per-bucket spans continuous aggregate, which overestimates (a p95 is not derivable by combining per-bucket p95s) and was only produced on TimescaleDB. Per-service health stats now come from a newreservoir.getServiceHealthStatscomputed directly from raw spans over the requested window on every engine (percentile_conton TimescaleDB,quantile(0.95)on ClickHouse,$percentileon MongoDB 7.0+), so ClickHouse and MongoDB service maps now carry real call/error/latency/p95 figures where they previously had none - Trace and session IDs in the log search detail are theme-aware: the expanded row rendered them as hardcoded light-mode pills that looked washed out in dark mode. The trace ID is now a link that opens the trace timeline (primary accent) with a separate filter button, and the session ID is a dark-safe filter button; both derive their colors from the design tokens
1.0.2: Stream Tickets & a Frontend Bug Hunt
A frontend correctness and security release from a multi-agent frontend bug hunt, plus hardened auth for the live-streaming endpoints. The headline: single-use stream tickets keep the session token out of WebSocket/SSE URLs. One additive migration - otherwise a drop-in upgrade.
- Single-use stream tickets: the session token no longer travels in WebSocket/SSE URLs, where reverse proxies log it
- Webhook channel secrets are no longer rehydrated into the DOM when editing a notification channel
- Global 401 handler redirects a revoked or expired session to login instead of failing silently
- Stale-response race guards across log search, traces, error groups, SIEM incidents, monitors and dashboard panels
- Admin pages enforce a client-side admin guard; the OIDC callback strips the token from the URL
- One additive migration (049_stream_tickets) - otherwise a drop-in upgrade from 1.0.1
A frontend correctness and security release from a comprehensive multi-agent frontend bug hunt - UI, logic, reactivity, leaks and security - plus a hardening of how the browser authenticates the live-streaming endpoints. The headline item is single-use stream tickets: the session token no longer travels in WebSocket/SSE URLs, where reverse proxies log it. One additive database migration (049_stream_tickets); otherwise a drop-in upgrade.
Security
- Session token no longer placed in WebSocket/SSE URLs: browser
WebSocketandEventSourcecannot send anAuthorizationheader, so the log live-tail (/api/v1/logs/ws), the SIEM events stream (/api/v1/siem/events) and the trace live-tail (/api/v1/traces/stream) previously carried the long-lived session token in the URL query string, where it is logged by proxies and servers. The client now mints a short-lived, single-use stream ticket via an authenticatedPOST /api/v1/stream-ticketsand passes that instead. Tickets live in the relational database (not Redis, so the mechanism is portable across the BullMQ and graphile queue backends), expire in 30s and are consumed on first use. The legacy?token=path still works for backward compatibility - Webhook channel secrets no longer rehydrated into the DOM: editing a notification channel no longer pre-fills the bearer token / basic-auth password inputs with the stored secret; the fields stay empty with a “leave blank to keep current” hint and are only sent when the user types a new value
- OIDC callback strips the session token from the URL after reading it, so it no longer lingers in browser history, the referrer or logs
- Admin pages enforce a client-side admin guard: several admin views (user detail, usage, organization detail) loaded and could mutate data on mount without checking the admin role; they now redirect non-admins, and the admin section layout has a guard of its own
- Removed a debug
console.logthat leaked log message content and api-key metadata to the browser console on the error-detail page
Added
- Global 401 handler: a single fetch interceptor installed at app startup clears local auth state and redirects to the login page (preserving the current path so the user lands back there after signing in) on any authenticated
/api/v1401 that is not an auth endpoint. Previously a revoked or expired session was only detected on a full dashboard remount, so a logged-out user could keep clicking around getting silent failures POST /api/v1/stream-ticketsendpoint andstream_ticketstable (migration049) backing the stream-ticket auth described above
Fixed
- Stale-response races: overlapping loads triggered by fast filter/pagination changes could let an older in-flight response overwrite fresher results. Added local request-sequence guards on the log search, traces list, error groups, SIEM incidents, monitor detail/list, custom-dashboard panels and alert-preview views
- API client error handling: error-branch
response.json()calls are guarded so a non-JSON error body (reverse-proxy 502/HTML, empty204) no longer throws aSyntaxErrorthat masks the real HTTP failure (auth, admin and exceptions clients) - Locale-stable formatting: user-facing dates and numbers now use explicit
en-USformatting across the status pages, members, project settings, traces, metrics, search and notification-channel views; alert-history timestamps no longer label UTC values as if they were local time - Lifecycle and memory leaks: component store subscriptions are auto-managed, a first-run shortcut-hint
setTimeoutis cleared on unmount, and chart instances are disposed, so navigating away no longer leaves timers, listeners or subscriptions behind - Svelte 5 reactivity and assorted UI fixes: the trace detail page reloads when navigating between traces; the api-key DSN preserves an
http://scheme for non-TLS deployments; the “View Error Group” action navigates with a param the target page actually reads; SigmaSync no longer crashes when a commit hash is absent; the toaster follows the app theme; the delete-organization confirm is disabled while in flight; PII masking rules require a regex or field names; numeric monitor inputs guard againstNaN; and the audit-log resource cell no longer renders a literal escape sequence - ClickHouse: materialized-view backfills now run once instead of on every startup
Notes
- Left intentionally unchanged: storing the session token in
localStorage(a disputed, low-severity finding). Moving it to an httpOnly cookie would trade XSS token-theft for CSRF surface and a full auth-model overhaul without a clear net win; the high-leverage XSS defenses (CSP, output sanitization, auditing the few{@html}sites) are tracked separately
1.0.1: Cross-Tenant Fixes & a 1.0 Bug Audit
A security and correctness release from a multi-engine bug audit of the 1.0 line. Two cross-tenant data-exposure fixes that were live in 1.0.0, plus a broad sweep of detection, ingestion, storage, alerting and frontend correctness fixes. No migrations - a drop-in upgrade.
- Cross-tenant log exposure via the WebSocket live-tail closed - it now enforces the same membership check as the REST query routes (was live on 1.0.0)
- Cross-tenant leak of notification-channel secrets (webhook auth tokens) closed with a membership check
- PII masking fail-open fixed: separator-less card numbers are no longer stored unmasked
- Storage-layer correctness fixes validated against real ClickHouse, MongoDB and TimescaleDB; CI now runs the MongoDB reservoir suite
- New official Ruby SDK (the `logtide` gem) - Rack/Rails middleware, tracing and a stdlib Logger bridge; docs at /docs/sdks/ruby
- No database migrations - a drop-in upgrade from 1.0.0
A security and correctness release from a comprehensive, multi-engine bug audit of the 1.0 line. The headline items are two cross-tenant data-exposure fixes that were live in 1.0.0, alongside a broad sweep of detection, ingestion, storage, alerting and frontend correctness fixes. No database migrations - this is a drop-in upgrade. The storage-layer fixes were validated against real ClickHouse and MongoDB (and TimescaleDB), and CI now runs the MongoDB reservoir integration suite.
Security
- Cross-tenant log exposure via the WebSocket live-tail (
GET /api/v1/logs/ws): the handler validated only the session token and then streamed whateverprojectIdthe client passed, never checking project/organization membership, so any authenticated user could live-tail any project’s logs by supplying its id. It now enforces the sameverifyProjectAccessmembership check as the REST query routes, with a regression test added. Was live on the 1.0.0 line - Cross-tenant leak of notification-channel secrets:
GET /notification-channels/alert-rules/:idand/sigma-rules/:idreturned the channelconfigverbatim - including webhookauthtokens/passwords - with no membership check. They now resolve the rule’s organization, require membership, and scope the read to that org - PII masking fail-open:
maskTextskipped all content rules for pure-alphanumeric strings, so a separator-less credit-card number (e.g.4111111111111111) was stored unmasked. The all-alphanumeric early-exit is removed; only too-short strings are skipped - OIDC account-takeover: linking an external identity to an existing local account by email now requires the provider to assert the email is verified (
email_verified === true), preventing takeover via an unverified IdP email; LDAP is treated as authoritative - Cross-tenant
?projectId/ association gaps closed: the correlation batch-identifiers endpoint now intersects the requested project with the caller’s accessible projects (and requires read access); status-incident and scheduled-maintenance creation, organization-default channels, and alert/sigma/monitor channel associations now validate that the project/channels belong to the caller’s organization - Session invalidation: disabling a user, resetting their password, and changing a user’s admin role now invalidate the cached session (previously the cached profile stayed valid up to the cache TTL); the frontend logout now revokes the server-side session token instead of only clearing local state
- Hardening: emails are stored and compared case-insensitively across registration/login/profile-update; the global
CACHE_TTLoverride no longer clamps semantic TTLs (sessions, OIDC state, settings); the webhook envelope id is validated as a UUID; SigmaHQ category sync matches on a directory boundary; OTLP trace/span ids of invalid length are rejected - Dependency security updates, third wave (Dependabot):
nodemailerbumped from^8.0.9to^9.0.1(GHSA-p6gq-j5cr-w38f, HIGH - the message-levelrawoption bypasseddisableFileAccess/disableUrlAccess; our SMTP senders never passraw, but the dependency is patched regardless), and transitiveundicipinned to>=7.28.0 <8(GHSA-vmh5-mc38-953g HIGH TLS bypass, GHSA-pr7r-676h-xcf6 MEDIUM cache-bypass disclosure). No vulnerable version remains in the lockfile
Fixed
- ClickHouse “Query with id … is already running” under concurrent queries: the request-context propagation derived the ClickHouse
query_iddeterministically fromrequestId + operation, so two same-operation queries running concurrently within one request reused the same id and ClickHouse rejected the second. Thequery_idnow keeps the request id + operation as a readable prefix and appends a random suffix so every query is unique - Sigma condition operator precedence:
parseExpressionfolded AND/OR strictly left-to-right, soa or b and cevaluated as(a or b) and c. AND now binds tighter than OR, matching the Sigma spec - Infinite loop on ingestion: a custom identifier pattern that can match the empty string (e.g.
\d*) no longer hangs the worker (zero-width-match guard plus a forced global flag) - Trace summary races:
upsertTraceis now race-free on TimescaleDB (single atomicINSERT … ON CONFLICT) and ClickHouse (the summary is recomputed from the spans table instead of read-modify-write), so concurrent span batches no longer lose span counts - ClickHouse: added the missing
session_idcolumn (it was written and filtered on but did not exist), parse zone-less datetimes as UTC, and report the true latest value in the metrics overview (was the average) with NaN guards - MongoDB:
deleteMetricsByTimeRangeonly deletes the matched metrics’ exemplars (was all exemplars in the window); the metrics overview sorts before$last; metadatadistinctno longer drops numeric/boolean values;ingestReturningreturns the rows that did land on a partial bulk-write failure - Rate-of-change alerts: the baseline now applies the rule’s metadata filters (previously only the current rate did, deflating the deviation ratio), and a
minBaselineValueof 0 is honored instead of defaulting to 10 - Dashboards: personal dashboards are scoped to their creator (no longer readable/editable by any org member);
metric_statsums across buckets for sum/count aggregations; top-error percentages are computed against the true total; the capability usage page renders a zero limit as fully restricted, not unlimited - Pagination/counts: admin organization/project search counts apply the search filter; correlation lookups report the true total; the ClickHouse trace error-rate uses a consistent denominator;
getTopServiceshonors thetobound - Live tail: SSE polling bypasses the 60s query cache and guards against overlapping polls; the live-tail WebSocket URL works behind a reverse proxy; the traces and search live tails no longer corrupt pagination or index-keyed row state
- Infra/correctness: BullMQ and graphile queue retry-attempt defaults are aligned; webhook deliveries can only be replayed from the terminal
deadstate (no double delivery); the audit flush buffer is bounded on persistent DB failure; alert-notification jobs are deduplicated by history id; admin org-role changes are restricted consistently with member removal; tenant-table updates in the log-pipeline and service-dependency queries are project-scoped
Added
- Official Ruby SDK - the
logtidegem for Ruby 3.1+, implementing the LogTide SDK spec v1.0 with leveled logging, structured exception capture, the Hub/Scope model, spans + OTLP export, W3Ctraceparentpropagation, Rack middleware, a Rails Railtie, and a stdlibLoggerbridge - standard library only, no runtime dependencies. Docs at/docs/sdks/ruby
Changed
- The reservoir storage abstraction gains
getTraceServices(distinct trace services with no result cap), implemented on all three engines and used by the traces service, replacing the previous 10k-trace paging - CI now provisions a MongoDB service for the reservoir integration suite, so all three storage engines are exercised on every run
1.0 Beta: Tenant Isolation, Metering & Capabilities, Hooks & Webhook Delivery
First beta of the 1.0 line. Tenant data isolation audit, per-org metering with a capability/quota system, typed lifecycle hooks, a hardened outbound webhook dispatcher, a structured audit log primitive, and fail-closed PII masking.
- Tenant data isolation audit across every backend data-access path, with a CI tripwire and isolation test suite (#228, #219)
- Metering + capability system: per-org usage measurement, feature gates, and enforceable limits/quotas (#212, #214)
- Typed lifecycle hooks for ingestion, query, alert evaluation and webhook dispatch (#216)
- Outbound webhook delivery: HMAC signing, retry with backoff, dead-letter queue and SSRF protection (#218)
- Audit log primitive: typed actions, actor types, outcomes and per-org retention (#217)
- PII masking is now fail-closed at ingestion - records that fail masking are rejected, never stored unmasked
First beta of the 1.0 line. The headline work since 0.9.7 is the tenant data isolation audit that hardens every backend data-access path before the stable cut, and the metering + capability system pair that gives every organization usage measurement, feature gates and enforceable limits/quotas (ingestion, spans, storage) - the foundation for plan tiers without changing OSS behavior. A typed lifecycle hooks surface lands alongside it, letting operators observe, mutate or reject ingestion, query, alert-evaluation and webhook-dispatch without forking. A reusable outbound webhook delivery system also lands - HMAC signing, retry with backoff, a dead-letter queue and centralized SSRF protection - onto which every existing webhook sender is migrated, closing three unguarded fetch paths in the process.
Security
- PII masking is now fail-closed at ingestion: previously, if the masking step threw, the batch was stored unmasked with only a
console.warn.maskLogBatchnow reports per-record failures and the ingestion service rejects exactly those records before the reservoir write (the whole batch if rule compilation itself fails). Rejected records are reported back to the client in a new optionalrejected: [{ index, reason: 'pii_masking_failed' }]field on the ingest response (omitted when empty, so existing clients are unaffected) and aspartialSuccess.rejectedLogRecordson the OTLP logs endpoint. No unmasked data can reach any storage engine throughingestLogs - Cross-tenant log reads via unvalidated
?projectIdon the logs query API (#228, audit #219): all 10 endpoints in the query module accepted a?projectId=parameter and queried with it directly, without verifying it belonged to the authenticated API key’s bound project. Fixed with a sharedresolveQueryProjectIdguard that returns403when the requested projectId does not match the key’s project, locked by a dedicated isolation test - Cross-tenant trace/span reads via the same pattern on the traces query API (#228): the identical flaw existed on 8 trace/span read endpoints, fixed with the same guard and locked by an isolation test. The metrics query API was already safe
- Application-layer scoping gaps on tenant-table queries (defense in depth, #228): a sweep of every tenant-table access path closed several queries missing an
organization_id/project_idfilter (PII-masking, SIEM, exceptions, correlation). Session-auth routes now Zod-validateorganizationIdas a uuid instead of a raw cast - Dependency security updates ahead of the 1.0 cut:
vitest/@vitest/coverage-v8to3.2.6, and transitiveesbuild(≥0.28.1) andshell-quote(≥1.8.4) pins bumped via the root pnpmoverrides. No vulnerable version remains in the lockfile
Added
- Capability system: per-organization feature gates, static limits and usage quotas (#214): a typed capability registry is the single source of truth for 12 initial capabilities across three kinds - boolean gates (
auth.sso,detection.advanced,audit.enabled,isolation.dedicated), static numeric limits (alerts.max_rules,notifications.max_channels,apikeys.max,audit.retention_days) and metered usage quotas (ingestion.max_bytes_monthly,ingestion.max_events_monthly,storage.max_bytes,tracing.max_spans_monthly). All defaults are OSS-permissive (booleans enabled, limits/quotas unlimited), so self-hosted behavior is unchanged until an operator sets a cap. Per-org overrides live in a neworganization_entitlementstable; a cache-backed resolver merges rows over registry defaults, fails open on DB errors, and is swappable so a hosted distribution can source entitlements from subscription state without patching core. Enforcement:assertCapability(403),assertWithinLimit(403) andassertWithinUsageQuota(429, hard-blocks log and OTLP span ingestion). Read APIGET /api/v1/capabilitiesreturns the merged set for UI gating; admin endpoints manage per-org overrides, surfaced in an “Entitlements” card on the admin organization page - Resource usage metering per organization and project (#212): a storage-agnostic way to record and aggregate consumption, surfaced as a “Usage” section in the dashboard. A new
metering_eventsTimescaleDB hypertable is fed by a non-blocking, loss-tolerant in-process recorder that buffersmetering.record(...)calls and batch-inserts on a size threshold, flush interval, and graceful shutdown - dropping under back-pressure rather than blocking the request path. Log ingestion recordslogs.ingested.bytesandlogs.ingested.eventsfire-and-forget after the reservoir write (OTLP ingestion is metered too). Read APIsGET /api/v1/usageandGET /api/v1/usage/breakdownanswer “what is being ingested” by type, project, service and log level. Tunable viaMETERING_ENABLED,METERING_FLUSH_INTERVAL_MSandMETERING_FLUSH_MAX_BUFFER - Span and storage metering recording sites (#212 follow-up): span ingestion now records
spans.ingested, activating thetracing.max_spans_monthlyquota end-to-end. A dailyStorageSnapshotJobrecords a per-(organization, project)storage.snapshotestimating stored bytes as the logical bytes ingested within the org’s retention window - engine-agnostic by design - which activatesstorage.max_bytes. Usage pages gain a “Current storage (estimated)” stat and a daily storage trend - Capability usage vs plan limits on the usage page: a “Plan limits” section shows current consumption against each configured capability limit as a color-coded progress bar (green < 80%, amber 80-99%, red ≥ 100%), backed by a new
GET /api/v1/usage/capabilitiesendpoint that joins live usage to the configured cap for every measurable capability. A null limit renders as “Unlimited”, so OSS defaults read correctly - Audit log primitive: typed actions, actor types, outcomes and per-org retention (#217): the audit log grows from a free-string event sink into a structured security primitive. A canonical action registry (70 actions across 13 families like
org.*,apikey.*,rule.*,auth.*,data.*) is the single source of truth - actions are a TypeScript string-literal union, so typos fail to compile. A newauditLogService.record()API reads organization, actor (user/apiKey/system), IP and user agent from the request context, so callsites only state the action and target; it supports atomic recording inside a transaction, awaited fire-and-safe inserts that never fail the request, and a flush buffer for high-volume access logging. All 57 legacy callsites were converted; new coverage includes failed local logins (auth.login_failed, previously not recorded at all). Per-orgaudit_retention_days(1-3650, NULL = keep forever) is editable from the admin org page and enforced by the daily retention job. The audit page gains actor-type, outcome and time-range filters - Lifecycle hooks at ingestion, query, alert evaluation and webhook dispatch (#216): a small, typed set of named extension points (
beforeIngest,beforeQuery,beforeAlertEvaluation,beforeWebhookDispatch), no-op in OSS (nothing registered by default, ahasHandlersguard keeps the hot paths at zero overhead). Handlers run sequentially, receive a typed per-phase context with documented mutable fields, and may abort by throwingHookRejectionError(code, message, statusCode); unexpected hook errors fail closed. Operators register handlers without forking viaHOOKS_MODULES. Contract documented in the new Lifecycle Hooks guide - after- lifecycle hook phases* (#216 follow-up):
afterIngest(batch counts and rejection reasons),afterAlertTriggered(post-persist trigger facts) andafterWebhookDispatch(per delivery-attempt result). Fire-and-forget: handler errors are logged and never block or mutate the operation; contexts are frozen read-only snapshots - Generic outbound webhook delivery infrastructure (#218): a reusable dispatcher that centralizes every outbound HTTP delivery behind one well-tested module. Capabilities: optional HMAC-SHA256 signing (
X-Logtide-Signature: t=<unix>,v1=<hex>, timing-safe to verify); retry with exponential backoff (1s, 5s, 25s, 2m, 10m, transient-only); a dead-letter queue modeled aswebhook_deliveries.status='dead', listable and replayable from the dashboard; SSRF protection by reusing thesafeFetchguard; per-organization concurrency limiting; and a bounded delivery log exposed via an org-scoped API and a “Webhook Deliveries” page under Settings. All five existing webhook senders were migrated onto it - the error/monitor/incident paths previously used a barefetchwith no SSRF guard, closing three sibling gaps. Documented in the new Webhooks guide - Request context propagation across HTTP, jobs and the DB layer (#222, closes #213): a new AsyncLocalStorage-backed
RequestContextprimitive in@logtide/shared/context. A Fastify plugin establishes the context right after auth resolves; BullMQ producers piggy-back_ctxon payloads and consumers wrap processors incontext.run/runAsSystem; cron callbacks run underrunAsSystem. Thepg.Poolis patched to prepend a/* req=... */SQL comment so requests are traceable in slow-query logs, and each reservoir engine injects the same correlation in its native form (Timescale SQL comment, ClickHousequery_id+log_comment, MongoDB$comment) - Tenant isolation audit, test suite and CI tripwires (#228, #219): a living audit document, a dedicated isolation test suite (the
createIsolatedTenantsfixture plus per-area tests for query, traces, crud, api-key auth, audit-log and metering) that runs in CI, a static tripwire (check:tenant-scoping) that flags Kysely queries on tenant tables lacking org/project scoping and fails the CI typecheck on new unscoped sites, an opt-in runtime Kysely guard (TENANT_GUARD=1), and a PR template carrying a tenant-safety checklist. The codified model: organization is a hard boundary for everyone, API keys are project-scoped, session users are org-wide by current policy - Capability enforcement completed across resource creation (#214 follow-up): the previously defined
notifications.max_channelsandapikeys.maxlimits are now enforced at channel/key creation (API keys counted org-wide), and two new limit keys land with enforcement:sigma.max_active_rulesanddashboards.max_custom. All defaults stay unlimited for self-hosted OSS - Ingestion health visibility for admins: a new
GET /api/v1/admin/stats/ingestion-healthendpoint aggregates the last 24h of new ingestion health counters (ingestion.pii_rejected,ingestion.detection_enqueue_failed, and more) plus SIEM enrichment availability, surfaced as an “Ingestion health (24h)” card that highlights in red when failures occurred. Sigma-detection and exception-parsing job enqueues now retry once and record a counter on failure instead of dropping silently - Scheduled email digest reports - groundwork, disabled (#209, part of #154): the foundation for periodic email summaries of log activity. Intentionally disabled in this beta - the worker leaves the scheduler unregistered and no digests are sent. The service, schema and tests are merged so the remaining scope can be finished. What landed:
digest_configs/digest_recipientstables, anICronRegistryabstraction with native-cron implementations for both BullMQ and Graphile, and a generator that computes log volume from the hourly-stats continuous aggregate - Test debt paid down: six backend coverage exclusions are gone, the 12 previously untested
@logtide/sharedZod schemas gain dedicated tests, CI now runs the shared and frontend unit suites alongside the backend, and frontend component testing is enabled (Svelte 5 + testing-library). A dedicated Playwright journey covers the full traces flow (list, filters, waterfall, span panel and trace/log correlation) - Migrations 044-048:
digest_email_reports(044),metering_events(045),organization_entitlements(046),webhook_deliveries+webhook_delivery_attempts(047), and additiveactor_type/actor_id/outcomecolumns on theaudit_loghypertable (048)
Changed
- BREAKING: unified webhook event envelope (#218 follow-up): every outbound webhook delivery now serializes to one envelope
{ id: "evt_<uuid>", type, version: 1, occurredAt, organizationId, projectId, data }instead of four bespoke payload shapes. Event types arealert.triggered,incident.created,error.detected,monitor.status_changedandchannel.test; the per-typedatapayloads keep their previous snake_case fields minusevent_type/timestamp. Envelope and per-type Zod schemas ship in@logtide/shared(webhookEnvelopeSchema,parseWebhookEvent); deliveries carry a newX-Logtide-Event-Version: 1header. See the Webhooks guide for the full envelope reference - OTLP log metadata shape: resource attributes now land under
metadata.resourceinstead of being spread flat (log-record attributes keep the flat namespace and win collisions there; nothing is lost). Structured log bodies (kvlist/array) keep their decoded structure undermetadata['otel.body']alongside the stringifiedmessage. Logs ingested before this change keep their old shape - Reservoir log query params now require
projectId(#228):projectIdwas optional on the reservoir query/count/aggregate params, which is what allowed an unscoped log read to compile. It is now required, with an explicitGLOBAL_SCOPEsentinel for the handful of intentional platform-wide reads
Fixed
- Sigma search by MITRE technique/tactic/tag always 500ed: the queries compared
TEXT[]columns with a::jsonbcast and failed on every request since they shipped; they now use proper text-array containment and are covered by regression tests - Migration prefix collision that could break production migrate (#229): two migration pairs shared a numeric prefix, which Kysely’s position-by-position validation could reject. Fixed by renumbering the files plus an idempotent pre-migration repair that renames the matching
kysely_migrationrows on already-applied databases; a new CI guard rejects future duplicate prefixes. Verified on both a fresh schema and a database seeded into the pre-fix state DELETE /api/v1/sigma/rules/:idand custom-dashboard update/delete returned 500 instead of 404 for a missing or cross-org id (#229): these now map to a proper404. None leaked or mutated another tenant’s data - the scoping already prevented the operation; this only corrects the HTTP status- Silent failures made visible across admin and monitoring UI: the admin version check no longer claims “up to date” when GitHub is unreachable; the monitoring page no longer swallows incidents/maintenance load errors; GeoLite2/IPsum unavailability warns once per outage instead of spamming every lookup
- API-key
last_usedwrite amplification on hot keys (#222): every authenticated request updatedapi_keys.last_used, producing ~100 updates/sec on a single row under load. The update is now debounced to at most once per 60s per key