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

Introduce handshake complete/failed events #39

Closed
artemredkin opened this issue Aug 14, 2020 · 3 comments · Fixed by #76
Closed

Introduce handshake complete/failed events #39

artemredkin opened this issue Aug 14, 2020 · 3 comments · Fixed by #76
Assignees

Comments

@artemredkin
Copy link
Contributor

Sometimes its better to be sure that main parent channel is established without errors, before child channels are created

@Joannis
Copy link
Collaborator

Joannis commented Aug 15, 2020

@artemredkin by "main parent channel" do you mean the overarching SSH connection? Or is there a specific child channel implementation that could have children of its own such as maybe SFTP?

@artemredkin
Copy link
Contributor Author

Yes, by main parent channel I mean main tcp-level connection. SFTP does not have its child channels, it uses the same child channel as SCP and exec.

@Joannis
Copy link
Collaborator

Joannis commented Aug 15, 2020

It's been a couple of months since I touched SFTP to be honest. But thanks for the clarification!

@artemredkin artemredkin self-assigned this Mar 1, 2021
artemredkin added a commit to artemredkin/swift-nio-ssh that referenced this issue Mar 1, 2021
Motivation:
Currently there is now way to wait for successful SSH session
establishment, the only way to continue is to try to create a child
channel. Given that most clients are expecting the session to be active
when both key exchange and user authenticaiton complete, I propose to
emit UserAuthSuccessEvent.  That way client can wait for that event or
fail if there is an error in the pipeline.

Modifications:
 - Adds UserAuthSuccessEvent event
 - Adds .event case to StateMachineInboundProcessResult
 - Adds emittion of event if StateMachineInboundProcessResult is .event
 - Adds two tests

Result:
Closes apple#39
artemredkin added a commit to artemredkin/swift-nio-ssh that referenced this issue Mar 2, 2021
Motivation:
Currently there is now way to wait for successful SSH session
establishment, the only way to continue is to try to create a child
channel. Given that most clients are expecting the session to be active
when both key exchange and user authenticaiton complete, I propose to
emit UserAuthSuccessEvent.  That way client can wait for that event or
fail if there is an error in the pipeline.

Modifications:
 - Adds UserAuthSuccessEvent event
 - Adds .event case to StateMachineInboundProcessResult
 - Adds emittion of event if StateMachineInboundProcessResult is .event
 - Adds two tests

Result:
Closes apple#39
artemredkin added a commit to artemredkin/swift-nio-ssh that referenced this issue Mar 2, 2021
Motivation:
Currently there is now way to wait for successful SSH session
establishment, the only way to continue is to try to create a child
channel. Given that most clients are expecting the session to be active
when both key exchange and user authenticaiton complete, I propose to
emit UserAuthSuccessEvent.  That way client can wait for that event or
fail if there is an error in the pipeline.

Modifications:
 - Adds UserAuthSuccessEvent event
 - Adds .event case to StateMachineInboundProcessResult
 - Adds emittion of event if StateMachineInboundProcessResult is .event
 - Adds two tests

Result:
Closes apple#39
artemredkin added a commit to artemredkin/swift-nio-ssh that referenced this issue Mar 3, 2021
Motivation:
Currently there is now way to wait for successful SSH session
establishment, the only way to continue is to try to create a child
channel. Given that most clients are expecting the session to be active
when both key exchange and user authenticaiton complete, I propose to
emit UserAuthSuccessEvent.  That way client can wait for that event or
fail if there is an error in the pipeline.

Modifications:
 - Adds UserAuthSuccessEvent event
 - Adds .event case to StateMachineInboundProcessResult
 - Adds emittion of event if StateMachineInboundProcessResult is .event
 - Adds two tests

Result:
Closes apple#39
@Lukasa Lukasa closed this as completed in #76 Mar 3, 2021
Lukasa pushed a commit that referenced this issue Mar 3, 2021
Motivation:
Currently there is now way to wait for successful SSH session
establishment, the only way to continue is to try to create a child
channel. Given that most clients are expecting the session to be active
when both key exchange and user authenticaiton complete, I propose to
emit UserAuthSuccessEvent.  That way client can wait for that event or
fail if there is an error in the pipeline.

Modifications:
 - Adds UserAuthSuccessEvent event
 - Adds .event case to StateMachineInboundProcessResult
 - Adds emittion of event if StateMachineInboundProcessResult is .event
 - Adds two tests

Result:
Closes #39
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 a pull request may close this issue.

2 participants