Repository navigation
Conversation
…earer scheme case-insensitively
mfaferek93
reviewed
Nov 23, 2026
|
|
||
| // Returned before any section is built, so a section added later stays out of the reduced body. | ||
| if (serves_reduced_body(ctx_, req)) { | ||
| response.x_medkit_reduced = true; |
Collaborator
There was a problem hiding this comment.
Under require_auth_for: all, a peer that lists GET /api/v1/health now answers a missing or rejected aggregation.peer_auth_header with a reduced 200 instead of 401. PeerClient::check_health takes any 200 as healthy, so the peer shows online with no instance id while discovery and fan-out to it get 401. When the body has x-medkit-reduced: true, have check_health log that the credential was not accepted and mark the peer unhealthy if a protected read also returns 401, and add an aggregator test against a listed peer under both all and write.
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.
Pull Request
Summary
auth.public_routeslists routes a caller can reach without a token on a gateway that requires authentication. Each entry isMETHOD /pathand matches one route exactly. The list is empty by default.[""]is an empty list, as for the other string arrays.GET /api/v1/healthis listed, a caller without a valid token gets onlystatus,timestamp,warning_schema_version, an emptywarningsandx-medkit-reduced: true. A caller with a valid token gets the full body. This lets a liveness probe check a closed gateway.Bearerscheme name inAuthorizationis matched case-insensitively (RFC 7235).Breaking changes: none for an existing configuration, because the default list is empty.
Issue
Type
Testing
In a second shell:
A malformed entry stops the start:
Checklist