<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z0000AIc18GCQROkta Classic EngineAuthenticationAnswered2024-12-16T19:15:10.000Z2024-12-15T16:05:42.000Z2024-12-16T19:15:10.000Z
What is the standard way to setup Apache Kafka with OAUTH2 okta

I'm very confused as very less or no resource available to setup Kafka with OAUTH2.

 

This is the setup with kafka and okta

 

For Kafka Server

 

*********SECURITY using OAUTHBEARER authentication ***************

sasl.enabled.mechanisms=OAUTHBEARER

sasl.mechanism.inter.broker.protocol=OAUTHBEARER

security.inter.broker.protocol=SASL_PLAINTEXT

listeners=SASL_PLAINTEXT://localhost:9093

advertised.listeners=SASL_PLAINTEXT://localhost:9093

*Authorizer for ACL

authorizer.class.name=kafka.security.auth.SimpleAclAuthorizer

super.users=User:0oalmwzen2tCuDytB05d7;

**************** OAuth Classes *********************

sasl.jaas.config=org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule required OAUTH_LOGIN_SERVER=dev-someid.okta.com OAUTH_LOGIN_ENDPOINT='/oauth2/default/v1/token' OAUTH_LOGIN_GRANT_TYPE=client_credentials OAUTH_LOGIN_SCOPE=broker.kafka OAUTH_AUTHORIZATION='Basic AFSDFASFSAFWREWSFDSAFDSAFADSFDSFDASFWERWEGRDFASDFAFEWRSDFSDFW==' OAUTH_INTROSPECT_SERVER=dev-someid.okta.com OAUTH_INTROSPECT_ENDPOINT='/oauth2/default/v1/introspect' OAUTH_INTROSPECT_AUTHORIZATION='Basic AFSDFASFSAFWREWSFDSAFDSAFADSFDSFDASFWERWEGRDFASDFAFEWRSDFSDFW==';

listener.name.sasl_plaintext.oauthbearer.sasl.login.callback.handler.class=com.oauth2.security.oauthbearer.OAuthAuthenticateLoginCallbackHandler

listener.name.sasl_plaintext.oauthbearer.sasl.server.callback.handler.class=com.oauth2.security.oauthbearer.OAuthAuthenticateValidatorCallbackHandler

********** SECURITY using OAUTHBEARER authentication ***************

 

 

I'm able to start

 

 

But I'm unsure whether these are the property I need to use.

 

 

Also I want to write a generic producer and consumer in Java which can use Okta, keycloak, some other OAuth2 providers.

 

Can you please advice me?

 


This question is closed.
Loading
What is the standard way to setup Apache Kafka with OAUTH2 okta