You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/03/10 20:07:00 UTC

[jira] [Commented] (PROTON-2490) SASL to AMQP handoff is unsuccessful in server contexts (e.g. for peer-to-peer)

    [ https://issues.apache.org/jira/browse/PROTON-2490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17504553#comment-17504553 ] 

ASF subversion and git services commented on PROTON-2490:
---------------------------------------------------------

Commit 2b8030694f8bc1b8eac71cc9d471725a6bf2fdc6 in qpid-protonj2's branch refs/heads/main from Timothy Bish
[ https://gitbox.apache.org/repos/asf?p=qpid-protonj2.git;h=2b80306 ]

PROTON-2490 Fix some issues with engine in SASL server mode

Fixes issue where an engine used as a SASL server does not properly
update the frame decoder state and interest mask.  Fixes issues in the
test peer when testing the engine as a SASL server and some API naming
in peer SASL expectation types.

> SASL to AMQP handoff is unsuccessful in server contexts (e.g. for peer-to-peer)
> -------------------------------------------------------------------------------
>
>                 Key: PROTON-2490
>                 URL: https://issues.apache.org/jira/browse/PROTON-2490
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: protonj2
>    Affects Versions: protonj2-1.0.0-M4
>            Reporter: Matt Selway
>            Assignee: Timothy A. Bish
>            Priority: Blocker
>
> When using the engine in a server context, i.e., not the client classes, the SASL to AMQP handoff does not complete correctly leaving the ProtonFrameDecodingHandler in the incorrect to process the followup AMQPHeader message.
> The problem appears to be caused by the `handleWrite(..., SASLEnvelope)` and `handleRead(..., SASLEnvelope)` methods resetting the ProtonFrameDecodingHandler's pipeline interests to 'read only'. However, this occurs before it processes the write of the final SASL Outcome frame, which is used to reset the ProtonFrameDecodingHandler's state to handle the next incoming AMQPHeader frame.
> The ProtonFrameDecodingHandler needs to be modified such that it only resets the interest to read only once it has processed the SASLOutcome and not before (unless it is a non-SASL engine).
> As it stands, it prevents the ProtonJ2 library from being used out of the box in server contexts, which default to SASL engine configurations. A temporary workaround is to add an engine handler to the pipeline that listens to writes, searches the pipeline for the decoder, and forces its reset at the appropriate time.
> It is recommended that Unit Tests be written to cover the SASL to AMQP handover portion of the protocol (and possibly other state transitions currently missing) as the current test suite only tests some aspects of the SASL protocol and AMQP protocols independently.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org