Repository navigation
fix: restore knowledge base API key access - #10814
Lycorius03 wants to merge 2 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. An API key explicitly granted kb can now read, import, modify, and delete knowledge bases and their documents or chunks. Reverting removes that access for future requests, but it cannot undo data already exposed or deleted.
|
@RC-CHN This PR is ready for review. Could you please review the knowledge-base scope fix, or route it to the appropriate maintainer? The current head is I cannot add a formal reviewer request with my repository permissions, so I am requesting review here. |
Knowledge-base endpoints require the
kbscope, but API keys could neither be granted that scope nor select it in the dashboard. Registerkb, add the localized scope option, and use the existing scope dependency so all 16 knowledge-base operations expose their runtime OpenAPI permissions correctly. Regenerate the public specification and English/Chinese scope references.The change is limited to knowledge-base access. Existing explicitly scoped keys keep their stored permissions; keys must include
kbto access these endpoints. Administrative scope behavior is unchanged.Related work: #10801 already addresses the backend registry. This patch also covers the dashboard picker, runtime OpenAPI metadata, public documentation, and request-level regressions.
Validation:
kb-scoped API key returned HTTP 400 before the fix.scopes: ["kb"]payload with mocked API responses.Closes #10322.
Summary by Sourcery
Restore API-key access to knowledge-base endpoints by registering and exposing the
kbscope across authorization, dashboard, OpenAPI metadata, and documentation.New Features:
kbAPI-key scope for knowledge-base access and expose it in the dashboard scope picker.Bug Fixes:
Enhancements:
Documentation:
kbpermission and its access semantics in English and Chinese developer references.Tests: