feat: add enable/disable toggle for broker services#93
Merged
dangtony98 merged 1 commit intomainfrom Apr 20, 2026
Merged
Conversation
Operators can now toggle a service off while preserving its auth
configuration (host, credential wiring, description). Disabled services
return `403 service_disabled` at both the explicit /proxy and MITM
ingress paths, distinct from 403 "forbidden" for unmatched hosts so
agents can differentiate configured-but-off from not-configured.
Surface area:
- CLI: `agent-vault vault service enable|disable <host>`, plus
`--disabled` on `service add` for disabled-at-creation.
- HTTP: `PATCH /v1/vaults/{name}/services/{host}` (admin-only).
- Proposals: agents can propose enable/disable via set-action with
`enabled` alone; merge preserves existing Auth.
- UI: new "Enabled" column on the services table with optimistic
toggle, and an Enabled field in the add/edit modal.
New services default to enabled. Existing persisted services (no
`enabled` field in JSON) are treated as enabled for backwards compat.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, reopen this pull request to trigger a review.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
enabledflag; disabled services return403 service_disableddistinct from403 forbiddenfor unmatched hosts, at both the explicit /proxy and MITM ingress paths.service enable|disable, plus--disabledonservice add), and HTTP (PATCH /v1/vaults/{name}/services/{host}admin-only).setproposal that carries onlyenabled— merge preserves the existing Auth config so toggles don't clobber credentials.Behavior notes
enabledfield in the stored JSON) are treated as enabled on load, so there's no migration and no behavior change at upgrade time.service_disablederror code so agents don't mistakenly create a new proposal when they hit a disabled host.Test plan
make test— new tests forErrServiceDisabledinject gate (including passthrough case), enable-only proposal validation, and enable-only merge preserving Authmake build— binary + embedded web bundletsc --noEmiton web package./agent-vault:service disable <host>→ same curl returns 403 with{"error":"service_disabled"}, toggle back via UI → succeeds againservice add --host example.com --auth-type bearer --token-key EXAMPLE_TOKEN --disabled→service listshowsenabled: false, proxy returns 403 immediatelyHTTPS_PROXY=… curl https://<disabled-host>/…→ 403 surfaces on the MITM ingress toosetproposal withenabled: falseonly (no auth), approve → service is disabled without losing auth config🤖 Generated with Claude Code