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

config: conditionally generate rpc credentials. #2779

Merged
merged 2 commits into from Nov 6, 2021

Conversation

dnldd
Copy link
Member

@dnldd dnldd commented Nov 3, 2021

This updates the config to only generate random rpc credentials when the authorization type is basic.

resolves #2739.

This updates the config to only generate random rpc credentials
when the authorization type is basic.
Copy link
Member

@davecgh davecgh left a 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.

Copy link
Member

@JoeGruffins JoeGruffins left a 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.

@dnldd
Copy link
Member Author

dnldd commented Nov 4, 2021

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.
@davecgh davecgh added this to the 1.7.0 milestone Nov 5, 2021
@davecgh davecgh merged commit 8f5270b into decred:master Nov 6, 2021
; 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
Copy link

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?

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.

config: Don't set rpcuser/rpcpass when authtype not basic.
5 participants