Re: Feedback on draft-ssh-ext-info-00

denis bider <ietf-ssh3@denisbider.com> Sat, 05 December 2015 19:43 UTC

Return-Path: <bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org>
X-Original-To: ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com
Delivered-To: ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4C8AA1A8AF1 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Sat, 5 Dec 2015 11:43:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.909
X-Spam-Level:
X-Spam-Status: No, score=-1.909 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OziY4kR9fdnf for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Sat, 5 Dec 2015 11:43:29 -0800 (PST)
Received: from mail.netbsd.org (mail.NetBSD.org [199.233.217.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2B07E1A8AEF for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Sat, 5 Dec 2015 11:43:29 -0800 (PST)
Received: by mail.netbsd.org (Postfix, from userid 605) id 4172385F26; Sat, 5 Dec 2015 18:08:21 +0000 (UTC)
Delivered-To: ietf-ssh@netbsd.org
Received: by mail.netbsd.org (Postfix, from userid 1347) id 78E4685F20; Sat, 5 Dec 2015 18:08:09 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id E05D585EB6 for <ietf-ssh@netbsd.org>; Thu, 3 Dec 2015 07:09:34 +0000 (UTC)
X-Virus-Scanned: amavisd-new at netbsd.org
Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id T-GkudPCvuOt for <ietf-ssh@netbsd.org>; Thu, 3 Dec 2015 07:09:34 +0000 (UTC)
Received: from skroderider.denisbider.com (skroderider.denisbider.com [50.18.172.175]) (using TLSv1.1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.netbsd.org (Postfix) with ESMTPS id 2604385E9A for <ietf-ssh@netbsd.org>; Thu, 3 Dec 2015 07:09:34 +0000 (UTC)
X-Footer: ZGVuaXNiaWRlci5jb20=
Received: from localhost ([127.0.0.1]) by skroderider.denisbider.com for djm@mindrot.org; Thu, 3 Dec 2015 07:09:27 +0000
Date: Thu, 03 Dec 2015 07:09:27 +0000
Subject: Re: Feedback on draft-ssh-ext-info-00
X-User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Message-ID: <1655861333-3540@skroderider.denisbider.com>
X-Priority: 3
Importance: Normal
In-Reply-To: <1654355845-3540@skroderider.denisbider.com>
MIME-Version: 1.0
From: denis bider <ietf-ssh3@denisbider.com>
To: Damien Miller <djm@mindrot.org>
Cc: Markus Friedl <mfriedl@gmail.com>, ietf-ssh@netbsd.org
Content-Type: multipart/alternative; boundary="=-RtG9GWnzFmDWZtSxXTIT"
Sender: ietf-ssh-owner@NetBSD.org
List-Id: ietf-ssh.NetBSD.org
Precedence: list

If after considering this, you still really want the SERVICE_REQUEST + ACCEPT round-trip, then okay. I can change the spec to not alter this part, if this way we have something we can all agree on.

But if we change it this way, when do you want EXT_INFO to be sent? What is the window in which it should be accepted?

The current proposal makes the window:

- between NEWKEYS and SERVICE_REQUEST for the client, sent one time 

- between NEWKEYS and USERAUTH_SUCCESS for the server, sent any number of times (mainly so the server can send a second EXT_INFO just before USERAUTH_REQUEST. This way you can advertise extensions that alter user auth; but you can also have privacy for extensions that only take effect after.

If we change EXT_INFO the way you propose, and keep SERVICE_REQUEST + ACCEPT as-is - are you okay with these windows?


denis bider <ietf-ssh3@denisbider.com> , 12/3/2015 6:38 AM:
> Why add fixed-function fields to a generic extension mechanism? 

So as to avoid ret-conning functionality provided by SERVICE_REQUEST + ACCEPT.

These two messages always negotiate the service (e.g. "ssh-userauth"). So EXT_INFO, which is a replacement, also always negotiates the service.

This is in fact simpler than adding a "services" extension, and then mandating that this extension "MUST" be handled by all implementations. If some functionality must always be handled, a fixed field is appropriate.


> Merely advertising a willingness to accept SSH_MSG_EXT_INFO
> shouldn't have other further effects on the protocol. To do
> otherwise is IMO quite surprising. 
 
Okay, imagine this:

(1) Instead of the EXT_INFO message, we continue to send SERVICE_REQUEST + ACCEPT.

(2) The KEXINIT extension instead signals that extension fields can be added to SERVICE_REQUEST + ACCEPT.

(3) Presence of the KEXINIT extension further signals that the server can send a presumed SERVICE_ACCEPT, without waiting for SERVICE_REQUEST.

Do you see that this results in the same proposal, just with renamed messages?



Damien Miller <djm@mindrot.org> , 12/3/2015 6:31 AM:
On Thu, 3 Dec 2015, denis bider wrote: 
 
> I have posted a new draft to address this: 
>  
> https://tools.ietf.org/html/draft-ssh-ext-info-03 
>  
> The difference is that there is now a "services" field in EXT_INFO: 
>  
>     byte       SSH_MSG_EXT_INFO (value 7) 
>     name-list  services 
>     uint32     nr-extensions 
>     repeat "nr-extensions" times: 
>       string   extension-name 
>       string   extension-value 
>  
> And a section to describe it: 
>  
> 3.5.  Service Negotiation 
>   The client and server each include a name-list of supported services 
>   in EXT_INFO. The name-lists are matched to negotiate a service in the 
>   same way as name-lists are matched in KEXINIT. Clients and servers 
>   that support only "ssh-userauth" MUST send this service name only. 
>   Implementations supporting only one service MAY assume it will be 
>   negotiated, and MAY send messages on that premise without waiting. 
>  
> Would you agree this makes EXT_INFO a proper superset of SERVICE_REQUEST + 
> ACCEPT? 
 
This is over-complicated. Why add fixed-function fields to a generic 
extension mechanism? 
 
I'd support a simple magic name, offered in KEXINIT to indicate that an 
implementation is prepared to accept a SSH_MSG_EXT_INFO packet. 
Merely advertising a willingness to accept SSH_MSG_EXT_INFO shouldn't 
have other further effects on the protocol. To do otherwise is IMO quite 
surprising. 
 
Then, if you want to define a "die-service-request-die" extension that 
changes the protocol flow then you can do that without requiring other 
implementations to follow suit. 
 
-d