You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by "hubcio (via GitHub)" <gi...@apache.org> on 2026/06/11 09:12:46 UTC

[PR] feat(server-ng): reject incompatible clients at login via protocol version [iggy]

hubcio opened a new pull request, #3454:
URL: https://github.com/apache/iggy/pull/3454

   Version mismatches between SDK and server surfaced as runtime decode
   failures instead of a clear error at login. The VSR login-register
   body now starts with a required ClientVersionInfo prefix: the packed
   iggy_binary_protocol crate semver plus sdk name and version. The
   server gates on a [min, current-minor] range before touching
   credentials (patch never changes the wire) and rejects with a typed
   Eviction frame carrying the accepted window; a body without a
   decodable prefix is rejected with a dedicated MalformedLogin reason
   instead of the version window. The response advertises the server's
   protocol and build version; the language-neutral wire spec lives in
   the version module docs.
   
   The SDK decodes eviction and reply headers by byte offset instead of
   struct casts: response read buffers are not 16-aligned, and offset
   reads let the client sanity-check the protocol window. The dormant
   release field was deleted from all consensus headers in favor of the
   login gate; VSR is still WIP, so the layout change (command byte
   60 -> 56) and EvictionReason renumbering break no deployed clients.
   
   The SDK validates password and PAT token lengths before encoding,
   with the same bounds and errors the servers already enforce, so an
   oversized secret cannot desync the u8 length prefix; server-ng
   mirrors the legacy username/password bounds before lookup or
   hashing. SDK identity is recorded per connection in the
   SessionManager; get_clients wire exposure is a follow-up. The
   legacy server is untouched.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(server-ng): reject incompatible clients at login via protocol version [iggy]

Posted by "hubcio (via GitHub)" <gi...@apache.org>.
hubcio commented on code in PR #3454:
URL: https://github.com/apache/iggy/pull/3454#discussion_r3419045911


