Re: tunneling and exec channel request support for SSH URIs

Jeffrey Hutzelman <jhutz@cmu.edu> Tue, 13 April 2010 19:22 UTC

Return-Path: <bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org>
X-Original-To: ietfarch-secsh-tyoxbijeg7-archive@core3.amsl.com
Delivered-To: ietfarch-secsh-tyoxbijeg7-archive@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id DEF9828C10C for <ietfarch-secsh-tyoxbijeg7-archive@core3.amsl.com>; Tue, 13 Apr 2010 12:22:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.392
X-Spam-Level:
X-Spam-Status: No, score=-5.392 tagged_above=-999 required=5 tests=[AWL=-1.207, BAYES_40=-0.185, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QhXRnurCOWll for <ietfarch-secsh-tyoxbijeg7-archive@core3.amsl.com>; Tue, 13 Apr 2010 12:22:48 -0700 (PDT)
Received: from mail.netbsd.org (mail.NetBSD.org [IPv6:2001:4f8:3:7:2e0:81ff:fe52:9ab6]) by core3.amsl.com (Postfix) with ESMTP id 5F1263A67D2 for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Tue, 13 Apr 2010 12:22:47 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 0) id B0C5063B146; Tue, 13 Apr 2010 19:22:31 +0000 (UTC)
Delivered-To: ietf-ssh@NetBSD.org
Received: from smtp01.srv.cs.cmu.edu (SMTP01.SRV.CS.CMU.EDU [128.2.217.196]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "smtp.srv.cs.cmu.edu", Issuer "CS CA Web 2" (not verified)) by mail.netbsd.org (Postfix) with ESMTPS id BF3A363B125 for <ietf-ssh@NetBSD.org>; Tue, 13 Apr 2010 19:22:29 +0000 (UTC)
Received: from [192.168.0.104] (SIRIUS.FAC.CS.CMU.EDU [128.2.216.216]) (authenticated bits=0) by smtp01.srv.cs.cmu.edu (8.13.6/8.13.6) with ESMTP id o3DIFjVg014958 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 13 Apr 2010 14:15:47 -0400 (EDT)
Date: Tue, 13 Apr 2010 14:15:44 -0400
From: Jeffrey Hutzelman <jhutz@cmu.edu>
To: Nicolas Williams <Nicolas.Williams@oracle.com>, Jim Wigginton <wiggie@alumni.cs.utexas.edu>
cc: ietf-ssh@NetBSD.org, jhutz@cmu.edu
Subject: Re: tunneling and exec channel request support for SSH URIs
Message-ID: <699E2DFCB2765DC2E00628CF@atlantis.pc.cs.cmu.edu>
In-Reply-To: <20100412172112.GM10389@Sun.COM>
References: <r2zf6cc097f1004042156j819b562aqacffed730dc3bc14@mail.gmail.com> <20100412172112.GM10389@Sun.COM>
X-Mailer: Mulberry/4.0.8 (Linux/x86)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format="flowed"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
X-Scanned-By: mimedefang-cmuscs on 128.2.217.196
Sender: ietf-ssh-owner@NetBSD.org
List-Id: ietf-ssh.NetBSD.org
Precedence: list

--On Monday, April 12, 2010 12:21:13 PM -0500 Nicolas Williams 
<Nicolas.Williams@oracle.com> wrote:

> On Sun, Apr 04, 2010 at 09:56:01PM -0700, Jim Wigginton wrote:
>> I was thinking about SSH URI's some and I think it'd be neat if the
>> draft for SSH URI's supported tunneling and exec style channel
>> requests.  eg.
>>
>> ssh://user@host.example.com/exec:ls%20-la
>>
>> ...or...
>>
>> ssh://user@host.example.com/tunnel:www.google.com:80
>>
>> As is, the only thing that SSH URI's, as defined in the draft
>> (draft-ietf-secsh-scp-sftp-ssh-uri-04), really support, it seems, are
>> retrieving files via SFTP and opening interactive shells.  And
>> although that, I suppose, has its uses, I think SSH URI's could be
>> made a lot more versatile by adding support for the above.
>
> Good point.  But where should we stop?

A URI should identify a resource.  That is, it should identify some 
particular object or service, such as an interactive shell, a file in SFTP 
(arguably this should be a distinct URI scheme), or some other subsystem. 
It does not need to and probably should not be capable of expressing 
configuration of parameters that control how we talk to the ssh server, 
such as algorithm selection.

IMHO...

- We _do_ want to be able to specify a username, and yes, even a password.
  Remember, you're not expressing the password of the user following the
  URI; you're expressing the password needed to access the resource.  It
  is common to set up a resource which requires a username and password,
  and then advertise the username and password to a limited audience.

- We _do_ want to be able to have URI's that refer to interactive
  shells, if only because this is the "main" service SSH provides.

- We _do_ want to be able to have URI's that refer to connections
  to arbitrary subsystems.  Some subsystems may be more useful to access
  in this way than others.

- We _do_ want to be able to have URI's that refer to specific files
  accessed via SFTP.  However, this probably wants to be a separate
  URI scheme.

- We _do_ want to be able to have URI's that establish tunnels which
  allow the SSH client to connect to services on the SSH server's network.
  This type of tunnel is a common use of SSH, and makes sense both as a
  service and as a URI resource.  It poses no threat to the user of such
  a URI, provided the selection of a port on the client end is up to the
  SSH client and _not_ contained in the URI, and that the SSH client takes
  the usual precautions for such tunnels.

- We do _not_ want to be able to have URI's that establish tunnels which
  allow the SSH server to connect to services on the SSH client's network.

- We do _not_ want URI's to be able to express preferences for algorithm
  selection in any form.  This would amount to allowing the provider of a
  URI to override the client's security policy, which is a bad idea.

- A user agent may wish to restrict what userauth methods can be used,
  based on its ability to handle user interaction or on local security
  policy.  In fact, we probably should offer advice about taking care
  with the use of non-interactive authentication methods, lest an attacker
  trick a user into issuing a command to some service.

- In a similar vein, probably we should not allow SSH URI's that direct
  the user to execute a particular command on a remote SSH server.  That
  sounds exceedingly dangerous.

- And, an SSH URI should not be able to control behaviors like agent
  forwarding, which again are a matter of client security policy and
  should not be subject to override.

-- Jeff