-
Notifications
You must be signed in to change notification settings - Fork 472
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
automtls: fix bidirectional communication when AutoMTLS is enabled #193
Conversation
Took a look at how we generate certs on Vault for mTLS via bootstrap + wrapping token, and it looks the same as this modulo the issuer addition. Do you get the error if issuer is not specified? |
@calvn Yes, I do get the same error if the Issuer is not specified. But I did some more testing just now and if I don't set the Do you think that approach is preferable? I don't see any downside either way |
I haven't thought about this in a long time, so I'm not going to try and comment about what is the more "correct" method for cert generation, but I would be concerned with making sure the changes is compatible between client and server versions. I would verify that existing clients and servers on different minor versions can interoperate with this change in either direction, otherwise we will need some way to make it optional to prevent needing a new major version. |
Interesting, I wonder how mTLS is working on Vault today since it doesn't seem to specify WRT the organization field in |
Database plugins don't use the brokered connections back to the host. Using GRPCBroker is when I am seeing the Certificate errors occur. |
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.
Left a few small comments/questions that other may answer too, but overall the change looks good! Ran the tests locally and they all passed.
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 from a crypto perspective. :-)
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.
Tested with both before+after client+server combinations using Terraform providers, and all seemed to work well!
Currently enabling AutoMTLS when connecting from a plugin process back to the host results in the following error:
This is similar but not identical to the error described in #109 and #179
This PR enables the client and server to successfully establish the mTLS connection for bidirectional communication.