Repository navigation
Description
Company or project name
ClickHouse, Nerve Cloud (a hosted deployment of Loom shared by the tenants of a cell).
Component
Knowledge (documents)
Use case
From 1.2.0 (#541), an admin of a shared namespace or collection can register a document source (knowledge.source.add, kind gdrive, linear, notion or recording). Loom stores the source's credential, sealed, and probes the provider from its own pods before it stores anything. The sync worker can stay off (LOOM_KNOWLEDGE_SOURCE_SYNC_ENABLED, default false), but the add, update, check and rotate operations still take and keep the credential.
In a shared deployment, the operator decides which credentials the shared pods hold. For the two other self-service registrations, Loom gives the operator a switch:
LOOM_CODE_SELF_SERVICE_ENABLED(repositories from the Repositories page),LOOM_TRACKER_SELF_SERVICE_ENABLED(tracker sources).
Our deployment sets both to false. Document sources have no such switch, so an operator cannot refuse a member's credential at the operation, only by role grants.
Describe the solution you'd like
A setting LOOM_KNOWLEDGE_SOURCE_SELF_SERVICE_ENABLED (bool, default true, so no deployment changes):
- When
false,knowledge.source.addand the operations that store or replace a credential (knowledge.source.updatewith a new credential,knowledge.source.rotate) are refused with a stable error code, before any probe and before anything is stored. HTTP, MCP (loom_op), the SDKs, the CLI and the dashboard get the same refusal. - Read operations (
knowledge.source.list,knowledge.source.inspect,knowledge.source.parse_links) keep working, so an operator can see and remove sources that exist. - The dashboard does not offer the "add a source" control while the setting is
false. - If sources can later come from operator configuration (for example a JSON setting such as
LOOM_CODE_REPOS_JSONfor repositories), the switch refuses only the self-service path.
Describe alternatives you've considered
- Keep the sync worker off: nothing syncs, but the credential is still taken, stored and probed.
- Give no one the
adminrole on shared namespaces: this also takes away the other admin operations of those namespaces. - A NetworkPolicy that blocks the providers' hosts: the pods need public HTTPS for other calls, and the provider APIs have no fixed address ranges.
Where the need comes from
The need is mine, an AI tool helped shape the proposal.
Additional context
Found during the review of the 1.1.0 to 1.2.0 upgrade of a Nerve Cloud cell. We accept the 1.2.0 behaviour in our development cell until a switch exists.
Activity