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][fn] JavaInstanceStarter --tls_allow_insecure default to false #20267

Merged

Conversation

michaeljmarshall
Copy link
Member

@michaeljmarshall michaeljmarshall commented May 9, 2023

Motivation

Pulsar's defaults for allowing insecure connections are always false except for in this one case in the JavaInstanceStarter. A more secure default is to set it to false, so I propose we change this default.

In this case, we have a default that is likely never used unless someone manually uses the JavaInstanceStarter. As such, I propose we update this default without requiring a PIP.

Modifications

  • Make the default value for --tls_allow_insecure in the JavaInstanceStarter class false.

Verifying this change

I will verify that tests pass.

Does this pull request potentially affect one of the following parts:

  • The default values of configurations

Documentation

  • doc-not-needed

These docs are generated.

Matching PR in forked repository

PR in forked repository: michaeljmarshall#43

@michaeljmarshall
Copy link
Member Author

/pulsarbot rerun-failure-checks

@michaeljmarshall michaeljmarshall changed the title [feat][fn] JavaInstanceStarter --tls_allow_insecure default to false [fix][fn] JavaInstanceStarter --tls_allow_insecure default to false Jun 1, 2023
@michaeljmarshall michaeljmarshall requested a review from lhotari June 1, 2023 04:11
@michaeljmarshall michaeljmarshall marked this pull request as ready for review June 1, 2023 04:11
@michaeljmarshall
Copy link
Member Author

/pulsarbot rerun-failure-checks

@codecov-commenter
Copy link

codecov-commenter commented Jun 6, 2023

Codecov Report

Merging #20267 (f707cde) into master (9f93af3) will decrease coverage by 0.27%.
The diff coverage is 95.65%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #20267      +/-   ##
============================================
- Coverage     72.91%   72.64%   -0.27%     
+ Complexity    31913    31859      -54     
============================================
  Files          1867     1867              
  Lines        138534   139993    +1459     
  Branches      15200    15507     +307     
============================================
+ Hits         101009   101697     +688     
- Misses        29517    30211     +694     
- Partials       8008     8085      +77     
Flag Coverage Δ
inttests 24.34% <82.60%> (+0.15%) ⬆️
systests 25.03% <82.60%> (+0.08%) ⬆️
unittests 71.90% <95.65%> (-0.30%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...che/bookkeeper/mledger/impl/ManagedCursorImpl.java 78.95% <ø> (+0.16%) ⬆️
.../pulsar/functions/runtime/JavaInstanceStarter.java 0.00% <0.00%> (ø)
...ava/org/apache/pulsar/broker/service/Consumer.java 86.77% <100.00%> (-0.05%) ⬇️
...ava/org/apache/pulsar/broker/service/Producer.java 82.36% <100.00%> (+0.45%) ⬆️
...va/org/apache/pulsar/broker/service/ServerCnx.java 71.56% <100.00%> (+0.08%) ⬆️
.../common/policies/data/stats/ConsumerStatsImpl.java 97.61% <100.00%> (-0.96%) ⬇️
...common/policies/data/stats/PublisherStatsImpl.java 90.00% <100.00%> (-5.53%) ⬇️

... and 81 files with indirect coverage changes

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Lgtm

@eolivelli eolivelli merged commit 0a39b81 into apache:master Jun 6, 2023
public String tlsAllowInsecureConnection = Boolean.TRUE.toString();
public String tlsAllowInsecureConnection = Boolean.FALSE.toString();
Copy link
Member Author

Choose a reason for hiding this comment

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

@lhotari - I finally understand why this defaults to arity 1, not 0. It's because the field is a String, not a Boolean or a boolean. Therefore, this change was correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants