diff --git a/README.md b/README.md index 17bf508bb..ec223a144 100644 --- a/README.md +++ b/README.md @@ -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 : @@ -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: @@ -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 diff --git a/application.example.yml b/application.example.yml index 7c7bc551f..e8baf5130 100644 --- a/application.example.yml +++ b/application.example.yml @@ -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: diff --git a/src/test/resources/application.yml b/src/test/resources/application.yml index 8c06988fc..56d4ccfa9 100644 --- a/src/test/resources/application.yml +++ b/src/test/resources/application.yml @@ -112,7 +112,8 @@ akhq: - topic/delete - registry/version/delete attributes: - topics-filter-regexp: "test.*" + topics-filter-regexp: + - "test.*" operator: name: operator roles: @@ -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: