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

Documented TLS Authentication with node https.Agent #259

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andreacioni
Copy link

Hi everyone,

I open this PR because I found a bit hard to configure TLS authentication against a Schema Registry that accept just this kind of authentication method. I hope that with this integration in the documentation people won't have the same problem (here an old issue raised on this topic #61 ).

Please tell me if you want me to add tests also.

@silverwind
Copy link

This is good docs and I was looking for those. I do have to comment that I don't really like how this is done via https.Agent which does not document these options at all, thought I guess this is more of a Node.js docs issue.

import * as fs from 'fs'

const agent = new Agent({
ca: [ fs.readFileSync('/path/to/yourca.crt', 'utf-8') ],
Copy link

@silverwind silverwind Apr 17, 2024

Choose a reason for hiding this comment

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

Seems unnecessary to wrap in [] because it accepts both string or string[]. The same thing is in kafkajs docs, but I think unnecessary there as well.

Choose a reason for hiding this comment

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

I can confirm it works just as well without the [].

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.

2 participants