grepplabs / kafka-proxy

Proxy connections to Kafka cluster. Connect through SOCKS Proxy, HTTP Proxy or to cluster running in Kubernetes.
Apache License 2.0
476 stars 81 forks source link

Kafka Oidc-Provider Auth-Gateway Example #119

Open rishabhsinhaa opened 1 year ago

rishabhsinhaa commented 1 year ago

Can anyone please provide an example for using oidc-provider as the auth-gateway using the kafka-proxy

somerek commented 9 months ago

Hi. I run it like this: make clean build plugin.oidc-provider && build/kafka-proxy server --sasl-enable --sasl-plugin-enable --sasl-plugin-mechanism "OAUTHBEARER" --sasl-plugin-command build/oidc-provider --sasl-plugin-param "--credentials-file=/path/to/service-account.json" --bootstrap-server-mapping "kafka:9092,0.0.0.0:19092" And service-account.json:

{
  "grant_type": "password",
  "client_id": "kafka",
  "client_secret": "kafka-secret",
  "username": "bob",
  "password": "bob-password",
  "token_url": "http://keycloak:8080/auth/realms/kafka-authz/protocol/openid-connect/token",
  "scopes": ["openid", "offline_access"]
}