Skip to content

Reimplement interserver mode to avoid replay attacks - #47213

Merged
tavplubix merged 1 commit into
ClickHouse:masterfrom
azat:interserver-mode-v2
Mar 15, 2023
Merged

tavplubix merged 1 commit into
ClickHouse:masterfrom
azat:interserver-mode-v2

Conversation

@azat

@azat azat commented Mar 3, 2023 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Reimplement interserver mode to avoid replay attacks (note, that change is backward compatible with older servers)

Previous implementation (DBMS_MIN_REVISION_WITH_INTERSERVER_SECRET) accepts the salt from the client, which make it useless.

Re implement the protocol to send the salt by the server and use it in the client instead.

Fixes: #39903 (cc @tavplubix @alexey-milovidov @vitlibar )
Follow-up for: #13156

@tavplubix tavplubix self-assigned this Mar 3, 2023
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-improvement Pull request with some product improvements label Mar 3, 2023
@azat
azat force-pushed the interserver-mode-v2 branch 2 times, most recently from f5c4ab3 to 7603105 Compare March 3, 2023 17:02
Comment thread src/Client/Connection.cpp Resolved
Comment thread src/Server/TCPHandler.cpp Resolved
Comment thread src/Server/TCPHandler.cpp Resolved
@azat
azat force-pushed the interserver-mode-v2 branch 2 times, most recently from 1fd2956 to d3f4b90 Compare March 14, 2023 19:44
Prevous implementation (DBMS_MIN_REVISION_WITH_INTERSERVER_SECRET)
accepts the salt from the client, which make it useless.

Reimplement the protocol to send the salt by the server and use it in
the client instead.

Signed-off-by: Azat Khuzhin <[email protected]>
@azat
azat force-pushed the interserver-mode-v2 branch from d3f4b90 to bcf381c Compare March 15, 2023 07:29
@azat

azat commented Mar 15, 2023

Copy link
Copy Markdown
Member Author

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

Labels

pr-improvement Pull request with some product improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Salt in "interserver mode" is useless and does not protect from replay attack

3 participants