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

Julie is creating odd Role Binding for Schema Registry subjects #399

Closed
Fobhep opened this issue Nov 15, 2021 · 2 comments
Closed

Julie is creating odd Role Binding for Schema Registry subjects #399

Fobhep opened this issue Nov 15, 2021 · 2 comments
Labels
bug Something isn't working schemas

Comments

@Fobhep
Copy link
Contributor

Fobhep commented Nov 15, 2021

Describe the bug
Using the following descriptor:

---
context: context
source: test
projects:
  - name: "foo"
    consumers:
      - principal: User:greta
    topics:
      - name: "foo"
    schemas:
      - principal: User:greta
        subjects:
          - "context.test.foo.foo-key"
          - "context.test.foo.foo-value"

results in creation of

  Principal  |      Role       | ResourceType |               Name               | PatternType  
-------------+-----------------+--------------+----------------------------------+--------------
User:greta | ResourceOwner   | Subject      | Subject:context.test.foo.foo-key | LITERAL      
User:greta | ResourceOwner   | Subject      | Subject:context.test.foo.foo-key | LITERAL   

Expected behavior
Imho the "Subject" in the rolebinding role name is superfluous and incorrect
I would rather expect this:

  Principal  |      Role       | ResourceType |               Name               | PatternType  
-------------+-----------------+--------------+----------------------------------+--------------
User:greta | ResourceOwner   | Subject      | context.test.foo.foo-key | LITERAL      
User:greta | ResourceOwner   | Subject      | context.test.foo.foo-key | LITERAL   
@Fobhep Fobhep added the bug Something isn't working label Nov 15, 2021
@Fobhep
Copy link
Contributor Author

Fobhep commented Nov 17, 2021

UPDATE: This happens also when creating Subject role bindings via custom roles:

roles:
  - name: "subjectowner"
    acls:
      - resourceType: "Subject"
        resourceName: "test"
        patternType: "Literal"
        host: "*"
        role: "ResourceOwner"

@purbon
Copy link
Collaborator

purbon commented Nov 21, 2021

Thanks for reporting this issue. I add a fix, including regression tests as well. This should be fixed with #405, this is, for now, available in master and in the latest nightly release build from https://github.com/kafka-ops/julie/actions/workflows/nightly-artifacts-build.yml

It will be included in next release, it would be awesome if you can grab from master and let me know here all is good.

@purbon purbon closed this as completed Nov 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working schemas
Projects
None yet
Development

No branches or pull requests

2 participants