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.

[Enhancement] Add extra Secret + Password checks to KafkaConnect

See original GitHub issue

Is your feature request related to a problem? Please describe.

For Kafka Connect, one common problem I’ve seen is people putting the actual password in their KafkaConnect Custom Resource (instead of the name of the password field in the secret) It’d be a great enhanement if the operator updated the status of the KafkaConnect CR when you do that, so it says “you asked for password ‘blah’ but there is no key ‘blah’ in your secret” or something helpful and friendly like that.

Similarly, there has been some confusion around certs. Where a user has been using a KafkaUser cert in spec.tls.trustedCertificates where the KafkaConnect spec was expecting a cluster ca cert It wasn’t at all obvious to the user why his connect cluster was broken.

If we could do anything to tell if we’ve been given the right type of cert, it’d be a huge usability improvement.

An examples:

kind: KafkaConnectS2I
metadata:
  name: my-connect-cluster
spec:
  # ...
  authentication:
    passwordSecret:
      password: my-password
      secretName: my-secret

Describe the solution you’d like The solution should be if the operator can, at runtime infer any reasoning why it is not working, this should be propagated into the status of the custom resource.

Describe alternatives you’ve considered The only other alternative is changing the format of the CR to be clearer the password is a key, i.e.

    passwordSecret:
     # key: my-password
     or
      #passwordKey: my-password
      secretName: my-secret

I think documentation and examples already exist for this that is more than sufficient, but sometimes a user may still make these mistakes

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
scholzjcommented, Dec 2, 2021

Maybe by checking if the password key exists in that Map, secret.getData(), a Failure could be returned mentioning both the secret & the secret key given, wdyt?

You mean from the getPasswordAsync? Yeah, I think that would work.

1reaction
scholzjcommented, Oct 7, 2021

As for #5549 I am unsure if this conflicts with it, in theory replacing certs would just be replacing keys in a pre-existing secret, or making a new secret, right?

That is correct. But at the same time, to collect the fingerprints it would need to query the secrets. That is where it intersects since we should make sure it doesn’t for example query the secrets multiple times etc.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kafka Connect Security Basics | Confluent Documentation
This assumes that Connect is configured and restarted using the master password. Add the variable in place of the secret to the JSON...
Read more >
Using Kafka Connect Securely in the Cloudera Data Platform
Enhancing will add the properties that are most likely needed, for example: Properties that are missing compared to the sample configuration.
Read more >
Configuring Strimzi (0.32.0)
Use ConfigMap resources to add specific configuration to your Strimzi ... Extract the user CA certificate and password from the Secret of the...
Read more >
Kafka Improvement Proposals - Apache Software Foundation
KIP-690: Add additional configuration to control MirrorMaker 2 internal topics naming ... KIP-242: Mask password in Kafka Connect Rest API response.
Read more >
Bring your own Apache Kafka® Connect cluster - Aiven
For simplicity, the same secret (password) is used for both the keystore and ... how you can add a JDBC connector to 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