Skip to content

[Bug]: Multi tenat safety in vectordb #594

@MaojiaSheng

Description

@MaojiaSheng

Bug Description

当前 VikingVectorIndexBackend 存在多租户隔离设计缺陷。虽然实现了部分租户感知方法,但大量底层数据操作方法完全暴露且没有任何 account_id 强制过滤

Steps to Reproduce

coding review

Expected Behavior

与 multi-tenant-design.md 的对比
根据设计文档第 5.5 节:

查询过滤策略:

  • ROOT:无过滤
  • ADMIN:account_id = ctx.account_id
  • USER:account_id = ctx.account_id AND owner_space IN (...)
    但当前实现完全依赖调用方自觉,底层方法不执行任何过滤。

Actual Behavior

有各类鉴权漏洞

Minimal Reproducible Example

Error Logs

OpenViking Version

0.2.6

Python Version

3.12

Operating System

macOS

Model Backend

None

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions