Skip to content
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

Kerberos Authentication for Elasticsearch #7404

Closed
andrewkroh opened this issue Jun 25, 2018 · 8 comments
Closed

Kerberos Authentication for Elasticsearch #7404

andrewkroh opened this issue Jun 25, 2018 · 8 comments
Assignees
Labels
libbeat :Outputs Team:Services (Deprecated) Label for the former Integrations-Services team v7.8.0

Comments

@andrewkroh
Copy link
Member

Elasticsearch (by way of X-Pack) is adding support for authenticating via Kerberos. As a Beats user I'd like to be able to use Kerberos for authenticating with the Elasticsearch output cluster (or monitoring cluster).

There is a pure Go client that is Apache 2.0 licensed -- https://github.com/jcmturner/gokrb5. We should test this to see if it meets our requirements. If not there are a few other libraries (mostly that require cgo).

Based on the ES ticket it sounds like the flow will be to authenticate to ES with the Kerberos ticket and exchange it for an Elasticsearch token. Then use the ES token when making the _bulk requests.

Related Tickets

@andrewkroh
Copy link
Member Author

andrewkroh commented Jun 25, 2018

It does look like the https://github.com/jcmturner/gokrb5 library should support what we need to integrated with ES:

  • authenticate with the keytab
  • generate a SPNEGO ticket

For testing purposes we can setup dockerized kerberos environment. Here's a RedHat guide: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system-level_authentication_guide/configuring_a_kerberos_5_server

I've been told another good resource for getting started is https://github.com/freeipa/freeipa-workshop.

@andrewkroh
Copy link
Member Author

The ES team has a test fixture for Kerberos at https://github.com/elastic/elasticsearch/tree/master/test/fixtures/krb5kdc-fixture.

In Kerberos auth feature in ES is being worked from a feature branch at: https://github.com/elastic/elasticsearch/commits/feature/kerberos

@andresrc
Copy link
Contributor

andresrc commented May 2, 2020

Support provided in #17927

@kvch what's missing to close this issue? thanks!

@kvch
Copy link
Contributor

kvch commented May 4, 2020

The mering and backporting of the automated tests: #18127
Hopefully, it will be done today or tomorrow.

@kvch
Copy link
Contributor

kvch commented May 4, 2020

I've merged and backported the automated tests.

@ovictorain
Copy link

ovictorain commented May 9, 2020

Hi @kvch I encounterd the same problem mentioned here: #IBM/sarama#1658, did you find a workaroud?
BTW, as a beats user, I don't think it's elegant to modify sarama source code and reimport 😌. thx
(I tested 43f5689 and problem still remains)

@kvch
Copy link
Contributor

kvch commented May 11, 2020

@ovictorain Thanks for reporting it. Do you mind opening a separate issue, so we can track it? The fix is not yet integrated into Beats.

I agree it is not elegant. My plan is to open a PR with the revert. But until it gets merged upstream, we have no choice but to use a fork of the repository. :) I rather not keep our users waiting. :)

@kvch
Copy link
Contributor

kvch commented May 14, 2020

@ovictorain Now I am looking at the issue you commented on. Kerberos authentication for Elasticserach has nothing to do with Kafka. What output are you using? What is the error you are getting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libbeat :Outputs Team:Services (Deprecated) Label for the former Integrations-Services team v7.8.0
Projects
None yet
Development

No branches or pull requests

5 participants