[kitten] Clarification of gss_add_cred() behavior

Nico Williams <nico@cryptonector.com> Thu, 19 March 2015 02:52 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 AD24E1A8701 for <kitten@ietfa.amsl.com>; Wed, 18 Mar 2015 19:52:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.034
X-Spam-Level: *
X-Spam-Status: No, score=1.034 tagged_above=-999 required=5 tests=[BAYES_50=0.8, 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 GdHfOIl4uKyT for <kitten@ietfa.amsl.com>; Wed, 18 Mar 2015 19:52:19 -0700 (PDT)
Received: from homiemail-a111.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by ietfa.amsl.com (Postfix) with ESMTP id DDBF51A8700 for <kitten@ietf.org>; Wed, 18 Mar 2015 19:52:19 -0700 (PDT)
Received: from homiemail-a111.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a111.g.dreamhost.com (Postfix) with ESMTP id 9BE052005E61A for <kitten@ietf.org>; Wed, 18 Mar 2015 19:52:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:subject:message-id:mime-version:content-type; s= cryptonector.com; bh=QXhwH9LVntsL4AxENgq32whCBbY=; b=h7e3wCJ8mWW LmMiKN6jZjhBgzikLhKEpvslXGnNPK6++T00gGUuH54NJHDzzk60RUEN4pDYa765 iNpP9K9kdX/2RxH11cPblVdYb8WlZDPwI8OTq1ChXChMtDQx2Ce0UFlPeg5rMZ8h w+64Q9hWTTdDr39VpfZ2Jk0oOqIK+wOw=
Received: from localhost (108-207-244-174.lightspeed.austtx.sbcglobal.net [108.207.244.174]) (Authenticated sender: nico@cryptonector.com) by homiemail-a111.g.dreamhost.com (Postfix) with ESMTPA id 6B2752005E619 for <kitten@ietf.org>; Wed, 18 Mar 2015 19:52:18 -0700 (PDT)
Date: Wed, 18 Mar 2015 21:52:02 -0500
From: Nico Williams <nico@cryptonector.com>
To: kitten@ietf.org
Message-ID: <20150319025202.GB8099@localhost>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: <http://mailarchive.ietf.org/arch/msg/kitten/nTw39So2WXSWv4aONSu_QJYTnQs>
Subject: [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 02:52:20 -0000

I need a clarification of RFCs 2743 and 2744 as to GSS_add_cred().

    Is it really the case that calling GSS_Add_cred() with no
    input_cred_handle (GSS_C_NO_CREDENTIAL) must ignore desired_name
    even when it is not the GSS_C_NO_NAME??

I think the answer is that this text in RFC2743 section 2.1.4, page 39:

   If GSS_C_NO_CREDENTIAL is specified as input_cred_handle, a non-NULL
   output_cred_handle must be supplied.  For the case of
   GSS_C_NO_CREDENTIAL as input_cred_handle, GSS_Add_cred() will create
   the credential referenced by its output_cred_handle based on default
   behavior.  That is, the call will have the same effect as if the
   caller had previously called GSS_Acquire_cred(), specifying the same
   usage and passing GSS_C_NO_NAME as the desired_name parameter
   (thereby obtaining an explicit credential handle corresponding to
   default behavior), had passed that credential handle to
   GSS_Add_cred(), and had finally called GSS_Release_cred() on the
   credential handle received from GSS_Acquire_cred().

and the corresponding and matching text in RFC2744 section 5.3, are
subtly wrong.  This text should have read thusly:

   If GSS_C_NO_CREDENTIAL is specified as input_cred_handle, a non-NULL
   output_cred_handle must be supplied.  For the case of
   GSS_C_NO_CREDENTIAL as input_cred_handle and desired_name as
   GSS_C_NO_NAME, GSS_Add_cred() will create
   the credential referenced by its output_cred_handle based on default
   behavior.  ...

That is, it should be possible to call GSS_Add_cred() with
input_cred_handle == GSS_C_NO_CREDENTIAL and a
desired_name != GSS_C_NO_NAME, and get a CREDENTIAL HANDLE for that
desired_name.

Otherwise GSS_Add_cred() is mostly useless.

I think this must have been a drafting error.  It's obvious to me, but
maybe someone has a very different opinion as to this (Martin?).

Nico
--