Re: [kitten] Permissible (and imp..) side-effects of GSS_Acquire_cred()
Simo Sorce <simo@redhat.com> Thu, 19 March 2015 13:32 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 6E28E1A8A70 for <kitten@ietfa.amsl.com>; Thu, 19 Mar 2015 06:32:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.211
X-Spam-Level:
X-Spam-Status: No, score=-4.211 tagged_above=-999 required=5 tests=[BAYES_50=0.8, RCVD_IN_DNSWL_HI=-5, SPF_HELO_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 Vgm7TPOe_uW2 for <kitten@ietfa.amsl.com>; Thu, 19 Mar 2015 06:32:27 -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 21E301A8A74 for <kitten@ietf.org>; Thu, 19 Mar 2015 06:32:24 -0700 (PDT)
Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2JDWKjW032095 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Mar 2015 09:32:21 -0400
Received: from [10.3.113.73] (ovpn-113-73.phx2.redhat.com [10.3.113.73]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2JDWJgl001166; Thu, 19 Mar 2015 09:32:20 -0400
Message-ID: <1426771934.2981.127.camel@willson.usersys.redhat.com>
From: Simo Sorce <simo@redhat.com>
To: Nico Williams <nico@cryptonector.com>
Date: Thu, 19 Mar 2015 09:32:14 -0400
In-Reply-To: <20150311001817.GC7286@localhost>
References: <20150311001817.GC7286@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.27
Archived-At: <http://mailarchive.ietf.org/arch/msg/kitten/cZKaNj2F5Oljrqg0VRjbNXCTV4w>
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 13:32:29 -0000
On Tue, 2015-03-10 at 19:18 -0500, Nico Williams wrote: > The subject came up today, and I thought I'd state my opinion here about > permissible and impermissible side-effects of GSS_Acquire_cred(). (And, > indirectly, GSS_Init_sec_context() and GSS_Accept_sec_context().) > > It's certainly permissible for GSS_Acquire_cred() to have some kind of > side-effects. > > It's clear that GSS_Acquire_cred() was intended to get a "handle" to > credentials that exist. But side-effects crop up if we want it to bring > credentials into existence that weren't there before -- that's a big > side-effect, but it's also idempotent, and GSS apps in particular can't > really notice such a side-effect as the state transition is from > no-credentials to have-credentials [for some NAME(s) anyways]. > > For example, there have been implementations that if necessary would > pop-up a modal dialog asking the user for their password in order to > acquire credentials that would otherwise be unavailable. Such an > implementation has two side-effects: a) the modal interaction with the > user, and b) that credentials become available that had not been there > before. In some sense (a) is not a side-effect (it's not a modification > of the state of the world). (b) is a side-effect, but an idempotent > one (see above). > > Can we go from examples to principles? Let's try. > > I can see three principles: > > a) no side-effects outside caching, > b) idempotent side-effects only, > c) what principles? anything goes. > > The [implementation- and Kerberos-specific] question that came up was > (rephrased by me; others can chime in with additional questions like it): > > Given a keytab[0], can a call to GSS_Acquire_cred() change the > contents of a session's ccache[1], and if so, can it change the > default principal name? > > Principle (a) would lead to a generic answer like: tickets can be > cached, but notions of default principal cannot be set nor changed. > > Principle (b) would lead to a generic answer like; tickets can be > cached, the caches can be created, and the notion of default principal > can be set if not already set, but cannot be changed. > > Principle (c) allows any reasonable answer. > > In implementation-specific terms, (a) means that GSS_Acquire_cred() can > acquire a new TGT for the same principal(s) for which the default > cccol[2] or default ccache has TGTs, and it can re-initialize such > ccaches, but it cannot change the default principal for a session. This > leaves a corner case: you have a keytab but no cccol/ccache. For that > case the answer is that if there's no way make a good selection > of default principal, then the the TGT(s) should be saved somewhere if > possible, but still not be made available as the default credential > (perhaps this means that the TGTs are acquired every time they are > needed, and never cached). > > In implementation-specific terms, (b) means the same as (a) except that > if there's no cccol/ccache already, then the implementation can pick any > principal it likes from the keytab, and set it as the default principal. > > My preference is for (a), and if I can't get (a) (certainly some > implementations don't adhere to it) then (b); (c) is out. > > [0] A file containing long-term secret encryption keys for Kerberos > principals. > > [1] A file containing Kerberos tickets, possibly acquire with use of a > keytab. Typically a ccahce has tickets for just one client > principal. > > [2] A collection of ccaches, each for a different client principal. 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. Simo. -- Simo Sorce * Red Hat, Inc * New York
- Re: [kitten] Permissible (and imp..) side-effects… Simo Sorce
- Re: [kitten] Permissible (and imp..) side-effects… Nico Williams
- Re: [kitten] Permissible (and imp..) side-effects… Simo Sorce
- Re: [kitten] Permissible (and imp..) side-effects… Nico Williams
- Re: [kitten] Permissible (and imp..) side-effects… Simo Sorce
- Re: [kitten] Permissible (and imp..) side-effects… Nico Williams
- Re: [kitten] Permissible (and imp..) side-effects… Simo Sorce
- Re: [kitten] Permissible (and imp..) side-effects… Jeffrey Altman
- Re: [kitten] Permissible (and imp..) side-effects… Simo Sorce
- [kitten] Permissible (and imp..) side-effects of … Nico Williams