Repository navigation
fix: enforce GitHub auth consistently across locations (PTFE-3620) - #227
Merged
Merged
Conversation
|
- Run presign/redirect and find_build handlers in the content phase so github_access.lua (access phase) runs before they end the request. - Match upload-restricted paths on the decoded URI instead of the raw request_uri. - Keep the /github/scality/<repo>/ alias confined to GET/HEAD reads under /download/: let nginx re-escape the rewritten URI, capture the repo name before the method check, and restrict it to repo name characters since it is copied into the Script-Name header. - Add end-to-end regression tests.
matthiasL-scality
force-pushed
the
PTFE-3620/harden-auth
branch
from
October 20, 2026 08:22
430378d to
a49b908
Compare
|
LGTM |
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
Hardens how GitHub authentication and upload restrictions apply across nginx locations. Tracked in PTFE-3620; details are in the ticket.
latest/last_success/last_failure) now run in the content phase, aftergithub_access.lua./github/scality/<repo>/alias is limited to GET/HEAD reads under/download/.Review focus
conf/nginx.conf.template: therewrite_by_lua_file→content_by_lua_fileswitch for the six affected locations, and the reworked/github/scality/alias.lua/github_access.lua:restriction_checknow usesngx.var.uri.Testing
tests/end2end/test_auth_bypass.py.