[bug] hero_indexer discards X-Hero-Context — every caller can hit every Tantivy DB #20
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_indexer#20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
hero_indexerparses theX-Hero-Contextheader but binds it to_-prefixed locals and never enforces it downstream. Every caller can read every Tantivy DB the indexer hosts. Same shape as the parallelhero_embedderissue.Source
crates/hero_indexer_server/src/main.rs:275-292— header parsed into_hero_context/_hero_claimsetc., never used.handlers.rs:42-66— request dispatch keys off DB name from request params, not from header.Why this matters
hero_indexeris a Tantivy-backed full-text (BM25) search service — sibling tohero_embedder's semantic engine. Multi-tenant deployments rely on per-context DB selection at the entry handler; today every caller can hit every DB on the same socket.Proposed fix
Same two-layer pattern as the
hero_embedderissue:Note: spec/dispatcher mismatch (separate issue)
docs/specs.mdadvertisesdoc.update,index.merge, aggregations, andsearch.explainthat are not inhandlers.rs:42-66. Filed as a separate docs issue.Severity
Medium-high. Same threat model as the embedder issue: filesystem-bound socket, but invalidates the per-context isolation claim.
Cross-refs
hero_embedderparallel issue (this session)hero_aibrokerparallel issue (this session)Spotted during docs_hero Phase 1 source-grounded read (session 52). Reconciliation memo:
memory/investigation_roadmap_reconciliation.md.