-
Bug
-
Resolution: Done
-
Major
-
2.5.2.Final
-
None
-
False
-
None
-
False
-
-
Filters.java
private Predicate<String> createDatabaseFilter() { var dbIncludeList = config.getDbIncludeList(); var dbExcludeList = config.getDbExcludeList(); return Optional.<Predicate<String>> empty() .or(() -> dbIncludeList.map(value -> includes(value, s -> s))) .or(() -> dbExcludeList.map(value -> excludes(value, s -> s))) .orElse((db) -> true); } private Predicate<CollectionId> createCollectionFilter() { var collectionIncludeList = config.getCollectionIncludeList(); var collectionExcludeList = config.getCollectionExcludeList(); final Predicate<CollectionId> collectionFilter = Optional.<Predicate<CollectionId>> empty() .or(() -> collectionIncludeList.map(list -> includes(list, CollectionId::namespace))) .or(() -> collectionExcludeList.map(list -> excludes(list, CollectionId::namespace))) .orElse((id) -> true) .and(this::isNotBuiltIn); // Create signal collection filter if specified and not included Optional<Predicate<CollectionId>> signalCollectionFilter = config.getSignalDataCollection() .map(CollectionId::parse) .filter(id -> !collectionFilter.test(id)) .map(id -> Predicates.includes(id.namespace(), CollectionId::namespace)); // Combine signal filter and collection filter return signalCollectionFilter.map(collectionFilter::or).orElse(collectionFilter); }
While this doesn't break anything it requires the elevated permissions on built-in mongo database (list collections).
No unexpected collections are read as they are always filter out by the collection filter.
- links to
-
RHEA-2024:139598 Red Hat build of Debezium 2.5.4 release