-
Notifications
You must be signed in to change notification settings - Fork 285
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
config: conditionally generate rpc credentials. #2779
config: conditionally generate rpc credentials. #2779
Conversation
This updates the config to only generate random rpc credentials when the authorization type is basic.
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.
I'm going to test this before approving, but it looks good from a code 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.
Working well for me.
I noticed the help in the created conf will say:
; Secure the RPC API by specifying the username and password. You must specify
; both or the RPC server will be disabled.
But really it can be enabled with the certificate file clients.pem
as well. Or maybe it means if you specify one, both must be specified.
That needs to be updated in the sample config to indicate the options available, will sort it out. |
This updates the sample config documentation related to rpc credentials to indicate they are only needed if the authorization type is basic.
; Secure the RPC API by specifying the username and password. You must specify | ||
; both or the RPC server will be disabled. | ||
; Secure the RPC API by specifying the username and password if the | ||
; authorization type is basic. You must specify both if so or the RPC |
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.
Looking at the reference to "basic" here, and how config.go handles client cert auth, I wonder if the sample config should mention params for auth type and clients.pem
?
This updates the config to only generate random rpc credentials when the authorization type is basic.
resolves #2739.