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

Kafka Scaler: Allow disabling Kerberos FAST negotiation to allow use with KDCs that don't support FAST #6188

Open
jkyros opened this issue Sep 26, 2024 · 1 comment · May be fixed by #6189 or kedacore/keda-docs#1476
Labels
feature-request All issues for new features that have not been committed to needs-discussion

Comments

@jkyros
Copy link
Contributor

jkyros commented Sep 26, 2024

Proposal

  • Using the Kafka scaler + Kerberos against a KDC that doesn't support FAST currently fails with this unfortunate error, and a user can't do anything about it without re-configuring their KDC:
"error creating kafka client: kafka: client has run out of available brokers to talk to: [Root cause: KRBMessage_Handling_Error] KRBMessage_Handling_Error: AS Exchange Error: AS_REP is not valid or client password/keytab incorrect < KRBMessage_Handling_Error: KDC did not respond appropriately to FAST negotiation"}
  • The sarama Kafka client we are using in the Kafka scaler actually does have a setting GSSAPIConfig.DisablePAFXFAST that can be used to disable kerberos/GSSAPI FAST negotiation and "fix" this, but the Kafka scaler doesn't currently have any plumbing to read that setting out of the auth config to configure it -- so a user can't use it because it's not exposed.

  • As such, the current state of affairs prevents users from using the Kafka scaler against against some configurations of KDCs -- like Active Directory -- that don't use FAST.

I'm proposing we add plumbing at least for the AuthConfig so we can expose this piece of client config as an authentication parameter so users can shut off FAST for their connections if they need to.

Use-Case

This would let us successfully use the Kafka scaler against KDCs that don't support FAST.

In a lot of cases the kerberos infrastructure was set up for other purposes and not just to auth our keda scaler, so modifying the KDC configuration itself is often out of reach of our users -- right now they just don't get to use kerberos with the kafka scaler. :sad

Is this a feature you are interested in implementing yourself?

Yes

Anything else?

( sarama uses gokrb5 under the hood, i.e. https://github.com/jcmturner/gokrb5/blob/master/v8/USAGE.md#active-directory-kdc-and-fast-negotiation. I was hoping for a "try and fallback" method but it doesn't look like there is one, it looks like all we get is "turn it off before you login plzkthx" )

@satand
Copy link

satand commented Oct 3, 2024

Hi, is there news about this issue?
I expected it to be a cosmetic change being the FAST negotiation flag already supported by the sarama client.
Many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request All issues for new features that have not been committed to needs-discussion
Projects
Status: To Triage
2 participants