Closed cconstab closed 3 months ago
Feature discovery is already done; currently clients (sshnp and npt) will throw an error if a feature they require is not available on the daemon
e.g. (snippet from sshnp in SshnpCore.initialize):
List<(DaemonFeature, bool, String)> features = await featureCheckFuture;
sendProgress('Received daemon feature check response');
for (final (DaemonFeature _, bool supported, String reason) in features) {
if (!supported) throw SshnpError(reason);
}
We could improve the error messages which are displayed based on what features are missing; currently for example we would show "This device daemon does not authenticate to the socket rendezvous" - instead we could show "This device daemon is on an older version which does not support authentication to the socket rendezvous; use the '--no-ad' option in your client command-line"
All of the descriptions are in an extension to the DaemonFeature enum
extension FeatureDescription on DaemonFeature {
String get description {
switch (this) {
case DaemonFeature.acceptsPublicKeys:
return 'accept ssh public keys from the client';
case DaemonFeature.srAuth:
return 'authenticate to the socket rendezvous';
case DaemonFeature.srE2ee:
return 'encrypt traffic to the socket rendezvous';
case DaemonFeature.supportsPortChoice:
return 'support requests for specific device ports';
}
}
}
Path of least resistance, and safest imo, is to output a better message - i.e. update the descriptions in the FeatureDescription extension. I did initially consider having the clients auto-adjust their session parameters based on what the daemon supported but I think it is better to be very explicit.
Docs updated by https://github.com/atsign-foundation/noports/pull/1048 to point out that flags are needed.
Is your feature request related to a problem? Please describe.
need to specify
--no-ad --no-et
when the daemon is using the Python sshnpd.How would you know to do this ?
Describe the solution you'd like
Could the sshnp command find this out and remove the need to specify these arguments ?
Describe alternatives you've considered
No response
Additional context
No response