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

Require TLS for server RPC when enabled #2526

Merged
merged 3 commits into from
Apr 7, 2017
Merged

Conversation

schmichael
Copy link
Member

Fixes #2525

We used to be checking a RequireTLS field that was never set. Instead we
can just check the TLSConfig.EnableRPC field and require TLS if it's
enabled.

Added a few unfortunately slow integration tests to assert the intended
behavior of misconfigured RPC TLS.

Also disable a lot of noisy test logging when -v isn't specified.

Fixes #2525

We used to be checking a RequireTLS field that was never set. Instead we
can just check the TLSConfig.EnableRPC field and require TLS if it's
enabled.

Added a few unfortunately slow integration tests to assert the intended
behavior of misconfigured RPC TLS.

Also disable a lot of noisy test logging when -v isn't specified.
QueryOptions: structs.QueryOptions{Region: "global"},
}
var out structs.SingleNodeResponse
deadline := time.Now().Add(1234 * time.Millisecond)
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is 1234 coming from?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thin air. I would love a better way of testing "ensure X doesn't happen" (where "X" in this case is successfully making the RPC call).

I guess I should put a sleep in this loop as well so it's not spinning as fast as possible.

I'll poke around for a minute and try to come up with something a little better.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah you may just want to add a method to testutil that takes a total duration and a wait between duration and runs a function to assert. Then run for 2 seconds hitting the api every 250ms or something ensuring it doesn't succeed.

1234ms was far longer than needed and not sleeping between iterations
was just mean.
@schmichael schmichael merged commit cb10f91 into master Apr 7, 2017
@schmichael schmichael deleted the b-2525-enforce-rpc-tls branch April 7, 2017 16:12
schmichael added a commit that referenced this pull request Apr 7, 2017
@github-actions
Copy link

github-actions bot commented Apr 2, 2023

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants