Skip to content

Conversation

@Ian-Nara
Copy link
Contributor

@Ian-Nara Ian-Nara commented Dec 2, 2025

No description provided.

@Ian-Nara Ian-Nara changed the base branch from main to ian-UID2-6146-update-traffic-calculator-to-hardcoded-baseline December 2, 2025 06:38
…seline' into ian-UID2-6151-add-traffic-filter-class
@Ian-Nara Ian-Nara marked this pull request as ready for review December 2, 2025 06:47
@Ian-Nara Ian-Nara force-pushed the ian-UID2-6151-add-traffic-filter-class branch from 860e164 to 458d70a Compare December 2, 2025 09:11
}
}

public boolean isBlacklisted(SqsParsedMessage message) {
Copy link
Contributor

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 {
Copy link
Contributor

@caroline-ttd caroline-ttd Dec 4, 2025

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 {
Copy link
Contributor

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");
Copy link
Contributor

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?

@Ian-Nara Ian-Nara closed this Dec 5, 2025
@Ian-Nara Ian-Nara reopened this Dec 5, 2025
…seline' into ian-UID2-6151-add-traffic-filter-class
@Ian-Nara Ian-Nara merged commit 8531ec5 into ian-UID2-6146-update-traffic-calculator-to-hardcoded-baseline Dec 6, 2025
4 checks passed
@Ian-Nara Ian-Nara deleted the ian-UID2-6151-add-traffic-filter-class branch December 6, 2025 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants