Skip to content

Commit

Permalink
Bug 1697602 Drop AET messages (#1600)
Browse files Browse the repository at this point in the history
Prerequisite for #1599
so we make sure that we drop any messages that might contain
`ecosystem_anon_id` which was considered sensitive under the deployed AET
design.
  • Loading branch information
jklukas committed Mar 15, 2021
1 parent 82c6e04 commit 0088d65
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Expand Up @@ -112,6 +112,9 @@ public static void scrub(Map<String, String> attributes, ObjectNode json)
.anyMatch(j -> j.textValue().startsWith("webIsolated="))) {
throw new MessageShouldBeDroppedException("1562011");
}
if ("account-ecosystem".equals(docType)) {
throw new MessageShouldBeDroppedException("1697602");
}

// Check for unwanted data; these messages aren't thrown out, but this class of errors will be
// ignored for most pipeline monitoring.
Expand Down
Expand Up @@ -219,6 +219,20 @@ public void testShouldScrubBhrBug1562011() throws Exception {
() -> MessageScrubber.scrub(attributes, ping));
}

@Test
public void testShouldScrubBug1697602() throws Exception {
final Map<String, String> attributes1 = ImmutableMap.<String, String>builder()
.put(Attribute.DOCUMENT_NAMESPACE, "telemetry")
.put(Attribute.DOCUMENT_TYPE, "account-ecosystem").build();
assertThrows(MessageShouldBeDroppedException.class,
() -> MessageScrubber.scrub(attributes1, Json.createObjectNode()));
final Map<String, String> attributes2 = ImmutableMap.<String, String>builder()
.put(Attribute.DOCUMENT_NAMESPACE, "firefox-accounts")
.put(Attribute.DOCUMENT_TYPE, "account-ecosystem").build();
assertThrows(MessageShouldBeDroppedException.class,
() -> MessageScrubber.scrub(attributes2, Json.createObjectNode()));
}

@Test
public void testBug1602844Affected() throws Exception {
Map<String, String> baseAttributes = ImmutableMap.<String, String>builder()
Expand Down

0 comments on commit 0088d65

Please sign in to comment.