Re: [kitten] Clarification of gss_add_cred() behavior

Nico Williams <nico@cryptonector.com> Thu, 19 March 2015 19:56 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 45EF81A8F46 for <kitten@ietfa.amsl.com>; Thu, 19 Mar 2015 12:56:08 -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 l6T1URz8iWwL for <kitten@ietfa.amsl.com>; Thu, 19 Mar 2015 12:56:07 -0700 (PDT)
Received: from homiemail-a33.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by ietfa.amsl.com (Postfix) with ESMTP id 8CADB1A8F40 for <kitten@ietf.org>; Thu, 19 Mar 2015 12:56:07 -0700 (PDT)
Received: from homiemail-a33.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a33.g.dreamhost.com (Postfix) with ESMTP id 74221594058; Thu, 19 Mar 2015 12:56:07 -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=NEN4CIMC05ZO9H Q1HrG5D8D9C1I=; b=ea16J8xkjwHVm66Zv04mCi3eOxhXPkPNxka6tkVhhpKvAD 9OQOgqF0s4YqzMgPU2BM+vetf0gzf9Rnft7zsa6jpbbRRbVW8wLbmBllCEOj4Eyl 2tGcA+VPkOz3cSf17Lw68UIvMgb8qJzP+8PqxZ4iCYIbXD/9OvzP753pOYwbs=
Received: from localhost (108-207-244-174.lightspeed.austtx.sbcglobal.net [108.207.244.174]) (Authenticated sender: nico@cryptonector.com) by homiemail-a33.g.dreamhost.com (Postfix) with ESMTPA id DAC8E594054; Thu, 19 Mar 2015 12:56:06 -0700 (PDT)
Date: Thu, 19 Mar 2015 14:56:06 -0500
From: Nico Williams <nico@cryptonector.com>
To: Benjamin Kaduk <kaduk@MIT.EDU>
Message-ID: <20150319195605.GM8099@localhost>
References: <20150319025202.GB8099@localhost> <alpine.GSO.1.10.1503191446260.3953@multics.mit.edu> <20150319194002.GG4309@mournblade.imrryr.org> <alpine.GSO.1.10.1503191541510.3953@multics.mit.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <alpine.GSO.1.10.1503191541510.3953@multics.mit.edu>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: <http://mailarchive.ietf.org/arch/msg/kitten/ZTmc66dbWwIrXyuz_5ad9k-25ms>
Cc: kitten@ietf.org
Subject: Re: [kitten] Clarification of gss_add_cred() behavior
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 19:56:08 -0000

On Thu, Mar 19, 2015 at 03:50:22PM -0400, Benjamin Kaduk wrote:
> Nico says:
> > The problem is the spec effectivel says that when input_cred_handle ==
> > GSS_C_NO_CREDENTIAL then desired_name is ignored.  This seems like a
> > mistake.
> 
> My reply is that GSS_C_NO_CREDENTIAL means the default credentials which
> in turn means the default name.  There's no use for an explcit name when
> the default name is being used.

But I have a desired_name, and if it is the GSS_C_NO_NAME, then sure,
that means "default", but if it's not, then gss_add_cred() is useless.

Think about what the quoted RFC text means...  First GSS will acquire a
default credential (for what mechanisms?  not stated!).  THEN it will
try to add an element for the desired_mech... which element should
already be present, therefore GSS_Add_cred() with input_cred_handle ==
GSS_C_NO_CREDENTIAL -> same as GSS_Acquire_cred() with desired_name ==
GSS_C_NO_NAME.  But then I can never use GSS_Add_cred() to acquire a
signle-element credential, and I must always use GSS_Acquire_cred() for
that (which is lame for several reasons).

This totally conflicts with the stated purpose of GSS_Add_cred():

   GSS_Add_cred() enables callers to construct credentials iteratively
   by adding credential elements in successive operations, corresponding
   to different mechanisms.  This offers particular value in multi-
   mechanism environments, as the major_status and minor_status values
   returned on each iteration are individually visible and can therefore
   be interpreted unambiguously on a per-mechanism basis. A credential
   element is identified by the name of the principal to which it
   refers.  [...]

Nico
--