Repository navigation
Conversation
Plugins that read the host's admin API ask administrators to paste a full-access API key. Let the manifest declare the API key scopes it needs (host_api_scopes) instead: the host issues a key with exactly the approved scopes, and GetHostAPICredential returns it with the API base URL. The validator checks each scope's shape and rejects repeats. The scope vocabulary is the host's and stays open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adding GetHostAPICredential to the released RuntimeHost service changed its generated interfaces, so a host or plugin-side mock implementing them without embedding the Unimplemented type stopped compiling. Move it to a HostAPICredentials service that the host serves on the same connection, as docs/compatibility.md asks for new RPCs; a host without it answers UNIMPLEMENTED. Fix the permissions doc example, which used a nil credential on its error paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 27 minutes. View limit details
|
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
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. |
The field comment said older hosts ignore host_api_scopes. Silo hosts built before Silo-Server/silo-server#2502 parse a bare plugin binary's manifest strictly and compare the installed manifest with the live one including unknown fields, so they refuse to install or start a plugin that sets it. Scope the comment to that and note it in docs/compatibility.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
Parked as a draft. For now, an administrator can create a scoped API key on the API keys page and paste it into a plugin's settings. Plugin permissions and host-issued keys come back when plugins are isolated enough for approval to mean something. The host side, Silo-Server/silo-server#3549, is parked too. |
|
Closing this draft. Administrators can now create scoped API keys in Silo (Silo-Server/silo-server#3610), which covers what this was for, and the branch conflicts with main ( |
Problem
Plugins that read the host's admin API (active sessions, users, libraries) ask administrators to
paste a full-access API key into plugin settings. The key carries every scope, outlives the plugin,
and is stored as an ordinary setting.
Approach
The manifest declares
host_api_scopes. The host issues a key with exactly the scopes anadministrator approved, and
HostAPICredentials.GetHostAPICredentialreturns it with the API baseURL.
runtimehost.Client.HostAPICredentialwraps the call; it returnsErrHostAPINotGrantedwhennothing is approved and
ErrHostAPIUnsupportedon a host without the service.The RPC is its own
HostAPICredentialsservice on the runtime host connection, not a new method onRuntimeHost: a new method on a released service changes its generated interfaces and breaks mocksthat don't embed the Unimplemented type (
docs/compatibility.md).The validator checks each scope's shape and rejects repeats; the scope vocabulary belongs to the
host.
docs/permissions.mdexplains how a host derives an installation's permissions from itssubscriptions and scopes.
Compatibility and release
Additive: manifest field 14 and a new service. A host without the service answers UNIMPLEMENTED,
which the client reports as
ErrHostAPIUnsupported. A plugin that declareshost_api_scopesneedsa Silo server that includes Silo-Server/silo-server#2502: an older server refuses to install it
from a bare binary and won't start it from an archive, because it doesn't know the field (see
docs/compatibility.md).Related changes
buf generate.Validation
go test ./...,go vet ./...and every example build: pass.gofmt -l .lists onlypkg/pluginsdk/runtime/scan_source_test.go, which is unformatted onmainand not touched here.
bufleaves it unchanged.make protoitself stopsat its
protoccheck on this machine, though generation doesn't useprotoc.admin:monitor:readgot no key until anadministrator approved; its key then read active sessions (200) and was refused on API keys (403).
AI Disclosure
RPC to
RuntimeHost, which breaks existing implementers; it moved to its own service. It alsofixed a docs example that returned a nil credential on its error paths.
🤖 Generated with Claude Code