Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve doc for topics-filter-regexp #665

Merged
merged 1 commit into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,9 @@ Define groups with specific roles for your users
* `key:` a uniq key used as name if not specified
* ` name: group-name` Group identifier
* `roles`: Roles list for the group
* `attributes.topics-filter-regexp`: Regexp to filter topics available for current group
* `attributes.connects-filter-regexp`: Regexp to filter Connect tasks available for current group
* `attributes.consumer-groups-filter-regexp`: Regexp to filter Consumer Groups available for current group
* `attributes.topics-filter-regexp`: Regexp list to filter topics available for current group
* `attributes.connects-filter-regexp`: Regexp list to filter Connect tasks available for current group
* `attributes.consumer-groups-filter-regexp`: Regexp list to filter Consumer Groups available for current group


3 defaults group are available :
Expand Down Expand Up @@ -522,10 +522,16 @@ akhq:
roles: # roles for the group
- topic/read
attributes:
# Regexp to filter topic available for group
topics-filter-regexp: "test\\.reader.*"
connects-filter-regexp: "^test.*$"
consumer-groups-filter-regexp: "consumer.*"
# List of Regexp to filter topic available for group
# Single line String also allowed
# topics-filter-regexp: "^(projectA_topic|projectB_.*)$"
topics-filter-regexp:
- "^projectA_topic$" # Individual topic
- "^projectB_.*$" # Topic group
connects-filter-regexp:
- "^test.*$"
consumer-groups-filter-regexp:
- "consumer.*"
topic-writer:
name: topic-writer # Group name
roles:
Expand All @@ -534,9 +540,12 @@ akhq:
- topic/delete
- topic/config/update
attributes:
topics-filter-regexp: "test.*"
connects-filter-regexp: "^test.*$"
consumer-groups-filter-regexp: "consumer.*"
topics-filter-regexp:
- "test.*"
connects-filter-regexp:
- "^test.*$"
consumer-groups-filter-regexp:
- "consumer.*"
ldap:
groups:
- name: mathematicians
Expand Down
18 changes: 11 additions & 7 deletions application.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,18 +195,22 @@ akhq:
- connect/delete
- connect/state/update
attributes:
# Regexp to filter topic available for group
topics-filter-regexp: "test.*"
# Regexp to filter connect configs visible for group
connects-filter-regexp: "^test.*$"
# Regexp to filter consumer groups visible for group
consumer-groups-filter-regexp: "consumer.*"
# Regexp list to filter topic available for group
topics-filter-regexp:
- "test.*"
# Regexp list to filter connect configs visible for group
connects-filter-regexp:
- "^test.*$"
# Regexp list to filter consumer groups visible for group
consumer-groups-filter-regexp:
- "consumer.*"
topic-reader: # unique key
name: topic-reader # Other group
roles:
- topic/read
attributes:
topics-filter-regexp: "test\\.reader.*"
topics-filter-regexp:
- "test\\.reader.*"

# Basic auth configuration
basic-auth:
Expand Down
6 changes: 4 additions & 2 deletions src/test/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ akhq:
- topic/delete
- registry/version/delete
attributes:
topics-filter-regexp: "test.*"
topics-filter-regexp:
- "test.*"
operator:
name: operator
roles:
Expand All @@ -121,7 +122,8 @@ akhq:
- topic/data/insert
- topic/data/delete
attributes:
topics-filter-regexp: "test-operator.*"
topics-filter-regexp:
- "test-operator.*"
no-filter:
name: no-filter
roles:
Expand Down