-
Notifications
You must be signed in to change notification settings - Fork 7
add traffic filter class #253
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
add traffic filter class #253
Conversation
…seline' into ian-UID2-6151-add-traffic-filter-class
860e164 to
458d70a
Compare
| } | ||
| } | ||
|
|
||
| public boolean isBlacklisted(SqsParsedMessage message) { |
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 probably need to change to deny list.
| } | ||
|
|
||
| @Test | ||
| public void testIsBlacklisted_atRangeBoundaries() throws Exception { |
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.
Probably deny list. Same as other test name
| } | ||
|
|
||
| @Test | ||
| public void testIsBlacklisted_nullClientIp() throws Exception { |
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.
When would a request not contain a client IP?
Should we log an error if no IP is present after processing the request? And set up an alert if there are too many?
| // log error and throw exception if rule is invalid | ||
| if (range.size() != 2 || ipAddresses.size() == 0 || range.get(1) - range.get(0) > 86400) { // range must be 24 hours or less | ||
| LOGGER.error("Invalid traffic filter rule: {}", ruleJson.encode()); | ||
| throw new MalformedTrafficFilterConfigException("Invalid traffic filter rule"); |
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.
Nitpick: maybe clarify that it must be 24 hours or less, so it’s clear why it’s invalid?
…seline' into ian-UID2-6151-add-traffic-filter-class
…seline' into ian-UID2-6151-add-traffic-filter-class
8531ec5
into
ian-UID2-6146-update-traffic-calculator-to-hardcoded-baseline
No description provided.