Repository navigation
feat(agent-vault): ask the service's hook before attaching the credential - #500
Merged
Merged
Conversation
|
💬 Discussion in Slack: #pr-review-cli-500-feat-agent-vault-ask-the-service-s-hook-before-attaching-the-c Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel. |
Contributor
Contributor
[Medium impact] The update appears safe to merge; no blocking issue remains.
|
6 of 11 tasks
…res, hook fixes from review
…direct, without the target
scott-ray-wilson
left a comment
Contributor
There was a problem hiding this comment.
Review of the proxy side of hooks, paired with Infisical/infisical#9408. Four correctness comments and two cleanups (marked as such).
…sals, share batch, text-cut and Retry-After helpers
…e agent's own Accept header
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.
Description 📣
The proxy now asks a service's hook before it attaches the credential, and only sends the request on if the hook allows it. Companion to Infisical/infisical#9408, which adds hooks to services and sends them on
/resolvehook.go: signs each call with Standard Webhooks headers (webhook-id,webhook-timestamp,webhook-signature: v1,<base64>) plusIdempotency-Key, so Go can resend on a pooled connection the hook server closed. 3 s timeout, no redirects,Proxy: nil, answer capped at 64 KB,decisionmust be exactlyallowordenyhook_deniedcarrying the hook's message, failure a 503hook_failedwithRetry-After: 5. MCPtools/callgets a tool result withisError: true, so clients pass the message to the model, and other MCP requests get a JSON-RPC errorregisterNativeand before the tunnel opens.connectnow reads refusals up to 8 KBscheme://hostonly) and into the session log record; deny counts asblocked, failure aserrorType ✨
Tests 🛠️
# Here's some code block to paste some code snippetspackages/cmd/testdata/command_surface.json