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

CC-12621: add config combo validator for ssl configs #459

Merged
merged 1 commit into from
Nov 1, 2020

Conversation

levzem
Copy link
Contributor

@levzem levzem commented Oct 30, 2020

Signed-off-by: Lev Zemlyanov lev@confluent.io

Problem

the connector does not validate different combinations of SSL configs

Solution

add validator to validate that SSL configs are only specified when elasticsearch.security.protocol is set to SSL

Does this solution apply anywhere else?
  • yes
  • no
If yes, where?

proxy and connection configs need to be validated as well

Test Strategy

add unit tests for both valid and invalid combinations for ssl configs

Testing done:
  • Unit tests
  • Integration tests
  • System tests
  • Manual tests

Release Plan

backport to 5.2.x where the ssl configs were introduced

@levzem levzem requested a review from a team as a code owner October 30, 2020 20:23
@levzem levzem changed the base branch from master to 5.2.x October 30, 2020 20:24
Copy link

@Prathibha-m Prathibha-m left a comment

Choose a reason for hiding this comment

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

One minor comment
Otherwise, LGTM!

@@ -72,7 +76,7 @@ private void validateCredentials() {
boolean onlyOneSet = config.username() != null ^ config.password() != null;

Choose a reason for hiding this comment

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

We can use StringUtils.isBlank to ensure it's not empty whitespaces and null

@levzem levzem force-pushed the multi branch 3 times, most recently from 94b6da5 to 2189cb1 Compare October 30, 2020 23:12
Signed-off-by: Lev Zemlyanov <lev@confluent.io>
@levzem levzem merged commit fed4fa7 into confluentinc:5.2.x Nov 1, 2020
@levzem levzem deleted the multi branch November 1, 2020 22:09
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.

None yet

2 participants