-
Notifications
You must be signed in to change notification settings - Fork 1.9k
tls: macos load system certificates using security framework. #9539
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
Conversation
cosmo0920
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically, the implementation should be good. I added a small concerns for coding style, message style, and the counter to count already loaded certificates.
Load the system certicates using the security framework instead of a depending on a local pem file. Signed-off-by: Jorge Niedbalski <jorge.niedbalski@chronosphere.io>
d82ebfd to
3a5f3de
Compare
cosmo0920
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
…#9539) Load the system certificates using the security framework instead of depending on a local bundled pem file. Signed-off-by: Jorge Niedbalski <jorge.niedbalski@chronosphere.io>
Description
This patch should be stacked after
I realised that none of the expected locations for the PEM files was available on my machine. I had some PEM files created by the brew installer but none of them were being detected by fluent-bit.
If the plugin didn't have explicilty set to tls.verify off, I would get a certify verify failed, no matter on which
location I place my CA ring or my pem files.
Configuration used before
[CUSTOM] name calyptia api_key xxxx fleet_name test-jorge calyptia_tls.verify on calyptia_host cloud-api.calyptia.comTherefore, I decided to check if the security framework had the certificates I needed for Letsencrypt, and to my surprise all of those certs were available on the machine
security find-certificate -a /System/Library/Keychains/SystemRootCertificates.keychainTherefore I decided to load certificates from SecTrustSettingsCopyCertificates using the security framework to avoid relying on local certificate paths.
This patch is an implementation of that approach. With this patch applied I get the following output:
Testing
Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.