From 3753df49a66e97326704160ee91fd0a0d012550c Mon Sep 17 00:00:00 2001 From: Evgeny Petrushevsky Date: Wed, 30 Aug 2023 10:29:36 +0200 Subject: [PATCH] BE: Fix cognito roles extractor regression (#4171) Co-authored-by: Evgeny Petrushevsky --- .../ui/service/rbac/extractor/CognitoAuthorityExtractor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/service/rbac/extractor/CognitoAuthorityExtractor.java b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/service/rbac/extractor/CognitoAuthorityExtractor.java index 67bcba69a2d7..58ac063bab36 100644 --- a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/service/rbac/extractor/CognitoAuthorityExtractor.java +++ b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/service/rbac/extractor/CognitoAuthorityExtractor.java @@ -59,8 +59,8 @@ public Mono> extract(AccessControlService acs, Object value, Map s.getProvider().equals(Provider.OAUTH_COGNITO)) .filter(s -> s.getType().equals("group")) - .anyMatch(subject -> Stream.of(groups) - .map(Object::toString) + .anyMatch(subject -> groups + .stream() .anyMatch(cognitoGroup -> cognitoGroup.equals(subject.getValue())) )) .map(Role::getName)