Proposal: a local authenticated API proxy (datumctl api proxy)#246
Draft
scotwells wants to merge 4 commits into
Draft
Proposal: a local authenticated API proxy (datumctl api proxy)#246scotwells wants to merge 4 commits into
scotwells wants to merge 4 commits into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <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.
What this is
An enhancement proposal for
datumctl api proxy— a local, loopback-only HTTP proxy that forwards every request to the Datum Cloud API endpoint of the user's datumctl session, injecting a valid bearer token and transparently refreshing it. Any local tool can then talk to the platform with zero token plumbing:This PR contains only the design document (
docs/proposals/datumctl-api-proxy/README.md), following the same proposal conventions as the plugin-marketplace enhancement.Why it exists
API_URL=http://127.0.0.1:8001and datumctl owns auth and refresh for the whole dev session.curlagainst localhost instead of copy-pasting tokens that expire mid-investigation.Key design positions the doc takes
--project/--organizationre-base the proxy at one control plane for short URLs. Scope is never silently inherited from the active context.Authorizationalways stripped, tokens never logged, raw tokens never served over HTTP.datumctl auth switchnever repoints a running proxy), machine-readable readiness contract, actionable 502s (never a fake 401) when the local session dies.Review focus
The design decisions most worth reviewer eyes — a bare invocation never inherits the active context (production-path parity wins), 127.0.0.1-only binding, Unix-socket mode as the first fast-follow, and never retrying an upstream 401 — are each stated with their rationale in the section they belong to.
Companion implementation PR: #247.
🤖 Generated with Claude Code