Closed purbon closed 2 years ago
Hi,
In this PR you have added this first condition
if (haveServiceAccountPrefixFilters() || resourceName.equals("*")) {
return matchesServiceAccountPrefixList(principle);
}
But if we have an RBAC right like this :
Principal | Role | ResourceType | Name | PatternType
+----------------------+----------------+--------------+------------------------+-------------+
Group:G_FOO_BAR_READ | DeveloperWrite | Topic | d.customers.example.my-topic.1| LITERAL
Create a new topoology file :
context: "d"
source: "foo"
projects:
- name: "bar"
consumers:
- principal: "Group:G_FOO_BAR_READ"
topics:
- name: "my-topic.1"
plan: "one-partition"
with configs
topology.topic.managed.prefixes.0=d.foo.bar
topology.service.accounts.managed.prefixes.0="Group:G_FOO_BAR_READ"
After execution first binding is delete
Principal | Role | ResourceType | Name | PatternType
+----------------------+---------------+--------------+-----------+-------------+
Group:G_FOO_BAR_READ | DeveloperRead | Topic | d.foo.bar | PREFIXED
Group:G_FOO_BAR_READ | ResourceOwner | Group | * | LITERAL
In fact, binding match account service but topic is not is this file, so julieops delete this binding.
topology.topic.managed.prefixes is not used in this case to filter account AND topic matching.
@damien-malescot, would you be so nice to please open an issue for this? thanks a lot.
close #381