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

Connect: RBAC won't Filter By Connector Name #4253

Open
4 tasks done
schaubce opened this issue Sep 20, 2023 · 5 comments
Open
4 tasks done

Connect: RBAC won't Filter By Connector Name #4253

schaubce opened this issue Sep 20, 2023 · 5 comments
Labels
status/triage Issues pending maintainers triage type/bug Something isn't working

Comments

@schaubce
Copy link

schaubce commented Sep 20, 2023

Issue submitter TODO list

  • I've looked up my issue in FAQ
  • I've searched for an already existing issues here
  • I've tried running master-labeled docker image and the issue still persists there
  • I'm running a supported version of the application which is listed here

Describe the bug (actual behavior)

We have the following configuration (I have removed other resources topic/cluster/etc. for simplicity)

 - name: <adGroupName>
   clusters:
   - <cluster1>
   - <cluster2>
   subjects: []
   permissions: 
   - resource: connect
      value: ibm-mq-src--mqconnector--v1
      actions:
      - VIEW
      - RESTART
      - EDIT

When we refresh configs within Kafka-UI, no connectors are shown. If there is no specific filter (.*), it works appropriately, and shows all connectors.
Screenshot 2023-09-20 at 9 40 46 AM

Expected behavior

Similar to topics configuration (which we have working) , we'd expect to be able to use regex to filter out different connector names to limit who can view specific connectors. We did see this update in the documentation, but unsure if it is related, as the other config examples show it should work with regex:

- resource: connect
  value: "local"
  actions: [ view, edit, create ]
# connectors selector not implemented yet, use connects
#      selector:
#        connector:
#          name: ".*"
#          class: 'com.provectus.connectorName'

vs

- resource: connect
  value: ".*"
  actions: [ view ]

Your installation details

Hash: 56fa824 (Version 0.7.1)

Steps to reproduce

Can use normal set up for topics, cluster etc. Just need to limit the connect resource "value" to a single connector.

  - name: <adGroupName>
    clusters:
    -<cluster1>
    - <cluster2>
    subjects: []
    permissions: 
    - resource: connect
      value: ibm-mq-src--mqconnector--v1
      actions:
      - VIEW
      - RESTART
      - EDIT

Screenshots

No response

Logs

No response

Additional context

  • We have tested different connector types to see if that impacted anything
  • We have tested different connector name regex: full name, prefix
@schaubce schaubce added status/triage Issues pending maintainers triage type/bug Something isn't working labels Sep 20, 2023
@github-actions
Copy link

Hello there schaubce! 👋

Thank you and congratulations 🎉 for opening your very first issue in this project! 💖

In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. 👀

@tufank
Copy link

tufank commented Feb 1, 2024

Hello,

We are also having the same issue, and we are not sure what 'use connects' means in the comment 'selector not implemented yet...'., which also makes the meaning of 'value' in 'resource: connect' ambiguous.

Is there currently a way or a workaround to be able to define a regex for connector names? Or any documentation that makes it more clear how to use 'resource: connector' when we want to limit access to connectors?

Thanks in advance for any help.

@Haarolean
Copy link
Contributor

Just to clarify this for everyone here,

there are two things you have: connects (kafka-connect node) and connectors (data apps for KC within a connect).

With a setup like this:

kafka:
  clusters:
    - name: local
      # ...
      kafkaConnect:
        - name: first
          address: http://localhost:8083
        - name: second
          address: http://localhost:8084

You would see something like this:
Screenshot 2024-02-01 at 20 13 20

And if you limit the access with RBAC allowing only "first" connect access it would look like this:
Screenshot 2024-02-01 at 20 14 08

So this works as intended. And the commented-out part of the config suggests that limiting access to specific connectors within a connect is not currently implemented, so, you have to limit the access to the whole connect.

@tufank
Copy link

tufank commented Feb 1, 2024

Thank you, I appreciate the clarification. It is now clear that the 'value' field of the 'resource: connect' entry in RBAC definitions corresponds to the name fields of clusters.kafkaConnect entries, and currently it is not possible to limit permissions by the name or regex of the connectors defined within the Connect cluster itself.

@Haarolean
Copy link
Contributor

@tufank yeah, that's right. If you're looking for such a feature, I invite you to raise an issue here: https://github.com/kafbat/kafka-ui as this repo is not maintained anymore (#4255)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/triage Issues pending maintainers triage type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants