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

added options for a CA bundle #25

Merged
merged 6 commits into from
Jul 30, 2022
Merged

Conversation

scottfp
Copy link
Contributor

@scottfp scottfp commented Aug 12, 2021

Feedback welcome. Thanks for the tool 🙂

Copy link
Owner

@krylovsk krylovsk left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, this looks great sans the name of the parameter ;)

Also, could you please update the README with the new -h output ? Thanks!

main.go Outdated Show resolved Hide resolved
@scottfp
Copy link
Contributor Author

scottfp commented Aug 15, 2021

Two more things:

  1. I removed the error when using broker CA without a client cert/key. This is a legitimate use case when connecting over SSL, but without cert-based authentication.
  2. I added a flag for toggling TLS verify. It's defaulting to false now, with the flag enabling it. Please let me know if you want to keep it as it currently is, or if you feel this should be a separate PR.

@scottfp scottfp requested a review from krylovsk August 15, 2021 22:07
log.Fatalf("Error reading CA certificate file: %v", err)
}
caCertPool = x509.NewCertPool()
caCertPool.AppendCertsFromPEM(caCert)
Copy link
Owner

Choose a reason for hiding this comment

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

Add a check that the certificate was loaded successfully (AppendCertsFromPEM() would return false if not)?

main.go Outdated Show resolved Hide resolved
Copy link
Owner

@krylovsk krylovsk left a comment

Choose a reason for hiding this comment

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

This looks great, agree with the points above too. Check that comment on validating that the read file actually contained a valid cert, otherwise looks good to me.

@aparcar
Copy link

aparcar commented Jul 28, 2022

Will this be fixed?

@krylovsk krylovsk merged commit fbedea9 into krylovsk:main Jul 30, 2022
@krylovsk
Copy link
Owner

@aparcar merged

@aparcar
Copy link

aparcar commented Jul 30, 2022

That was quick, thanks.

@krylovsk
Copy link
Owner

please pull latest main, I've fixed the comment above and renamed the flag to -broker-ca-cert.

@krylovsk krylovsk added this to the v0.2 milestone Jul 30, 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

Successfully merging this pull request may close these issues.

None yet

3 participants