RBAC (api/internal/authz) is live on /query and /dashboards, backed by a new enterprise/ module (session issuance, audit logging, RBAC storage, OIDC/SAML protocol wiring) that core never imports -- only calls over HTTP. Found and fixed a real cross-tenant vulnerability in dashboards (no tenant_id filtering at all) while writing the threat model doc. Two things are explicitly NOT done, documented rather than hidden: tenant isolation for log data itself (/query still shares one ClickHouse connection and Tantivy index across every tenant -- RBAC controls who can query, not what a query can see), and human SSO login (protocol wiring exists, no HTTP handler calls it yet). See docs/security/threat-model.md and docs/phase-4-runbook.md. Also adds deploy/ (Go Operator + Helm chart, validated offline only -- no cluster was reachable in this environment).
8 lines
525 B
SQL
8 lines
525 B
SQL
-- The 'default' tenant's single data source, pointing at the one
|
|
-- ClickHouse database ("sentry") and Tantivy index every Phase 0-3
|
|
-- deployment already uses -- see api/internal/config's CLICKHOUSE_DATABASE
|
|
-- default and search's index path default.
|
|
INSERT INTO data_sources (id, tenant_id, name, clickhouse_database_name, tantivy_index_path)
|
|
SELECT '00000000-0000-0000-0000-000000000001', 'default', 'default', 'sentry', '/var/lib/sentry-search'
|
|
WHERE NOT EXISTS (SELECT 1 FROM data_sources WHERE tenant_id = 'default')
|