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

Add SASL/SCAM support to Kafka transport. #121

Merged
merged 3 commits into from
Oct 8, 2022

Conversation

Packetslave
Copy link
Contributor

This pull request adds the optional -transport.kafka.scram flag, which tells the Kafka transport to use SASL/SCRAM for authentication. This allows goflow2 to work with AWS Managed Service for Kafka (MSK) which does not support SASL/PLAIN.

Tested against AWS MSK:

./goflow2 \
    -transport=kafka \
    -transport.kafka.topic=ExampleTopic \
    -format=pb \
    -listen netflow://:2155 \
    -transport.kafka.brokers=$BROKERS \
    -transport.kafka.tls \
    -transport.kafka.sasl \
    -transport.kafka.scram=sha512
INFO[0000] Authenticating as user 'goflow'...
INFO[0000] Starting GoFlow2
INFO[0000] Starting collection                           hostname= port=2155 scheme=netflow

This pull request adds the optional -transport.kafka.scram flag,
which tells the Kafka transport to use SASL/SCRAM for authentication.
This allows goflow2 to work with AWS Managed Service for Kafka (MSK)
which does not support SASL/PLAIN.
@lspgn
Copy link
Member

lspgn commented Oct 7, 2022

Thanks a lot for fixing this!
Apologies for the delay in reply.

My suggestion, while I know it's a breaking change, would be to change transport.kafka.sasl to a string. It could be set to plain, scram-256 or scram-512.
Would you be able to change this? Rest looks good.

@lspgn lspgn added the transport Related to transport libraries (Kafka) label Oct 7, 2022
@lspgn lspgn merged commit e0d30b7 into netsampler:main Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
transport Related to transport libraries (Kafka)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants