-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-23303 Add security headers to REST server/info page #843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9e32437
HBASE-23303. Added new HTTP filter to include missing security headers
anmolnar 3080054
HBASE-23303. Added configurable X-Frame-Options header
anmolnar b28af74
HBASE-23303. Use the same filter for both http and rest server for co…
anmolnar 519afd1
HBASE-23303. Added HSTS security header
anmolnar dfc3fdd
HBASE-23303. Checkstyle fixes
anmolnar ef700ce
HBASE-23303. Added new (last) security header: Content-Security-Policy
anmolnar fab1bf9
HBASE-23303. Reverted changes to ClickjackingPreventionFilter, create…
anmolnar 158d607
HBASE-23303. Checkstyle fix
anmolnar 19e9cb1
HBASE-23303. Added unit tests
anmolnar 47ec91b
HBASE-23303. Added unit tests to hbase-http project
anmolnar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can change it
Privateas this class is used internal only. It looks to me that the original classClickjackingPreventionFilterwas already used internal only. So I think it's okay to rename this class. What do you think? @petersomogyiThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to rename the class? Best if we don't then the patch can safely go back to shipping branches.
This seems like only sticking point. Otherwise patch looks nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LP(Config) is supposed to mean the class name is exposed in user configs. If the user can no longer specify which filters then it'd be fine to make it Private. Otherwise we'd need a layer of indirection so that folks don't give classnames.
I think it'd also be fine for this to go to shipping branches of we expressly checked for the old classname in configs and did the appropriate thing to put the same protection in place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rechecked the source code and I found that implementations of Servlet filters in the hbase project are basically LP(Config). It seems to me that we assume that the implementations are used from "hbase.rest.filter.classes". If so, we should not rename the class name or we need a layer of indirection as Sean mentioned.