Repository navigation
Conversation
Every /api request admin doesn't serve under scope "/api" is streamed to core unchanged on Finch (ADR 0004, amended by ADR 0008): both bodies streamed, hop-by-hop headers dropped, X-Forwarded-For appended, Bandit compression off. 502/504 in core's error shape, a separate long pool for uploads and exports, a maintenance flag, and an [:admin, :proxy, :request] telemetry span tagged with the core route template generated from docs/core-inventory/routes.json. In tests the proxy refuses to forward and marks the request unported (ADR 0007).
This branch has not been deployed
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.
Closes #343
Summary
AdminWeb.CoreApi.Proxysits in the endpoint right afterPlug.Telemetry(ADR 0004, amended by ADR 0008):X-Forwarded-Foris appended. Bandit compression is off for proxied responses, so core'scontent-encodingandcontent-lengthcome back unchanged.:route_timeoutsoverrides per route.[:admin, :proxy, :request]span carriesroute(unknownwhen no template matches),method,statusandbackend(coreoradmin).API_MAINTENANCE=trueenv var in prod.Evidence
The tests run real Bandit servers for both the proxy and a stub core:
mix precommit: 492 tests, 0 failures.credo --strict: no issues.Merge Danger
Door: two-way
Revert and redeploy. Nothing is persisted.
Blast Radius: all of
/api/apito admin, so the plug sees no production traffic until the cutover.backend_originmust point at core's private address (ADR 0004 cutover step 1). Otherwise requests loop from admin through the ALB back into admin.content-lengthortransfer-encoding. That is always true over HTTP/1.1, which is what the ALB is expected to use towards admin.