Closed DanielMabbett closed 3 years ago
Hi @DanielMabbett , thanks a lot for your report. I have done some test with the latest version (master branch) and I am as of now unable to replicate your issue. What I did was.
1.- Compile the local jar (no docker interferences) - this is might the be the only difference with you.
Use this roles file:
---
roles:
- name: "app"
acls:
- resourceType: "Topic"
resourceName: "{{topic}}"
patternType: "PREFIXED"
host: "*"
role: "ResourceOwner"
- resourceType: "Topic"
resourceName: "sourceTopic"
patternType: "LITERAL"
host: "*"
role: "DeveloperRead"
- name: "other"
acls:
- resourceType: "Topic"
resourceName: "{{topic}}"
patternType: "LITERAL"
host: "*"
role: "DeveloperManage"
use this topology:
---
context: "context"
source: "source"
projects:
- name: "foo"
other:
- principal: "User:foo"
topic: "my-topic"
consumers:
- principal: "User:App0"
- principal: "User:App1"
streams:
- principal: "User:App0"
topics:
read:
- "topicA"
- "topicB"
write:
- "topicC"
- "topicD"
connectors:
- principal: "User:Connect1"
connectors:
- "jdbc-sync"
- "ibmmq-source"
topics:
read:
- "topicA"
- "topicB"
- principal: "User:Connect2"
topics:
write:
- "topicC"
- "topicD"
schemas:
- principal: "User:App0"
subjects:
- "transactions"
- principal: "User:App1"
subjects:
- "contracts"
rbac:
- ResourceOwner:
- principal: "User:Foo"
- SecurityAdmin:
- principal: "User:Boo"
topics:
- name: "foo"
config:
replication.factor: "1"
num.partitions: "1"
- dataType: "avro"
name: "bar"
config:
replication.factor: "1"
num.partitions: "1"
- name: "bar"
topics:
- dataType: "avro"
name: "bar"
config:
replication.factor: "1"
num.partitions: "1"
The DeveloperManage binding is created as expected.
... redacted
_confluent-metrics
__confluent.support.metrics
List of ACLs:
my-topic
'TOPIC', 'my-topic', '*', 'DeveloperManage', 'User:foo', 'LITERAL'
List of Principles:
... redacted...
confluent iam rolebinding list --princi
pal "User:foo" --kafka-cluster-id q7Yfl76DTiufYhhSmPzGvQ
Principal | Role | ResourceType | Name | PatternType
+-----------+-----------------+--------------+----------+-------------+
User:foo | DeveloperManage | Topic | my-topic | LITERAL
I would love to help out, but as of now I am having this under investigation. It certainly looks like it is not a problem of the statement generation.
Do you mind helping me out with:
1.- What is your execution flow? can you list the operations you do before reaching out to this situation? 2.- Do you mind pasting here as well your current state? might be the file is the easiest one.
Looking forward to hear from you.
You are completely correct! I have managed to get this now working. Sorry for wasting time.
no wasting, glad it is working for you.
Describe the bug I will admit, this is probably my own doing from my previous PR: https://github.com/kafka-ops/julie/commit/a2e79d0fe160443d84b2dd1ff32c6f4e4714d2f0
Basically, it doesn't work using DeveloperManage built-in role for my Julie custom roles.
I will try to spend some time on this but it's worth adding a ticket for people to see it's known.
To Reproduce Steps to reproduce the behavior:
context: "" source: "" projects:
Expected behavior Should just follow the same role assignment/binding creation process as "DeveloperRead" or "DeveloperWrite"
Screenshots None
Runtime (please complete the following information):
Additional context None