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

Can't specify key and certificate as environment variables. #299

Closed
iluwaa opened this issue Oct 27, 2022 · 2 comments
Closed

Can't specify key and certificate as environment variables. #299

iluwaa opened this issue Oct 27, 2022 · 2 comments

Comments

@iluwaa
Copy link

iluwaa commented Oct 27, 2022

When I am trying to specify key/certificate as KAFKA_CLIENT_CERT/KAFKA_CLIENT_KEY getting error:
Error: open -----BEGIN PRIVATE KEY-----\nXXXXX\n-----END PRIVATE KEY-----\n: file name too long
but if I am specifying client_cert/client_key in provider config - all works like expected.

@gopkri24
Copy link

gopkri24 commented Dec 6, 2022

Replace \n with newline and your issue should be fixed. Something like this:

export KAFKA_CA_CERT="-----BEGIN CERTIFICATE----- asdasdasdasdasdasdasfadfsfdgdfgdghfgnbseoitghi 4JTPGwnpgnvspfnvp asdasdasdasdasdasdasfadfsfdgdfgdghfgnbseoitghi 4JTPGwnpgnvspfnvp ... ........ asdasdasdasdasdasdasfadfsfdgdfgdghfgnbseoitghi 4JTPGwnpgnvspfnvp -----END CERTIFICATE-----"

@iluwaa
Copy link
Author

iluwaa commented Dec 7, 2022

that works,

@iluwaa iluwaa closed this as completed Dec 7, 2022
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

No branches or pull requests

2 participants