feat: update egress proxy secrets on running instances#156
Draft
sjmiller609 wants to merge 2 commits intomainfrom
Draft
feat: update egress proxy secrets on running instances#156sjmiller609 wants to merge 2 commits intomainfrom
sjmiller609 wants to merge 2 commits intomainfrom
Conversation
Adds PUT /instances/{id}/env endpoint that replaces instance env vars
and atomically updates egress proxy header-inject rules, enabling
credential rotation without instance restart.
Changes:
- openapi.yaml: new PUT /instances/{id}/env endpoint
- lib/oapi/oapi.go: regenerated from spec
- lib/egressproxy: UpdateInjectRules() for in-place rule swap
- lib/instances: UpdateInstanceEnv() manager method
- cmd/api/api: handler wiring
- Tests: unit test for UpdateInjectRules, integration test for key rotation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✱ Stainless preview buildsThis PR will update the Edit this comment to update it. It will appear in the SDK's changelogs. ✅ hypeman-typescript studio · code · diff
✅ hypeman-openapi studio · code · diff
✅ hypeman-go studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
- Add UpdateInstanceEnv stub to mockInstanceManager in builds test
- Add PUT /instances/{id}/env scope mapping (InstanceWrite)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
PUT /instances/{id}/envendpoint for replacing instance env vars at runtimeegressproxy.Service.UpdateInjectRules()method for lightweight in-place rule swap (no iptables re-application)instances.Manager.UpdateInstanceEnv()method that validates credential bindings, persists metadata, and swaps proxy rulesTest plan
TestUpdateInjectRules— verifies in-memory rule swap and error on unregistered instanceTestEgressProxyRewritesHTTPSHeaders— rotates key mid-flight and verifies new key is injected while guest still sees mock value🤖 Generated with Claude Code