-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
NIFI-7187 #4086
Closed
Closed
NIFI-7187 #4086
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5b1bad7
NIFI-7187 adding missing version strings frmo accumulo bundle pom
joewitt edc5247
Removed Cat X JSON.org dep inclusion which seems to not be necessary
joewitt 937930a
NIFI-7187 updated a ton of easier/safer looking deps
joewitt b67235c
NIFI-7187 updated tika due to CVE
joewitt 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ | |
public class HTTPHeaderFiltersTest { | ||
|
||
@Test | ||
public void testCSPHeaderApplied() throws ServletException, IOException { | ||
public void testCSPHeaderApplied() throws ServletException, IOException, Exception { | ||
// Arrange | ||
|
||
FilterHolder originFilter = new FilterHolder(new ContentSecurityPolicyFilter()); | ||
|
@@ -43,14 +43,16 @@ public void testCSPHeaderApplied() throws ServletException, IOException { | |
FilterChain mockFilterChain = Mockito.mock(FilterChain.class); | ||
|
||
// Action | ||
originFilter.start(); | ||
originFilter.initialize(); | ||
originFilter.getFilter().doFilter(mockRequest, mockResponse, mockFilterChain); | ||
|
||
// Verify | ||
assertEquals("frame-ancestors 'self'", mockResponse.getHeader("Content-Security-Policy")); | ||
} | ||
|
||
@Test | ||
public void testCSPHeaderAppliedOnlyOnce() throws ServletException, IOException { | ||
public void testCSPHeaderAppliedOnlyOnce() throws ServletException, IOException, Exception { | ||
// Arrange | ||
|
||
FilterHolder originFilter = new FilterHolder(new ContentSecurityPolicyFilter()); | ||
|
@@ -61,6 +63,8 @@ public void testCSPHeaderAppliedOnlyOnce() throws ServletException, IOException | |
FilterChain mockFilterChain = Mockito.mock(FilterChain.class); | ||
|
||
// Action | ||
originFilter.start(); | ||
originFilter.initialize(); | ||
originFilter.getFilter().doFilter(mockRequest, mockResponse, mockFilterChain); | ||
originFilter.getFilter().doFilter(mockRequest, mockResponse, mockFilterChain); | ||
|
||
|
@@ -70,7 +74,7 @@ public void testCSPHeaderAppliedOnlyOnce() throws ServletException, IOException | |
|
||
|
||
@Test | ||
public void testXFrameOptionsHeaderApplied() throws ServletException, IOException { | ||
public void testXFrameOptionsHeaderApplied() throws ServletException, IOException, Exception { | ||
// Arrange | ||
|
||
FilterHolder xfoFilter = new FilterHolder(new XFrameOptionsFilter()); | ||
|
@@ -81,14 +85,16 @@ public void testXFrameOptionsHeaderApplied() throws ServletException, IOExceptio | |
FilterChain mockFilterChain = Mockito.mock(FilterChain.class); | ||
|
||
// Action | ||
xfoFilter.start(); | ||
xfoFilter.initialize(); | ||
xfoFilter.getFilter().doFilter(mockRequest, mockResponse, mockFilterChain); | ||
|
||
// Verify | ||
assertEquals("SAMEORIGIN", mockResponse.getHeader("X-Frame-Options")); | ||
} | ||
|
||
@Test | ||
public void testHSTSHeaderApplied() throws ServletException, IOException { | ||
public void testHSTSHeaderApplied() throws ServletException, IOException, Exception { | ||
// Arrange | ||
|
||
FilterHolder hstsFilter = new FilterHolder(new StrictTransportSecurityFilter()); | ||
|
@@ -99,14 +105,16 @@ public void testHSTSHeaderApplied() throws ServletException, IOException { | |
FilterChain mockFilterChain = Mockito.mock(FilterChain.class); | ||
|
||
// Action | ||
hstsFilter.start(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm guessing this is needed due to API changes? seems relatively innocuous. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep is necessary due to some change in that class in jetty |
||
hstsFilter.initialize(); | ||
hstsFilter.getFilter().doFilter(mockRequest, mockResponse, mockFilterChain); | ||
|
||
// Verify | ||
assertEquals("max-age=31540000", mockResponse.getHeader("Strict-Transport-Security")); | ||
} | ||
|
||
@Test | ||
public void testXSSProtectionHeaderApplied() throws ServletException, IOException { | ||
public void testXSSProtectionHeaderApplied() throws ServletException, IOException, Exception { | ||
// Arrange | ||
|
||
FilterHolder xssFilter = new FilterHolder(new XSSProtectionFilter()); | ||
|
@@ -117,6 +125,8 @@ public void testXSSProtectionHeaderApplied() throws ServletException, IOExceptio | |
FilterChain mockFilterChain = Mockito.mock(FilterChain.class); | ||
|
||
// Action | ||
xssFilter.start(); | ||
xssFilter.initialize(); | ||
xssFilter.getFilter().doFilter(mockRequest, mockResponse, mockFilterChain); | ||
|
||
// Verify | ||
|
Oops, something went wrong.
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.
I've run into issues with caffeine API compatibility a while ago ( long enough that my prior experience may be totally invalid today ). Do you feel confident these won't cause any issues? I have some flows where I can try these changes out with my record paths ( most seem like they are already covered by unit tests ) -- so if you can resolve conflicts i'd be happy to take some cycles to try this out.
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.
no i have no confidence beyond what our tests offer