##########
core/binary_protocol/src/consensus/header.rs:
##########
@@ -138,10 +137,9 @@ pub struct RequestHeader {
     pub cluster: u128,
     pub size: u32,
     pub view: u32,
-    pub release: u32,

Review Comment:
   good call - dropped the release removal entirely. this commit no longer touches the VSR headers; `release` stays as-is on every frame. the only wire change left is the eviction frame carrying the protocol window, carved additively from its reserved bytes - no renumber, no offset shift. rolling upgrade / per-frame release belongs with the framework work, separate future PR.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(server-ng): reject incompatible clients at login via protocol version [iggy]

Posted by "hubcio (via GitHub)" <gi...@apache.org>.
hubcio merged PR #3454:
URL: https://github.com/apache/iggy/pull/3454


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(server-ng): reject incompatible clients at login via protocol version [iggy]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #3454:
URL: https://github.com/apache/iggy/pull/3454#issuecomment-4679094210

   ## [Codecov](https://app.codecov.io/gh/apache/iggy/pull/3454?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 72.46%. Comparing base ([`7bf1a24`](https://app.codecov.io/gh/apache/iggy/commit/7bf1a24acea03a8a97beedb802fb941659c9d8d2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`74b2928`](https://app.codecov.io/gh/apache/iggy/commit/74b292818afc693493850c66924f694b3d32f136?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3454      +/-   ##
   ============================================
   - Coverage     74.33%   72.46%   -1.87%     
     Complexity      943      943              
   ============================================
     Files          1247     1184      -63     
     Lines        122232   117398    -4834     
     Branches      98504    98268     -236     
   ============================================
   - Hits          90858    85075    -5783     
   - Misses        28413    29451    +1038     
   + Partials       2961     2872      -89     
   ```
   
   | [Components](https://app.codecov.io/gh/apache/iggy/pull/3454/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [Rust Core](https://app.codecov.io/gh/apache/iggy/pull/3454/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `75.42% <ø> (-0.02%)` | :arrow_down: |
   | [Java SDK](https://app.codecov.io/gh/apache/iggy/pull/3454/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `58.44% <ø> (ø)` | |
   | [C# SDK](https://app.codecov.io/gh/apache/iggy/pull/3454/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `69.92% <ø> (ø)` | |
   | [Python SDK](https://app.codecov.io/gh/apache/iggy/pull/3454/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `81.06% <ø> (ø)` | |
   | [PHP SDK](https://app.codecov.io/gh/apache/iggy/pull/3454/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.57% <ø> (ø)` | |
   | [Node SDK](https://app.codecov.io/gh/apache/iggy/pull/3454/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `87.27% <ø> (-3.94%)` | :arrow_down: |
   | [Go SDK](https://app.codecov.io/gh/apache/iggy/pull/3454/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `15.35% <ø> (-24.90%)` | :arrow_down: |
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/iggy/pull/3454?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [core/binary\_protocol/src/consensus/command.rs](https://app.codecov.io/gh/apache/iggy/pull/3454?src=pr&el=tree&filepath=core%2Fbinary_protocol%2Fsrc%2Fconsensus%2Fcommand.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9iaW5hcnlfcHJvdG9jb2wvc3JjL2NvbnNlbnN1cy9jb21tYW5kLnJz) | `100.00% <ø> (ø)` | |
   | [core/binary\_protocol/src/consensus/header.rs](https://app.codecov.io/gh/apache/iggy/pull/3454?src=pr&el=tree&filepath=core%2Fbinary_protocol%2Fsrc%2Fconsensus%2Fheader.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9iaW5hcnlfcHJvdG9jb2wvc3JjL2NvbnNlbnN1cy9oZWFkZXIucnM=) | `79.48% <ø> (-0.20%)` | :arrow_down: |
   | [...ary\_protocol/src/requests/users/change\_password.rs](https://app.codecov.io/gh/apache/iggy/pull/3454?src=pr&el=tree&filepath=core%2Fbinary_protocol%2Fsrc%2Frequests%2Fusers%2Fchange_password.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9iaW5hcnlfcHJvdG9jb2wvc3JjL3JlcXVlc3RzL3VzZXJzL2NoYW5nZV9wYXNzd29yZC5ycw==) | `100.00% <ø> (ø)` | |
   | [.../binary\_protocol/src/requests/users/create\_user.rs](https://app.codecov.io/gh/apache/iggy/pull/3454?src=pr&el=tree&filepath=core%2Fbinary_protocol%2Fsrc%2Frequests%2Fusers%2Fcreate_user.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9iaW5hcnlfcHJvdG9jb2wvc3JjL3JlcXVlc3RzL3VzZXJzL2NyZWF0ZV91c2VyLnJz) | `96.18% <ø> (ø)` | |
   | [...nary\_protocol/src/requests/users/login\_register.rs](https://app.codecov.io/gh/apache/iggy/pull/3454?src=pr&el=tree&filepath=core%2Fbinary_protocol%2Fsrc%2Frequests%2Fusers%2Flogin_register.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9iaW5hcnlfcHJvdG9jb2wvc3JjL3JlcXVlc3RzL3VzZXJzL2xvZ2luX3JlZ2lzdGVyLnJz) | `100.00% <ø> (ø)` | |
   | [...ocol/src/requests/users/login\_register\_with\_pat.rs](https://app.codecov.io/gh/apache/iggy/pull/3454?src=pr&el=tree&filepath=core%2Fbinary_protocol%2Fsrc%2Frequests%2Fusers%2Flogin_register_with_pat.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9iaW5hcnlfcHJvdG9jb2wvc3JjL3JlcXVlc3RzL3VzZXJzL2xvZ2luX3JlZ2lzdGVyX3dpdGhfcGF0LnJz) | `100.00% <ø> (ø)` | |
   | [...e/binary\_protocol/src/requests/users/login\_user.rs](https://app.codecov.io/gh/apache/iggy/pull/3454?src=pr&el=tree&filepath=core%2Fbinary_protocol%2Fsrc%2Frequests%2Fusers%2Flogin_user.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9iaW5hcnlfcHJvdG9jb2wvc3JjL3JlcXVlc3RzL3VzZXJzL2xvZ2luX3VzZXIucnM=) | `100.00% <ø> (ø)` | |
   | [...ary\_protocol/src/responses/users/login\_register.rs](https://app.codecov.io/gh/apache/iggy/pull/3454?src=pr&el=tree&filepath=core%2Fbinary_protocol%2Fsrc%2Fresponses%2Fusers%2Flogin_register.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9iaW5hcnlfcHJvdG9jb2wvc3JjL3Jlc3BvbnNlcy91c2Vycy9sb2dpbl9yZWdpc3Rlci5ycw==) | `100.00% <ø> (ø)` | |
   | [core/common/src/error/iggy\_error.rs](https://app.codecov.io/gh/apache/iggy/pull/3454?src=pr&el=tree&filepath=core%2Fcommon%2Fsrc%2Ferror%2Figgy_error.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9jb21tb24vc3JjL2Vycm9yL2lnZ3lfZXJyb3IucnM=) | `100.00% <ø> (ø)` | |
   | [core/common/src/traits/binary\_impls/mod.rs](https://app.codecov.io/gh/apache/iggy/pull/3454?src=pr&el=tree&filepath=core%2Fcommon%2Fsrc%2Ftraits%2Fbinary_impls%2Fmod.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9jb21tb24vc3JjL3RyYWl0cy9iaW5hcnlfaW1wbHMvbW9kLnJz) | `33.33% <ø> (ø)` | |
   | ... and [15 more](https://app.codecov.io/gh/apache/iggy/pull/3454?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | |
   
   ... and [123 files with indirect coverage changes](https://app.codecov.io/gh/apache/iggy/pull/3454/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(server-ng): reject incompatible clients at login via protocol version [iggy]

Posted by "krishvishal (via GitHub)" <gi...@apache.org>.
krishvishal commented on code in PR #3454:
URL: https://github.com/apache/iggy/pull/3454#discussion_r3416088510


##########
core/binary_protocol/src/consensus/header.rs:
##########
@@ -170,10 +168,9 @@ impl Default for RequestHeader {
             cluster: 0,
             size: 0,
             view: 0,
-            release: 0,

Review Comment:
   same here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(server-ng): reject incompatible clients at login via protocol version [iggy]

Posted by "krishvishal (via GitHub)" <gi...@apache.org>.
krishvishal commented on code in PR #3454:
URL: https://github.com/apache/iggy/pull/3454#discussion_r3416086541


##########
core/binary_protocol/src/consensus/header.rs:
##########
@@ -138,10 +137,9 @@ pub struct RequestHeader {
     pub cluster: u128,
     pub size: u32,
     pub view: u32,
-    pub release: u32,

Review Comment:
   `release: u32` field is removed from all consensus headers. This makes version gate in login only. This creates problems in mixed-version cluster during a rolling upgrade.
   
   The correct behavior would be to revive release field and assert that its non-zero in every frame. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org