-
Notifications
You must be signed in to change notification settings - Fork 73
[Docs]: Missing Documentation for INTERNAL_RAG_TOKEN Protected Endpoint Model #579
Copy link
Copy link
Open
Labels
backendExpress or API gateway workExpress or API gateway workbugSomething isn't workingSomething isn't workingdocsDocumentation onlyDocumentation onlydocumentationImprovements or additions to documentationImprovements or additions to documentationfeatureA new feature or improvementA new feature or improvementfixA targeted fix or cleanupA targeted fix or cleanupfrontendFrontend-related workFrontend-related workrag-serviceFastAPI / model service workFastAPI / model service worktype:docstype:security
Description
Activity
Metadata
Metadata
Assignees
Labels
backendExpress or API gateway workExpress or API gateway workbugSomething isn't workingSomething isn't workingdocsDocumentation onlyDocumentation onlydocumentationImprovements or additions to documentationImprovements or additions to documentationfeatureA new feature or improvementA new feature or improvementfixA targeted fix or cleanupA targeted fix or cleanupfrontendFrontend-related workFrontend-related workrag-serviceFastAPI / model service workFastAPI / model service worktype:docstype:security
Summary
Description
rag-service/main.pydefines two protection mechanisms — an exact-match set (PROTECTED_RAG_PATHS) and a prefix set (PROTECTED_RAG_PREFIXES) — that gate service-to-service access via theX-Internal-Tokenheader. However, neitherREADME.md,.env.example, nor any inline documentation explains:INTERNAL_RAG_TOKENis absent (503 is returned, but this is only discoverable by reading the middleware source)./ask/is automatically protected, while a new top-level route (e.g./ask-v2) is not — operators extending the API have no way to discover this without readinginternal_auth_middleware.docker-compose.ymldoes not bind the RAG service port to localhost only, so a developer standing up the stack locally exposes port 5000 publicly on their machine with no documentation warning.Affected Files
README.md— no section on service-to-service auth or port exposure.env.example—INTERNAL_RAG_TOKENlisted but not explainedrag-service/main.pylines 556–603 (PROTECTED_RAG_PATHS,PROTECTED_RAG_PREFIXES,internal_auth_middleware)docker-compose.yml— RAG service port bindingSteps to reproduce
N/A
Expected behavior
N/A
Actual behavior
N/A
Additional context
No response