apple / apple/swift-nio-ssh

Is the SSH user name accessible by the ChannelHandler?

Open
#57 3 comments 0 reactions 0 assignees View on GitHub
kind/enhancement
Dominant language
Swift
Stars
515
Forks
85
PR merge metrics
No merged PRs in 30d

Description

A server may care about which user has connected. I'm not seeing a path to connect the SSH user name to any of my handler code. I'm not even seeing it saved and available in `SSHChildChannel` or anything hanging off of it.

Unless I've missed something this will take some doing to add. Options include:

- Adding a `SSHChannelRequestEvent` with a description of the user name which is sent first.

- `NIOSSHHandler()` could get a new initializer which passes authentication information into the `inboundChildChannelInitializer:` equivalent.

Either of these presuppose that the user name is saved somewhere.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how authentication information reaches SSHChildChannel and whether the user name is retained there. Compare the proposed SSHChannelRequestEvent and NIOSSHHandler initializer approaches, including inboundChildChannelInitializer:, and finish when handler code can access the authenticated SSH user name through a documented, tested path.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.