[AAP-64061] Add nginx log markers and remove direct routes for Controller#2099
Closed
TheRealHaoLiu wants to merge 1 commit intoansible:develfrom
Closed
Conversation
…ller Add map directives for X-Trusted-Proxy and X-DAB-JW-Token headers to nginx log_format to enable detection of direct component access vs gateway-proxied requests. Also add explicit error_log to stderr. Remove the redirect page configmap and all its references from web deployment template and install tasks, as direct access to controller should no longer be supported. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
Author
|
Closing — this PR combined nginx log markers and redirect page removal. Splitting into separate PRs. Nginx log markers: see new PR. |
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
Add nginx log markers for
X-Trusted-ProxyandX-DAB-JW-Tokenheaders to enabledetection of direct component access vs gateway-proxied requests in AAP 2.7.
Changes:
mapdirectives in nginx http block to detect presence ofX-Trusted-ProxyandX-DAB-JW-Tokenheaderslog_formatto append$trusted_proxy_presentand$dab_jwt_presentmarkerserror_log /dev/stderr warn;directiveThis is part of the broader effort to remove direct API access to platform components (ANSTRAT-1840).
The log markers enable the
aap-detect-direct-component-accesstool to identify requeststhat bypass the AAP gateway.
ISSUE TYPE
ADDITIONAL INFORMATION
Nginx log format before:
Nginx log format after:
The two new fields at the end will show:
trusted-proxy/-— whether the request has theX-Trusted-Proxyheader (set by gateway)dab-jwt/-— whether the request has theX-DAB-JW-Tokenheader (set by gateway)Requests showing
-for both markers indicate direct component access that bypasses the gateway.