Principal = User:ANONYMOUS is Denied operation #11101
Unanswered
MariaIRubio
asked this question in
Q&A
Replies: 1 comment 20 replies
-
|
Beta Was this translation helpful? Give feedback.
20 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I am trying to integrate keycloak and strimzi in my application, but I always get this errror in the Cluster
2025-01-31 17:27:18,277 INFO Principal = User:ANONYMOUS is Denied operation = DESCRIBE from host = 10.233.96.37 on resource = Cluster:LITERAL:kafka-cluster for request = DescribeLogDirs with resourceRefCount = 1 based on rule DefaultDeny (kafka.authorizer.logger) [data-plane-kafka-request-handler-1]
and in consecuence this error in my application
2025-01-31T18:20:08.701+01:00 ERROR 433593 --- [integrationKafkaKeycloak] [ad | producer-1] org.apache.kafka.clients.Metadata : [Producer clientId=producer-1] Topic authorization failed for topics [x_topic]
This is the configuration of my cluster that concerns authentication and authorization:
In keycloak I have three clients:
- kafka: that has the authorization activated with a client_credentials flow and manages the roles and policies
- team-a-client: that simulates a producer with role Dev Team A - User:service-account-team-a-client
- team-a-client: that simulates a consumer with role Dev Team B - User:service-account-team-b-client
In my application I get the token throught a request
And this is the Security Configuration that I have to integrate keycloak with my app, decode the token and grant the authentication/authorization:
And my Producer, where I add the jaasConfig to connect it with strimzi:
I tried to follow the examples of https://github.com/strimzi/strimzi-kafka-oauth/blob/main/examples/producer/src/main/java/io/strimzi/examples/producer/ExampleProducer.java
but I get the externals from Config (import io.strimzi.kafka.oauth.client.ClientConfig;
import io.strimzi.kafka.oauth.common.Config;
import io.strimzi.kafka.oauth.common.ConfigProperties;) as null.
If someone have an idea it is more than welcome!!! Thank you in advance
Beta Was this translation helpful? Give feedback.
All reactions