From 3b26e3d187ee8c6c5ca1a86822a197aaa3152a20 Mon Sep 17 00:00:00 2001 From: suijlenm Date: Fri, 14 Jun 2019 08:16:09 +0200 Subject: [PATCH 1/5] [ISSUE-166] Add groupSearchFilter property to specify the filter used to list LDAP group membership --- CHANGELOG.md | 6 +++++- README.md | 1 + kafka-webview-ui/src/assembly/distribution/config.yml | 1 + .../kafka/webview/ui/configuration/LdapAppProperties.java | 8 ++++++++ .../kafka/webview/ui/configuration/SecurityConfig.java | 1 + kafka-webview-ui/src/main/resources/config/base.yml | 1 + pom.xml | 2 +- 7 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a915e02c..7f3c463b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## 2.2.0 (03/20/2019) +## 2.2.21 (06/14/2019) +### New Fe + +#### New Features +- [ISSUE-166](https://github.com/SourceLabOrg/kafka-webview/issues/166) Add groupSearchFilter property to specify the filter used to list LDAP group membership. #### Bug fixes - [ISSUE-143](https://github.com/SourceLabOrg/kafka-webview/issues/143) Fix URLs for stream connections when running Kafka-Webview behind a reverse proxy with a URL Prefix. diff --git a/README.md b/README.md index dada7486..1f214938 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,7 @@ app: ## Where to find user group membership groupSearchBase: "ou=groups" groupRoleAttribute: "cn" + groupSearchfilter = "(uniqueMember={0})" ## How passwords are validated, must implement PasswordEncoder interface passwordEncoderClass: "org.springframework.security.crypto.password.LdapShaPasswordEncoder" diff --git a/kafka-webview-ui/src/assembly/distribution/config.yml b/kafka-webview-ui/src/assembly/distribution/config.yml index 0ff2baa3..51af302c 100644 --- a/kafka-webview-ui/src/assembly/distribution/config.yml +++ b/kafka-webview-ui/src/assembly/distribution/config.yml @@ -46,6 +46,7 @@ app: ## Where to find user group membership groupSearchBase: "ou=groups" groupRoleAttribute: "cn" + groupSearchFilter: "(uniqueMember={0})" ## How passwords are validated, must implement PasswordEncoder interface passwordEncoderClass: "org.springframework.security.crypto.password.LdapShaPasswordEncoder" diff --git a/kafka-webview-ui/src/main/java/org/sourcelab/kafka/webview/ui/configuration/LdapAppProperties.java b/kafka-webview-ui/src/main/java/org/sourcelab/kafka/webview/ui/configuration/LdapAppProperties.java index cc1c60e2..46f9e53d 100644 --- a/kafka-webview-ui/src/main/java/org/sourcelab/kafka/webview/ui/configuration/LdapAppProperties.java +++ b/kafka-webview-ui/src/main/java/org/sourcelab/kafka/webview/ui/configuration/LdapAppProperties.java @@ -57,6 +57,9 @@ public class LdapAppProperties { @Value("${app.user.ldap.groupRoleAttribute:}") private String groupRoleAttribute; + @Value("${app.user.ldap.groupSearchFilter:(uniqueMember={0})}") + private String groupSearchFilter; + /** * Ldap server url. */ @@ -108,6 +111,10 @@ public String getGroupSearchBase() { return groupSearchBase; } + public String getGroupSearchFilter() { + return groupSearchFilter; + } + public String getUrl() { return url; } @@ -159,6 +166,7 @@ public String toString() { + ", userDnPattern='" + userDnPattern + '\'' + ", groupSearchBase='" + groupSearchBase + '\'' + ", groupRoleAttribute='" + groupRoleAttribute + '\'' + + ", groupSearchFilter='" + groupSearchFilter + '\'' + ", url='" + url + '\'' + ", passwordAttribute='" + passwordAttribute + '\'' + ", passwordEncoderClass='" + passwordEncoderClass + '\'' diff --git a/kafka-webview-ui/src/main/java/org/sourcelab/kafka/webview/ui/configuration/SecurityConfig.java b/kafka-webview-ui/src/main/java/org/sourcelab/kafka/webview/ui/configuration/SecurityConfig.java index 1740009e..82449a45 100644 --- a/kafka-webview-ui/src/main/java/org/sourcelab/kafka/webview/ui/configuration/SecurityConfig.java +++ b/kafka-webview-ui/src/main/java/org/sourcelab/kafka/webview/ui/configuration/SecurityConfig.java @@ -147,6 +147,7 @@ private void setupLdapUserAuthentication(final AuthenticationManagerBuilder auth .userDnPatterns(ldapAppProperties.getUserDnPattern()) .groupRoleAttribute(ldapAppProperties.getGroupRoleAttribute()) .groupSearchBase(ldapAppProperties.getGroupSearchBase()) + .groupSearchFilter(ldapAppProperties.getGroupSearchFilter()) .contextSource() .url(ldapAppProperties.getUrl()) .managerDn(managerDn) diff --git a/kafka-webview-ui/src/main/resources/config/base.yml b/kafka-webview-ui/src/main/resources/config/base.yml index f383b192..d763826d 100644 --- a/kafka-webview-ui/src/main/resources/config/base.yml +++ b/kafka-webview-ui/src/main/resources/config/base.yml @@ -59,6 +59,7 @@ app: userDnPattern: "uid={0},ou=people" groupSearchBase: "ou=groups" groupRoleAttribute: "cn" + groupSearchFilter: "(uniqueMember={0})" passwordAttribute: "userPassword" passwordEncoderClass: "org.springframework.security.crypto.password.LdapShaPasswordEncoder" adminGroups: "" diff --git a/pom.xml b/pom.xml index fc19c365..08f022b4 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.sourcelab kafka-webview pom - 2.2.0 + 2.2.1 From 025a01debb75fb068876591522fea58129529b83 Mon Sep 17 00:00:00 2001 From: suijlenm Date: Fri, 14 Jun 2019 08:52:20 +0200 Subject: [PATCH 2/5] [ISSUE-166] Add groupSearchFilter property to specify the filter used to list LDAP group membership --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f3c463b..71833256 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,11 +3,18 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## 2.2.21 (06/14/2019) -### New Fe #### New Features - [ISSUE-166](https://github.com/SourceLabOrg/kafka-webview/issues/166) Add groupSearchFilter property to specify the filter used to list LDAP group membership. +## 2.2.0 (03/20/2019) + +#### Bug fixes +- [ISSUE-143](https://github.com/SourceLabOrg/kafka-webview/issues/143) Fix URLs for stream connections when running Kafka-Webview behind a reverse proxy with a URL Prefix. + +#### New Features +- [ISSUE-142](https://github.com/SourceLabOrg/kafka-webview/issues/142) Ability to search various datatables within the Cluster Explorer section of the application. + #### Bug fixes - [ISSUE-143](https://github.com/SourceLabOrg/kafka-webview/issues/143) Fix URLs for stream connections when running Kafka-Webview behind a reverse proxy with a URL Prefix. From a0eaacfcfed135a6ce4700b5f097f00d91c9342f Mon Sep 17 00:00:00 2001 From: suijlenm Date: Fri, 14 Jun 2019 08:53:11 +0200 Subject: [PATCH 3/5] [ISSUE-166] Add groupSearchFilter property to specify the filter used to list LDAP group membership --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71833256..1795a921 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## 2.2.21 (06/14/2019) +## 2.2.1 (06/14/2019) #### New Features - [ISSUE-166](https://github.com/SourceLabOrg/kafka-webview/issues/166) Add groupSearchFilter property to specify the filter used to list LDAP group membership. From b8e561def7fbe6add94577e01dabcd5e389356f4 Mon Sep 17 00:00:00 2001 From: suijlenm Date: Fri, 14 Jun 2019 09:02:18 +0200 Subject: [PATCH 4/5] Added dist to travisci config (https://travis-ci.community/t/oracle-jdk-11-and-10-are-pre-installed-not-the-openjdk-builds/785/16) --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 5da10f8c..cee13bb0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: java sudo: false +dist: trusty jdk: - oraclejdk8 cache: From c8a829584dd9bc0f4ba595268847d25cf3ca9b94 Mon Sep 17 00:00:00 2001 From: suijlenm Date: Fri, 14 Jun 2019 09:04:57 +0200 Subject: [PATCH 5/5] Forgot to update the various POM versions --- dev-cluster/pom.xml | 4 ++-- kafka-webview-plugin/pom.xml | 2 +- kafka-webview-ui/pom.xml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dev-cluster/pom.xml b/dev-cluster/pom.xml index fb763b3f..eb55a81c 100644 --- a/dev-cluster/pom.xml +++ b/dev-cluster/pom.xml @@ -5,12 +5,12 @@ kafka-webview org.sourcelab - 2.2.0 + 2.2.1 4.0.0 dev-cluster - 2.2.0 + 2.2.1 diff --git a/kafka-webview-plugin/pom.xml b/kafka-webview-plugin/pom.xml index 82b4ad29..925750f4 100644 --- a/kafka-webview-plugin/pom.xml +++ b/kafka-webview-plugin/pom.xml @@ -5,7 +5,7 @@ org.sourcelab kafka-webview - 2.2.0 + 2.2.1 4.0.0 kafka-webview-plugin diff --git a/kafka-webview-ui/pom.xml b/kafka-webview-ui/pom.xml index b7bbc0bd..31580802 100644 --- a/kafka-webview-ui/pom.xml +++ b/kafka-webview-ui/pom.xml @@ -5,11 +5,11 @@ kafka-webview org.sourcelab - 2.2.0 + 2.2.1 4.0.0 kafka-webview-ui - 2.2.0 + 2.2.1 Kafka WebView UI