* Remove outdated documentation files: Quick Start Guide, Apache AGE Analysis, and Scratchpad. * Add multi-tenant testing strategy and ADR index documentation - Introduced ADR 008 detailing the multi-tenant testing strategy for the ./starter environment, covering compatibility and multi-tenant modes, testing scenarios, and implementation details. - Created a comprehensive ADR index (README.md) summarizing all architecture decision records related to the multi-tenant implementation, including purpose, key sections, and reading paths for different roles. * feat(docs): Add comprehensive multi-tenancy guide and README for LightRAG Enterprise - Introduced `0008-multi-tenancy.md` detailing multi-tenancy architecture, key concepts, roles, permissions, configuration, and API endpoints. - Created `README.md` as the main documentation index, outlining features, quick start, system overview, and deployment options. - Documented the LightRAG architecture, storage backends, LLM integrations, and query modes. - Established a task log (`2025-01-21-lightrag-documentation-log.md`) summarizing documentation creation actions, decisions, and insights.
1.4 KiB
1.4 KiB
Action Plan: Secure Tenant API
Problem
The endpoint GET /api/v1/tenants exposes a list of all tenants, which violates multi-tenant isolation principles. This endpoint allows any user (or unauthenticated attacker) to enumerate all customers, posing a significant security risk (Information Disclosure).
Goal
Remove public access to tenant listing. Ensure tenant management (listing) is restricted to administrators via a secure endpoint.
Steps
1. Audit & Verification
- Verify the current implementation of
GET /api/v1/tenants. - Confirm that
lightrag/api/routers/tenant_routes.pydoes NOT contain the list endpoint. - Confirm that
lightrag/api/routers/admin_routes.pycontains the list endpoint under/api/v1/admin/tenants. - Investigate why
GET /api/v1/tenantsis currently accessible (if it is).
2. Remediation
- Ensure
GET /api/v1/tenantsis removed or returns 404/403. - Ensure
GET /api/v1/admin/tenantsis accessible only to admins. - Verify
lightrag/api/lightrag_server.pyrouter mounting.
3. Testing
- Update
test_multitenant.shto:- Verify
GET /api/v1/tenantsreturns 404 or 403. - Verify
GET /api/v1/admin/tenantsworks (with admin auth). - Verify
GET /api/v1/tenants/meworks for tenant users.
- Verify
Success Criteria
GET /api/v1/tenantsis no longer accessible.- Tenant enumeration is only possible via the admin API.
- Multi-tenant isolation is preserved.