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

fix: Infer TLS based on scheme of server string #4893

Merged
merged 6 commits into from
Mar 26, 2020

Conversation

vcrfxia
Copy link
Contributor

@vcrfxia vcrfxia commented Mar 25, 2020

Description

This PR builds on top of #4891, which attempts to fix #4885.

The changes in #4891 reveal another bug:
The client props passed by the CLI to the rest client come from:

final Map<String, String> clientProps = PropertiesUtil.applyOverrides(configProps, systemProps);
and are immutable: which means a java.lang.UnsupportedOperationException is thrown when the code tries to execute

clientProps.put(KsqlClient.TLS_ENABLED_PROP_NAME, "true");

as in #4891.

This PR works around that by copying the immutable map, and also updates unit and integration tests so similar issues don't reappear in the future.

Testing done

Manually verification that this fixes #4885

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@vcrfxia vcrfxia requested a review from a team as a code owner March 25, 2020 21:14
@vcrfxia vcrfxia requested a review from purplefox March 25, 2020 21:14
@vcrfxia vcrfxia merged commit b80a14c into confluentinc:master Mar 26, 2020
@vcrfxia vcrfxia deleted the client-infer-tls branch March 26, 2020 19:19
@spena spena added this to the 0.8.1 milestone Mar 26, 2020
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.

Cannot use CLI to connect to HTTPS server
3 participants