question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there any sample for kerberos connection?

See original GitHub issue

While trying Consumer with Kerberos, I could not get it work (I tried Kafka official consumer-console.sh and it is working as normal). While using node-rdkafka, the application hang and there is no error or connect ready emit. Here is my Consumer log:

KafkaConsumer {
  _events:
   { ready: [Function],
     disconnected: [Function],
     'event.error': [Function] },
  _eventsCount: 3,
  _maxListeners: undefined,
  _client: KafkaConsumer {},
  metrics: {},
  _isConnected: false,
  errorCounter: 0,
  _metadata: {},
  globalConfig:
   { debug: 'all',
     'group.id': 'my_group_id',
     'metadata.broker.list':'host1:port,host2:port,host3:port',
     'security.protocol': 'sasl_plaintext',
     'sasl.kerberos.kinit.cmd':
      'kinit -k -t /my.keytab ${principal}',
     'sasl.mechanisms': 'GSSAPI',
     'sasl.kerberos.keytab': '/my.keytab',
     'sasl.kerberos.service.name': 'kafka',
     'sasl.kerberos.principal': '${principal',
     'sasl.kerberos.min.time.before.relogin': 60000,
     'enable.auto.commit': false,
     connect_cb: [Function: connect_cb],
     rebalance_cb: [Function] },
  topicConfig: { 'auto.offset.reset': 'earliest' },
  _consumeTimeout: 1000 }

I have my custimized krb5.conf which is easily set if using Java: `-Djava.security.krb5.conf=/my/krb5.conf`

I set it using environment variable `KRB5_CONFIG` but still not work.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8

github_iconTop GitHub Comments

3reactions
coolgoozecommented, Apr 25, 2019

Here’s a working sample working with Secured Kafka Cluster

kafkacat -b '<Broker_Hostname>:<Broker_Listen_Port>' -L \
-X security.protocol=sasl_plaintext \
-X sasl.kerberos.keytab='kafka.service.keytab' \
-X sasl.kerberos.service.name=kafka \
-X sasl.kerberos.principal='kafka/<Broker_Hostname>@<REALM>' \
-X sasl.kerberos.kinit.cmd="kinit -kt <App_KeytabName> <App Keytab Principal>"
-t <TopicName>```

**Note**: Ensure the App Account has consume and describe access to Topic
0reactions
stale[bot]commented, Jul 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Example Configuration of Kerberos Authentication Using ...
To perform Kerberos authentication, the user authenticating must exist in the Kerberos database. In this example, the user has the user name kerberos-test, ......
Read more >
Kerberos Authentication Explained - Varonis
Sample Varonis threat models that help detect Kerberos attacks include: Potential pass-the-ticket attack: access to a resource was requested ...
Read more >
Kerberos in 5 Minutes: Introducing network authentication
An example of mutual authentication: A user in a network using Kerberos can authenticate to a mail server to prove they are who...
Read more >
Using Kerberos integrated authentication to connect to SQL ...
Get the Kerberos ticket, either by generating a new one or placing an existing one in the default Kerberos ticket location. To generate...
Read more >
Configuring a connection with Kerberos authentication - IBM
If your service provider uses Kerberos authentication, you must have a Kerberos configuration file called krb5.conf for establishing the connection from the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found