Skip to content

Conversation

@piotrpdev
Copy link
Member

Adds example(s) and docs for securely connecting / authenticating between Flink SQL (from our distribution) and Kafka (Strimzi). Refactors data-gen-setup.sh script for tutorial reader ease-of-use.

PR for ENTMQSTFL-251.

Depends on streamshub/flink-sql#101

Likely needs review from a Strimzi maintainer(s) to verify best practices.

@piotrpdev piotrpdev requested a review from tomncooper August 29, 2025 17:37
Copy link
Contributor

@tomncooper tomncooper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very comprehensive tutorial, thanks for putting in the hard work to verify all these options.

No major issues. I think each section probably needs an intro paragraph explaining some of the finer details of each option. Also a bit more detail early on, on things like loading certificates would make things flow better. There is more detail on what I mean in my comments.

Great work.

@tomncooper
Copy link
Contributor

@Frawless @kornys Do we have tests for secure Kafka communication in streams-e2e? If not, could the work in this tutorial form a base for that?

@tomncooper tomncooper requested a review from katheris September 1, 2025 16:34
@kornys
Copy link
Member

kornys commented Sep 1, 2025

@Frawless @kornys Do we have tests for secure Kafka communication in streams-e2e? If not, could the work in this tutorial form a base for that?

Just scram sha user passing secret testing is in streams-e2e.

@kornys
Copy link
Member

kornys commented Sep 2, 2025

@tomncooper but answer for your question is -> yes it it can be based on this work if we want to have test for mtls etc..

@piotrpdev piotrpdev requested a review from tomncooper September 2, 2025 17:09
Copy link
Contributor

@tomncooper tomncooper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a few nits. You seem to have a lot of hard wrapping of lines going on. Generally we try to use 1 line per sentence.

@Frawless Frawless self-requested a review September 3, 2025 14:03
@piotrpdev piotrpdev requested a review from tomncooper September 3, 2025 15:23
Copy link
Member

@katheris katheris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a Strimzi perspective this looks correct. I just added a couple of minor suggestions and then a question around the use of PKCS12 files over PEM files

secret:
secretName: my-cluster-cluster-ca-cert
items:
- key: ca.crt # We only need the cluster CA certificate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine for this simple example, but we should consider how we would recommend users do this in a way that handles a new CA key being created. For example by loading all .crt files in the Secret.

Copy link
Member Author

@piotrpdev piotrpdev Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, that might be a bit advanced for this tutorial?

@tomncooper Do you think we should include that? We already have a simple example of using a self-signed CA in the "custom" section.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a strimzi doc link we can point to for proper production setup?

Copy link
Member Author

@piotrpdev piotrpdev Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find one (@katheris maybe you know of one?)

Considering there may be one or more certificate(s) during the CA renewal period, I'm not sure how we'd even handle that anyway (maybe add glob support to the secret interpolater to combine the contents of multiple files?).

I added a comment for now, maybe that's enough for TP? d9403ab

Copy link

@Frawless Frawless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just did quick walkthrough ... isn't data-gen-setup.sh a little bit strange name for script that basically setup everything?

Copy link
Contributor

@tomncooper tomncooper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of nits but otherwise LGTM.

secret:
secretName: my-cluster-cluster-ca-cert
items:
- key: ca.crt # We only need the cluster CA certificate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a strimzi doc link we can point to for proper production setup?

@kornys kornys self-requested a review September 11, 2025 13:12
@piotrpdev
Copy link
Member Author

piotrpdev commented Sep 16, 2025

@tomncooper Ready for merge? 👀

@tomncooper tomncooper merged commit 2c0d7c6 into streamshub:main Sep 16, 2025
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.

5 participants