Skip to content

Add wrap command for credential injection via HTTP proxy#93

Open
kamath wants to merge 1 commit intomainfrom
kamath/proxy-docs
Open

Add wrap command for credential injection via HTTP proxy#93
kamath wants to merge 1 commit intomainfrom
kamath/proxy-docs

Conversation

@kamath
Copy link
Contributor

@kamath kamath commented Mar 17, 2026

Summary

  • Introduces a new wrap command that runs arbitrary commands with credentials automatically injected via HTTP proxy
  • Supports granular access control with optional constraints on services, HTTP methods, paths, and token lifetime
  • Adds validation to ensure at least one host is provided in credential profiles
  • Improves type safety with explicit WebAssembly import types
  • Enhances JSON parsing robustness in HTTP requests

Test plan

  • Wrap command spawns child processes correctly with inherited stdio
  • Loopback proxy URLs bypass token authentication when no restrictions are applied
  • Restricted tokens are minted and embedded in proxy URL when constraints are provided
  • Proxy environment variables are properly set on the spawned process
  • Signal handling forwards SIGINT and SIGTERM to child processes

- Add new wrap command to CLI that runs commands with credentials injected
- Update type definitions in biscuit.ts for cleaner WASM imports
- Make host field required in CreateCredProfileRequest interface
- Add validation to ensure at least one host is provided
- Fix JSON parsing in requestJson to handle edge cases
- Add comprehensive tests for wrap command functionality

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant