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

ZOOKEEPER-4259 - Allow AdminServer to force https #1652

Closed
wants to merge 4 commits into from

Conversation

nkalmar
Copy link
Contributor

@nkalmar nkalmar commented Mar 24, 2021

Initial commit to allow adminServer to only serve HTTPS requests
Questions:
-Is this fine that I stayed with portunification, or should we have a seperate secure port?

Copy link
Contributor

@symat symat left a comment

Choose a reason for hiding this comment

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

LGTM
Although I haven't tested it locally yet, I assume you did it. I'll try to do it tomorrow if noone else does it.

Is this fine that I stayed with portunification, or should we have a seperate secure port?

I don't mind to stick to the same port. The user can decide now to make that single port to be http-only, https-only or http-and-https-unified. I think this is flexible enough. Usually in production people will stick to either http-only or https-only, and maybe using http-and-https-unified during upgrade / migration.

Do you thing we can add any unit test? Do we have unit tests for admin port unification? Maybe those could be reused / extended.

@nkalmar
Copy link
Contributor Author

nkalmar commented Mar 24, 2021

Thanks for the review @symat , yes, I was planning to add unit tests, this was just an initial commit to see what folks think about the implementation (mainly to sticking to one port only). I will do the unit tests shortly.

@nkalmar nkalmar force-pushed the ZOOKEEPER-2512 branch 2 times, most recently from b19a9b3 to 1e1273d Compare March 24, 2021 18:41
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

Copy link
Contributor

@symat symat left a comment

Choose a reason for hiding this comment

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

great work, also thanks for the unit tests!

I tested the patch locally:

  • portUnification is still working (if portUnification=true and forceHttps=false)
  • https enforced if forceHttps=true (independently of the value of portUnification)

I left a minor comment for the test code, PTAL.

@nkalmar
Copy link
Contributor Author

nkalmar commented Mar 25, 2021

Also, looking at the code "forceHTTPS" seems funky, I will change it to "forceHttps". Taking a quick look, all caps is not used for HTTPS in configs.

Copy link
Contributor

@symat symat left a comment

Choose a reason for hiding this comment

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

great, thanks! LGTM

@ztzg ztzg closed this in 0b6862e Mar 25, 2021
ztzg pushed a commit that referenced this pull request Mar 25, 2021
Initial commit to allow adminServer to only serve HTTPS requests
Questions:
-Is this fine that I stayed with portunification, or should we have a seperate secure port?

Author: Norbert Kalmar <[email protected]>

Reviewers: Mate Szalay-Beko <[email protected]>, Enrico Olivelli <[email protected]>

Closes #1652 from nkalmar/ZOOKEEPER-2512

(cherry picked from commit 0b6862e)
Signed-off-by: Damien Diederen <[email protected]>
Copy link
Contributor

@ztzg ztzg left a comment

Choose a reason for hiding this comment

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

LGTM (but not tested). This is now in master and branch-3.7. It is not in branch-3.7.0, as we currently have an open RC, nor in branch-3.6, as it did not cherry-pick cleanly. (Can you open another PR if you want it there?)

Cheers, -D

nkalmar added a commit that referenced this pull request Mar 25, 2021
Initial commit to allow adminServer to only serve HTTPS requests

Author: Norbert Kalmar <[email protected]>

Reviewers: Mate Szalay-Beko <[email protected]>, Enrico Olivelli <[email protected]>

Closes #1652 from nkalmar/ZOOKEEPER-2512
@nkalmar
Copy link
Contributor Author

nkalmar commented Mar 25, 2021

Thank you @ztzg , about 3.6... I did the cherry-pick and accidentally committed to apache 3.6 branch instead of mine, so, consider it done I guess. Sorry about that... I will see that the commit did not break anything.

Edit: commit seems good, spotbugs fails but from a different commit (quorumpeertest has a whitespace after a function start "(". It is not caused by my commit.

@ztzg
Copy link
Contributor

ztzg commented Apr 3, 2021

Thank you @ztzg , about 3.6... I did the cherry-pick and accidentally committed to apache 3.6 branch instead of mine, so, consider it done I guess. Sorry about that... I will see that the commit did not break anything.

:)

Edit: commit seems good, spotbugs fails but from a different commit (quorumpeertest has a whitespace after a function start "(". It is not caused by my commit.

Right; that has been fixed by @arshadmohammad while preparing 3.6.3. Thanks!

@nkalmar nkalmar deleted the ZOOKEEPER-2512 branch October 6, 2022 13:16
anuragmadnawat1 pushed a commit to anuragmadnawat1/zookeeper that referenced this pull request Nov 2, 2022
Initial commit to allow adminServer to only serve HTTPS requests
Questions:
-Is this fine that I stayed with portunification, or should we have a seperate secure port?

Author: Norbert Kalmar <[email protected]>

Reviewers: Mate Szalay-Beko <[email protected]>, Enrico Olivelli <[email protected]>

Closes apache#1652 from nkalmar/ZOOKEEPER-2512
anuragmadnawat1 added a commit to anuragmadnawat1/zookeeper that referenced this pull request Nov 2, 2022
Initial commit to allow adminServer to only serve HTTPS requests
Questions:
-Is this fine that I stayed with portunification, or should we have a seperate secure port?

Author: Norbert Kalmar <[email protected]>

Reviewers: Mate Szalay-Beko <[email protected]>, Enrico Olivelli <[email protected]>

Closes apache#1652 from nkalmar/ZOOKEEPER-2512

Co-authored-by: Norbert Kalmar <[email protected]>
anmolnar pushed a commit to anmolnar/zookeeper that referenced this pull request May 21, 2024
Initial commit to allow adminServer to only serve HTTPS requests
Questions:
-Is this fine that I stayed with portunification, or should we have a seperate secure port?

Author: Norbert Kalmar <[email protected]>

Reviewers: Mate Szalay-Beko <[email protected]>, Enrico Olivelli <[email protected]>

Closes apache#1652 from nkalmar/ZOOKEEPER-2512

Change-Id: I4a4779faa3fc988fe7a3204470471ac5aaabf989
(cherry picked from commit c839789)
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.

4 participants