Repository navigation
[LIVY-1096] Reject HTTP TRACE and TRACK with 405 on REST and Thrift HTTP - #572
Open
nileshrathi345 wants to merge 1 commit into
Open
nileshrathi345 wants to merge 1 commit into
nileshrathi345 wants to merge 1 commit into
Conversation
Add HttpTraceTrackFilter and register it on the Livy REST server and the Thrift HTTP endpoint so TRACE/TRACK requests return 405 Method Not Allowed.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #572 +/- ##
============================================
+ Coverage 69.03% 69.41% +0.37%
- Complexity 1231 1239 +8
============================================
Files 107 108 +1
Lines 6986 6925 -61
Branches 858 859 +1
============================================
- Hits 4823 4807 -16
+ Misses 1689 1639 -50
- Partials 474 479 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Add HttpTraceTrackFilter and register it on the Livy REST server and the Thrift HTTP endpoint so TRACE/TRACK requests return 405 Method Not Allowed.
What changes were proposed in this pull request?
Reject HTTP TRACE and TRACK requests with 405 (Method Not Allowed) on the Livy REST server and on the Thrift HTTP endpoint.
HttpTraceTrackFilter, a servlet filter that returns 405 for TRACE and TRACK in any letter case. All other methods pass through.LivyServerandThriftHttpCLIService. It is always on; there is no config flag.TRACEfrom the methods that skip the XSRF check inThriftHttpServlet, since TRACE no longer reaches the servlet.JIRA: LIVY-1096
How was this patch tested?
Added
HttpTraceTrackFilterSpecwith 9 unit tests:TrAcEreturn 405 and are not passed to the next filter.Was this patch authored or co-authored using generative AI tooling?
No