Skip to content

Commit 42e9951

Browse files
BlueIcarusCrim
authored andcommitted
Sp/ldap group search filter property (#167)
* [ISSUE-166] Add groupSearchFilter property to specify the filter used to list LDAP group membership * [ISSUE-166] Add groupSearchFilter property to specify the filter used to list LDAP group membership * [ISSUE-166] Add groupSearchFilter property to specify the filter used to list LDAP group membership * Added dist to travisci config (https://travis-ci.community/t/oracle-jdk-11-and-10-are-pre-installed-not-the-openjdk-builds/785/16) * Forgot to update the various POM versions
1 parent 3836674 commit 42e9951

File tree

6 files changed

+19
-0
lines changed

6 files changed

+19
-0
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
44

55
## 2.3.0 (UNRELEASED)
66
#### New Features
7+
- [ISSUE-166](https://github.com/SourceLabOrg/kafka-webview/issues/166) Add groupSearchFilter property to specify the filter used to list LDAP group membership.
78
- [MultiThreaded Consumer](https://github.com/SourceLabOrg/kafka-webview/pull/170) Add multi-threaded kafka consumer.
89

910
Previously a single consumer instance was used when paging through messages from a topic. Each partition was consumed sequentially in order to provide consistent results on each page. For topics with a large number of partitions this could take considerable time.
@@ -38,6 +39,12 @@ If you run into issues, you can disable the new implementation and revert to the
3839
#### New Features
3940
- [ISSUE-142](https://github.com/SourceLabOrg/kafka-webview/issues/142) Ability to search various datatables within the Cluster Explorer section of the application.
4041

42+
#### Bug fixes
43+
- [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.
44+
45+
#### New Features
46+
- [ISSUE-142](https://github.com/SourceLabOrg/kafka-webview/issues/142) Ability to search various datatables within the Cluster Explorer section of the application.
47+
4148
## 2.1.4 (02/19/2019)
4249

4350
- [ISSUE-136](https://github.com/SourceLabOrg/kafka-webview/issues/136) Fix URLs when running Kafka-Webview behind a reverse proxy with a URL prefix. You can configure Kafka WebView by setting the following configuration option in your config.yml file:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ app:
166166
## Where to find user group membership
167167
groupSearchBase: "ou=groups"
168168
groupRoleAttribute: "cn"
169+
groupSearchfilter = "(uniqueMember={0})"
169170
170171
## How passwords are validated, must implement PasswordEncoder interface
171172
passwordEncoderClass: "org.springframework.security.crypto.password.LdapShaPasswordEncoder"

kafka-webview-ui/src/assembly/distribution/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ app:
5454
## Where to find user group membership
5555
groupSearchBase: "ou=groups"
5656
groupRoleAttribute: "cn"
57+
groupSearchFilter: "(uniqueMember={0})"
5758

5859
## How passwords are validated, must implement PasswordEncoder interface
5960
passwordEncoderClass: "org.springframework.security.crypto.password.LdapShaPasswordEncoder"

kafka-webview-ui/src/main/java/org/sourcelab/kafka/webview/ui/configuration/LdapAppProperties.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ public class LdapAppProperties {
5757
@Value("${app.user.ldap.groupRoleAttribute:}")
5858
private String groupRoleAttribute;
5959

60+
@Value("${app.user.ldap.groupSearchFilter:(uniqueMember={0})}")
61+
private String groupSearchFilter;
62+
6063
/**
6164
* Ldap server url.
6265
*/
@@ -108,6 +111,10 @@ public String getGroupSearchBase() {
108111
return groupSearchBase;
109112
}
110113

114+
public String getGroupSearchFilter() {
115+
return groupSearchFilter;
116+
}
117+
111118
public String getUrl() {
112119
return url;
113120
}
@@ -159,6 +166,7 @@ public String toString() {
159166
+ ", userDnPattern='" + userDnPattern + '\''
160167
+ ", groupSearchBase='" + groupSearchBase + '\''
161168
+ ", groupRoleAttribute='" + groupRoleAttribute + '\''
169+
+ ", groupSearchFilter='" + groupSearchFilter + '\''
162170
+ ", url='" + url + '\''
163171
+ ", passwordAttribute='" + passwordAttribute + '\''
164172
+ ", passwordEncoderClass='" + passwordEncoderClass + '\''

kafka-webview-ui/src/main/java/org/sourcelab/kafka/webview/ui/configuration/SecurityConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ private void setupLdapUserAuthentication(final AuthenticationManagerBuilder auth
147147
.userDnPatterns(ldapAppProperties.getUserDnPattern())
148148
.groupRoleAttribute(ldapAppProperties.getGroupRoleAttribute())
149149
.groupSearchBase(ldapAppProperties.getGroupSearchBase())
150+
.groupSearchFilter(ldapAppProperties.getGroupSearchFilter())
150151
.contextSource()
151152
.url(ldapAppProperties.getUrl())
152153
.managerDn(managerDn)

kafka-webview-ui/src/main/resources/config/base.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ app:
6161
userDnPattern: "uid={0},ou=people"
6262
groupSearchBase: "ou=groups"
6363
groupRoleAttribute: "cn"
64+
groupSearchFilter: "(uniqueMember={0})"
6465
passwordAttribute: "userPassword"
6566
passwordEncoderClass: "org.springframework.security.crypto.password.LdapShaPasswordEncoder"
6667
adminGroups: ""

0 commit comments

Comments
 (0)