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

feat: export NewKerberosClientFunc to config for allow custom client #2773

Closed
wants to merge 1 commit into from
Closed

Conversation

fooofei
Copy link
Contributor

@fooofei fooofei commented Jan 25, 2024

what this pr is

The new pr is a custom config enhancement that allows the creation of user-defined KerberosClient.

After allow custom NewKerberosClientFunc, then we can custom spn, this also will satisfy https://github.com/IBM/sarama/pull/2437/files

how to implement

move NewKerberosClientFunc from GSSAPIKerberosAuth private field to GSSAPIConfig public field, allow user set NewKerberosClientFunc from config struct.

tests result

?       github.com/IBM/sarama/internal/toxiproxy        [no test files]
?       github.com/IBM/sarama/tools/kafka-console-consumer      [no test files]
?       github.com/IBM/sarama/tools/kafka-console-partitionconsumer     [no test files]
?       github.com/IBM/sarama/tools/kafka-console-producer      [no test files]
?       github.com/IBM/sarama/tools/kafka-producer-performance  [no test files]
?       github.com/IBM/sarama/tools/tls [no test files]
ok      github.com/IBM/sarama   31.257s
ok      github.com/IBM/sarama/mocks     (cached)

@fooofei
Copy link
Contributor Author

fooofei commented Jan 26, 2024

@dnwe @hindessm can you accept this pr ?
this pr is simple
someone can accept this ?

@dnwe
Copy link
Collaborator

dnwe commented Jan 30, 2024

@fooofei whilst the change looks simple on paper, it's technically a change to public facing APIs:

  • GSSAPIConfig: old is comparable, new is not
  • GSSAPIKerberosAuth.NewKerberosClientFunc: removed

So we need to have a think about whether anyone in reality could have been relying on the previous APIs and hence how we can best handle this change

@fooofei
Copy link
Contributor Author

fooofei commented Jan 30, 2024

GSSAPIConfig comparable is meaning-less, no need to compare
GSSAPIKerberosAuth is used at type Broker struct as private field kerberosAuthenticator, so remove GSSAPIKerberosAuth.NewKerberosClientFunc is safe.

@dnwe do you have other better idea for allow user to create customed KerberosClient ?
or maybe can we accept this pr?

can you response ?
please response 11

@hindessm

@IBM IBM deleted a comment from fooofei Feb 18, 2024
@IBM IBM deleted a comment from fooofei Feb 18, 2024
@fooofei fooofei closed this Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants