-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
ReadOnly User cannot list topics #1607
Comments
@BernhardBerbuir can you please copy an extract of your application.yml and especially the akhq.security part + the ouput of yourOIDC provider ? |
@AlexisSouquiere here is my
REMARK:
At the top of this issue I have provided the permissions of a user. |
I'm able to reproduce an issue you are mentioning in your first post (user redirected to the login page) with your configuration. Not the second one (no topics displayed) if I have a topic matching the pattern. For the 1st one, this is due to the topic list page needs also the CONSUMER_GROUP resource with READ permissions. If you don't have: akhq:
ui-options:
topic:
skip-consumer-groups: true We will try to load consumer groups for the topic and because you don't have rights, you will be redirected to the login page (a warning message is missing I agree). Can you please try to add "CONSUMER_GROUP" in your ReadOnly roles ? And if it doesn't work, check if you still have the same issue in the logs principal_ReadOnly:
- actions: [ "READ", "READ_CONFIG" ]
resources: [ "TOPIC" ]
- actions: [ "READ" ]
resources: [ "TOPIC_DATA", "CONSUMER_GROUP" ]
ReadOnly:
- actions: [ "READ", "READ_CONFIG" ]
resources: [ "TOPIC" ]
- actions: [ "READ" ]
resources: [ "TOPIC_DATA", "CONSUMER_GROUP" ] For your last question, of course it doesn't matter. The only thing we have to check is that all the solutions produces the same output. |
I tried to reproduce the problem, but it no longer occurred . I have added the following snippet to both roles (I want to avoid mixing resources) :
and now everything works fine 🎉 (thanks for your advice). There seems to be some dependencies between resources (READ/TOPIC without READ/TOPIC_DATA also has problems). However, documenting these could be very time consuming: perhaps a general note in the documentation + an error message in the log if permissions are missing would be a possibility. |
I will put a note in the doc to explain these dependencies and see how to display a message saying that a permission is missing. Thanks for the feedback |
I'm using the
dev
version with the new roles with OIDC and an external mapper. When a user has only the following permissions:then the the user is either redirected to the login page or an empty topic list is displayed.
The AKHQ log contains the following stacktrace:
When I add the role
then the topics are displayed.
Apparently something is wrong with the API ("List all topics" (get /api/{cluster}/topic)) because it produces the same error if the dummy permission is not present.
The text was updated successfully, but these errors were encountered: