Transparent mitm websocket#123
Open
suhjohn wants to merge 7 commits intoInfisical:mainfrom
Open
Conversation
|
💬 Discussion in Slack: #pr-review-agent-vault-123-transparent-mitm-websocket Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel. |
Author
|
@dangtony98 would appreciate your review. bit of a clanker implementation but I needed WS support. Would not care if you guys officially implemented a version of it |
Contributor
|
Wow this is awesome @suhjohn. Will check out this PR and get this in the next day! Great feature! |
Author
|
Updated this PR with the two fixes I had made in
Validated locally with: go test ./cmd ./internal/pidfile ./internal/mitm |
d1e9f41 to
1202653
Compare
Author
|
Updated PR head to 4b6996b. Changes in latest commit:
Validation:
|
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
Adds transparent MITM WebSocket support so Agent Vault can proxy
wss://API calls while still injecting vault-managed credentials and hiding raw secrets from the agent.Changes:
Upgrade: websocketrequests in the MITM forwarding path101 Switching Protocols, then pipe raw frames bidirectionallyexamples/daytona-openai-realtime, a minimal Daytona + Agent Vault + OpenAI Realtime example with nested locked container egressType of change
Test plan
make test)Verification run:
go test ./internal/mitm ./internal/brokercore -count=1go test ./... -count=1npm ciinexamples/daytona-openai-realtimenode --check examples/daytona-openai-realtime/run.mjsManual Daytona + OpenAI Realtime test:
docker:28.3.3-dindsandboxOPENAI_API_KEYonly in Agent VaultOPENAI_API_KEY=dummy-agent-visible-key14321and14322wss://api.openai.com/v1/realtime?model=gpt-realtimethrough Agent VaultSecurity checklist
Security notes:
AuthorizationandProxy-Authorizationare stripped before upstream dial.101response is sanitized before forwarding.