Re: [kitten] Permissible (and imp..) side-effects of GSS_Acquire_cred()

Nico Williams <nico@cryptonector.com> Thu, 19 March 2015 15:17 UTC

Return-Path: <nico@cryptonector.com>
X-Original-To: kitten@ietfa.amsl.com
Delivered-To: kitten@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 671C41A020A for <kitten@ietfa.amsl.com>; Thu, 19 Mar 2015 08:17:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.666
X-Spam-Level:
X-Spam-Status: No, score=-1.666 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, IP_NOT_FRIENDLY=0.334, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=no
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 xb_npYZ2h9xT for <kitten@ietfa.amsl.com>; Thu, 19 Mar 2015 08:17:25 -0700 (PDT)
Received: from homiemail-a28.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by ietfa.amsl.com (Postfix) with ESMTP id 392F01A03D5 for <kitten@ietf.org>; Thu, 19 Mar 2015 08:17:21 -0700 (PDT)
Received: from homiemail-a28.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a28.g.dreamhost.com (Postfix) with ESMTP id BA0201B4078; Thu, 19 Mar 2015 08:17:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=s/t/ULpB1p/H6C ZciGrqOj6aCSo=; b=fG3h2IF9dRk9SDGeMewpZ8+02VOFkESEKcZetPNInK5T5j orhNSoez4lvpl0cRMh684HosNK/uTy2ZMFz3iR/qmMRF1nfeOQcvs3hbaTIHNrA8 8Rlm4heSMH29EDDv75KL6HsFFOPJ5bRbp+BcXFZCmm+xtcZ6KTk9UBI2LvuqY=
Received: from localhost (108-207-244-174.lightspeed.austtx.sbcglobal.net [108.207.244.174]) (Authenticated sender: nico@cryptonector.com) by homiemail-a28.g.dreamhost.com (Postfix) with ESMTPA id 333CB1B405F; Thu, 19 Mar 2015 08:17:20 -0700 (PDT)
Date: Thu, 19 Mar 2015 10:17:19 -0500
From: Nico Williams <nico@cryptonector.com>
To: Simo Sorce <simo@redhat.com>
Message-ID: <20150319151718.GD8099@localhost>
References: <20150311001817.GC7286@localhost> <1426771934.2981.127.camel@willson.usersys.redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <1426771934.2981.127.camel@willson.usersys.redhat.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: <http://mailarchive.ietf.org/arch/msg/kitten/XLhxS0IBrYehEudn-qMNoX3hxJI>
Cc: kitten@ietf.org
Subject: Re: [kitten] Permissible (and imp..) side-effects of GSS_Acquire_cred()
X-BeenThere: kitten@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Common Authentication Technologies - Next Generation <kitten.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/kitten>, <mailto:kitten-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/kitten/>
List-Post: <mailto:kitten@ietf.org>
List-Help: <mailto:kitten-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/kitten>, <mailto:kitten-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 19 Mar 2015 15:17:26 -0000

On Thu, Mar 19, 2015 at 09:32:14AM -0400, Simo Sorce wrote:
> On Tue, 2015-03-10 at 19:18 -0500, Nico Williams wrote:
> > I can see three principles:
> > 
> > a) no side-effects outside caching,
> > b) idempotent side-effects only,
> > c) what principles?  anything goes.
> 
> I tend to agree with you in abstract, however given b) is the actual,
> and I would say expected in many cases, behavior, I do not't think we
> can retroactively mandate a), but b) should be good enough.

ISTR hearing someone (you?) say (a couple of weeks ago on a krbdev call)
that creating a default ccache with one of N > 1 principals' keytab
creds is sometimes surprising to users, and I can see why it would be!
This is a form of (b).  The problem here is setting the default
principal name when none had already been set -- a non-trivial side-effect.

I'm inclined to consider (b) a bug.  A low-priority bug perhaps, but a bug.

Implementations could do something else.  E.g., not cache (thus increasing
load on clients and KDCs), or cache in a "shadow default ccache", or
switch to DIR ccache.  Those are details.  The main thing is that (b) is
surprising.

Nico
--