-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: Add mTLS configuration for ffresty #65
feat: Add mTLS configuration for ffresty #65
Conversation
Signed-off-by: Enrique Lacal <enriquelacal@Enriques-MacBook-Pro.local>
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.
This is great @EnriqueL8 - A few suggestions/questions to consider.
|
||
var client *resty.Client | ||
|
||
func New(ctx context.Context, staticConfig config.Section) (client *resty.Client, err error) { |
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.
As you mention, this line will drive a lot of change in the components.
I wonder if the right answer here, is to prepare a set of PRs against the other hyperledger/firefly-*
repositories - otherwise they would become unable to pick up security maintenance.
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.
Sounds like a plan, have already started on the main firefly but will look at the other repos and coordinate the changes
Signed-off-by: Enrique Lacal <enriquelacal@Enriques-MacBook-Pro.local>
Signed-off-by: Enrique Lacal <enriquelacal@Enriques-MacBook-Pro.local>
f5604d7
to
d9fb901
Compare
Signed-off-by: Enrique Lacal <enrique.lacal@kaleido.io>
d9fb901
to
089551f
Compare
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.
Awesome. Thanks for going the extra mile to package this one all up so tidily @EnriqueL8!
Adding the ability to supply a config to the ffresty client to setup TLS and mTLS.
NOTE This changes the interface of that init function to now return an error as well, so every consumer of this library and that client on update will need to handle that error. We could avoid doing this by allowing the user to provide a TLS Config as an argument but the pattern seems to be to provide viper config!
For testing I added a series of real and fake certificates and keys. I also explore standing up an mTLS mock server with the
httptest
but it proved cumbersome. I think validating that the correct certificates are added to the TLS Config should be good enough but happy to rectify