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

Simo Sorce <simo@redhat.com> Thu, 19 March 2015 15:20 UTC

Return-Path: <simo@redhat.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 74E031ACDBD for <kitten@ietfa.amsl.com>; Thu, 19 Mar 2015 08:20:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.912
X-Spam-Level:
X-Spam-Status: No, score=-6.912 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-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 3ZDwIgED7nyz for <kitten@ietfa.amsl.com>; Thu, 19 Mar 2015 08:20:18 -0700 (PDT)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 74E9D1ACD79 for <kitten@ietf.org>; Thu, 19 Mar 2015 08:20:13 -0700 (PDT)
Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2JFKAHo008433 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Mar 2015 11:20:11 -0400
Received: from [10.3.113.73] (ovpn-113-73.phx2.redhat.com [10.3.113.73]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2JFKAXh005587; Thu, 19 Mar 2015 11:20:10 -0400
Message-ID: <1426778409.2981.129.camel@willson.usersys.redhat.com>
From: Simo Sorce <simo@redhat.com>
To: Nico Williams <nico@cryptonector.com>
Date: Thu, 19 Mar 2015 11:20:09 -0400
In-Reply-To: <20150319151718.GD8099@localhost>
References: <20150311001817.GC7286@localhost> <1426771934.2981.127.camel@willson.usersys.redhat.com> <20150319151718.GD8099@localhost>
Organization: Red Hat, Inc.
Content-Type: text/plain; charset="UTF-8"
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
Archived-At: <http://mailarchive.ietf.org/arch/msg/kitten/4gVxNxaL41253lmmvlsWHGQLLtI>
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:20:19 -0000

On Thu, 2015-03-19 at 10:17 -0500, Nico Williams wrote:
> 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.

I guess it may be surprising in some cases, and expected in others,
unfortunately.
If you set the KRB5_CLIENT_KTNAME variable in recent MIT releases you
expect a default ccache to be created with whatever is in the keytab for
example. But you'd be surprised otherwise.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York