Skip to content

function read_ssl_file doesn't support chained certificates #287

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

Closed
artur-fijalkowski opened this issue Aug 22, 2019 · 7 comments
Closed
Labels

Comments

@artur-fijalkowski
Copy link

This is not mentioned explicitly in README.md, but read_ssl_file function doesn't support chained certificates. In *NIX environment this is very common that *.pem file contains multiple certificates concatenated together (eg. root CA + intermediate CA).

This is (most probably) easy to fix by splitting file during read on BEGIN CERTIFICATE line.

@repeatedly
Copy link
Member

repeatedly commented Aug 22, 2019

I'm not sure this should be fixed in fluent-plugin-kafka or ruby-kafka.
Does this mean ruby-kafka supports chained certificates but fluent-plugin-kafka doesn't use it or ruby-kafka should accept chained certificates?

@artur-fijalkowski
Copy link
Author

I think that because ruby-kafka expects to get array of certificates and actual file read is in fluent-plugin-kafka the plugin is proper place for implementation. Also current documentation is a bit misleading. As it doesn't say anything about lack of chaining support (neither that ssl_ca_cert is an array of files).

@syedriko
Copy link
Contributor

There is a workaround: split the CA bundle file into individual PEM files and specify them as an array in fluent-plugin-kafka config:

ssl_ca_cert ["root_ca.crt", "intermediate_ca.crt"]

This takes advantage of

@syedriko
Copy link
Contributor

I'm working on a proper fix.

@github-actions
Copy link

github-actions bot commented Jul 6, 2021

This issue has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 30 days

@github-actions github-actions bot added the stale label Jul 6, 2021
@syedriko
Copy link
Contributor

syedriko commented Jul 6, 2021

#390 is the PR tracking work on this issue, hopefully that'll un-stale it.

@ashie
Copy link
Member

ashie commented Sep 24, 2021

Fixed by #410

@ashie ashie closed this as completed Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants