diff --git a/api/src/main/java/io/kafbat/ui/service/rbac/extractor/RbacLdapAuthoritiesExtractor.java b/api/src/main/java/io/kafbat/ui/service/rbac/extractor/RbacLdapAuthoritiesExtractor.java index 3282ab1e2..4460655ed 100644 --- a/api/src/main/java/io/kafbat/ui/service/rbac/extractor/RbacLdapAuthoritiesExtractor.java +++ b/api/src/main/java/io/kafbat/ui/service/rbac/extractor/RbacLdapAuthoritiesExtractor.java @@ -16,6 +16,8 @@ @Slf4j public class RbacLdapAuthoritiesExtractor extends NestedLdapAuthoritiesPopulator { + private static final Set SUPPORTED_PROVIDERS = Set.of(Provider.LDAP, Provider.LDAP_AD); + private final AccessControlService acs; public RbacLdapAuthoritiesExtractor(ApplicationContext context, @@ -36,7 +38,7 @@ protected Set getAdditionalRoles(DirContextOperations user, St .stream() .filter(r -> r.getSubjects() .stream() - .filter(subject -> subject.getProvider().equals(Provider.LDAP)) + .filter(subject -> SUPPORTED_PROVIDERS.contains(subject.getProvider())) .filter(subject -> subject.getType().equals("group")) .anyMatch(subject -> ldapGroups.contains(subject.getValue())) )