microsoft / microsoft/dev-tunnels-ssh
Missing Public API for SSH Extensions
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 161
- Forks
- 34
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 2
Description
Currently, the only public API to obtain the protocol extensions is the following property of SshSession:
// Summary:
// Gets the set of protocol extensions (and their values) enabled for the current
// session.
//
// Remarks:
// Populated only after an (optional) ExtensionInfoMessage is received from the
// other side.
public IReadOnlyDictionary<string, string>? ProtocolExtensions => Protocol?.Extensions;
Which is implemented by taking the intersection of the local and remote extensions:
// file SshSession.cs, method HandleMessageAsync(ExtensionInfoMessage message, CancellationToken cancellation)
foreach (string protocolExtension in Config.ProtocolExtensions)
{
if (extensionInfo.TryGetValue(protocolExtension, out var value))
{
Protocol.Extensions.Add(protocolExtension, value);
}
}
This results in loss of information, as there's no other public API to obtain the extensions the remote party advertised and aren't in the local extension list.
Some SSH extensions are only advertised by one of the parties, as noted by RFC 8308:
When it is specified, an extension MAY dictate that, in order to take
effect, both parties must include it in their SSH_MSG_EXT_INFO or
that it is sufficient for only one party to include it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in SshSession.cs at HandleMessageAsync(ExtensionInfoMessage message, CancellationToken cancellation), and read the RFC 8308 section linked in the issue. Trace how ProtocolExtensions is populated, then define a public way to access remote-advertised extensions that are not in the local list while preserving the existing negotiated view.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100