Re: [kitten] GSS & krb5 mutual auth flags aren't -- they are about key confirmation

mrex@sap.com (Martin Rex) Wed, 08 May 2019 02:53 UTC

Return-Path: <mrex@sap.com>
X-Original-To: kitten@ietfa.amsl.com
Delivered-To: kitten@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CA9ED120073 for <kitten@ietfa.amsl.com>; Tue, 7 May 2019 19:53:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.9
X-Spam-Level:
X-Spam-Status: No, score=-6.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=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 sPHQVGDY8nfx for <kitten@ietfa.amsl.com>; Tue, 7 May 2019 19:53:53 -0700 (PDT)
Received: from smtpde02.smtp.sap-ag.de (smtpde02.smtp.sap-ag.de [155.56.68.140]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 196F4120048 for <kitten@ietf.org>; Tue, 7 May 2019 19:53:53 -0700 (PDT)
Received: from mail07.wdf.sap.corp (mail04.sap.corp [194.39.131.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtpde02.smtp.sap-ag.de (Postfix) with ESMTPS id 44zLdq30vGzKm; Wed, 8 May 2019 04:53:51 +0200 (CEST)
X-purgate-ID: 152705::1557284031-00000218-365DA75B/0/0
X-purgate-size: 6177
X-purgate: clean
X-purgate: This mail is considered clean (visit http://www.eleven.de for further information)
X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de
X-purgate-type: clean
X-SAP-SPAM-Status: clean
Received: from ld9781.wdf.sap.corp (ld9781.wdf.sap.corp [10.21.82.193]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail07.wdf.sap.corp (Postfix) with ESMTPS id 44zLdq1M12zGnwF; Wed, 8 May 2019 04:53:51 +0200 (CEST)
Received: by ld9781.wdf.sap.corp (Postfix, from userid 10159) id 1EF31404C; Wed, 8 May 2019 04:53:51 +0200 (CEST)
In-Reply-To: <20190506063408.GF21049@localhost>
References: <20190506063408.GF21049@localhost>
To: Nico Williams <nico@cryptonector.com>
Date: Wed, 08 May 2019 04:53:51 +0200
CC: kitten@ietf.org
Reply-To: mrex@sap.com
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="US-ASCII"
Message-Id: <20190508025351.1EF31404C@ld9781.wdf.sap.corp>
From: mrex@sap.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/kitten/wXPdHuUhL7h8q-YOKroVErmneMs>
Subject: Re: [kitten] GSS & krb5 mutual auth flags aren't -- they are about key confirmation
X-BeenThere: kitten@ietf.org
X-Mailman-Version: 2.1.29
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: <https://mailarchive.ietf.org/arch/browse/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: Wed, 08 May 2019 02:53:56 -0000

Nico Williams <nico@cryptonector.com> wrote:
> 
> See subject.
> 
> I assert that:
> 
>  - GSS_C_MUTUAL_FLAG is badly misnamed

Not really.

Original GSS-API implied initator towards acceptor authentication,
and GSS_C_MUTUAL_FLAG was used to request acceptor towards initiator
authentication.

The better terminology would have been to indicate the actually desired
(additional) function, rather than describing the addition of what is
requested, and what has been silently implied/assumed.


The difference became obvious when the "Anoymous" authentication was
added in GSS-APIv2, i.e. no authentication of initiator towards acceptor.


Web Browsers using TLS usually do what at the GSS-API would be the
combination of (GSS_C_ANON_FLAG|GSS_C_MUTUAL_FLAG), i.e.
unidirectional authentication, acceptor towards initiator.


> 
>  - GSS_C_MUTUAL_FLAGis not, never was, and never could have been about
>    mutual authentication in the sense of authenticating two peers to
>    each other,

Until GSS_C_ANON_FLAG was invented, MUTUAL was an implied requirement.

> 
>  - and GSS_C_MUTUAL_FLAGis, always was, and only could have been about
>    key confirmation.

GSS-API is about authentication of name-based entities.
There is no concept of keys in GSS-API.


> 
> It is understandable that "mutual authentication" had a somewhat
> confusing definition back when RFCs 1508, 1509, and 1510 were written
> (huh, notice the sequential RFC numbers...).  But it's time to nail it
> down.
> 
> First off, a high-level observation: GSS (and Kerberos) always deals in
> *two* principal names, so GSS and Kerberos are *always* about mutual
> authentication.

Nope.  Kerberos has always been about unidirectional authentication,
and most of the time, MUTUAL is still unidirectional.

Performing server name canonicalization through insecure DNS
has been insecure and a well-known bad idea in 1996.

You may want to check what Microsoft does 23 years later when encountering
DNS CNAME records for rfc4559 SPNEGO authentication...

(spoiler: insecure server name canonicalization through DNS)

Essentially, Kerberos 5 never provided mutual authentication in the
past, and you probably should not hold your breath until it happens.


> 
>     - SCRAM
>     
>       Always mutual in that one password authenticates a pair of peers.
>     
>       Always mutual in that key confirmation cannot be elided (per the
>       RFC).
>     
>       One could construct a SCRAM-like mechanism where the last message
>       from the acceptor can be omitted if GSS_C_MUTUAL_FLAG is not
>       requested, but one probably shouldn't.
>     
>     - Some GSS-PAKE
>     
>       Pretty much the same analysis as SCRAM.
>     
>     - NTLM
>     
>       Pretty much the same analysis as SCRAM.

Definite *NO* for NTLM.  NTLM is unidirectional initiator to target,
and susceptible to man-in-the-middle.  This was obvious in 1995,
and causes some amount of headaches earlier this year.

  https://www.theregister.co.uk/2019/01/25/microsoft_exchange_domain_admin_eop/


>     
>     - Some PKIX-based mechanism (SPKM, GSS-TLS, PKU2U) w/o directories
>       (i.e., not like mech_dh)

I know PKIX-based mechanisms that perform mutual properly.
But for convenience, some of them contain various tweaks/cheats to
perform just uni-directional authentication.


>
>       Some such mechanisms truly could support non-mutual authentication
>       in that one peer needs no credentials, not even anonymous
>       credentials.  E.g., an RSA key transport mechanism needs nothing
>       like an initiator credential.  Even if EDH is used, unless one
>       thinks of the initiator's private EDH key as a credential, there's
>       no need to authenticate an anonymous initiator name to the
>       acceptor.
>     
>       Again, key confirmation is not wise to omit.


Security guarantees of GSS-API apply only to application data that
has been protected by the GSS-API message protection primitives.

If someome abuses the GSS-API context token exchange for an OTP-scheme,
and then transfers application data without GSS-API message protection,
that's spoiling between most and all of the security
(again, rfc4559 HTTP Negotiate comes to mind).


> 
> We should start a separate thread to cover a case that came up recently:
> the desire for a way to name a target principal but not authenticate it
> in the sense of not require having trust anchors for authenticating it.

which is almost what Kerberos has been doing for the past 30 years thanks
to canonicalizing service names through insecure DNS...


> 
> Applications that want to use an anonymous name, should use... a
> GSS_C_NT_ANONYMOUS name, or use GSS_C_ANON_FLAG to request that the
> initiator be anonymous (more about this flag in some other thread).

The "Applications that want to use an anonymous name," above
sort of implies that the entire information conveyed must be
public and free.

Or were you also considering "pseudonymous", which GSS-API currently
does not address, such as a "one from a certain group", such as an
"unnamed paying customer".



> 
> If a mechanism always cannot authenticate the initiator, then it is a
> mechanism that doesn't provide mutual authentication (and notice that
> key confirmation has nothing to do with it, and that no flag could make
> the mechanism provide mutual authentication).
> 
> A mechanisms that always cannot authenticate an acceptor is probably not
> a very useful mechanis, so I won't think of such a thing.

these things are called "Web Browsers".  I'm not sure the folks from
CABforum share your view.

Have you noticed how poorly some browsers work with TLS client certificates?
Almost indistinguishable from malice.  Like "Enrollment"?

Ever tried to make your Google Chrome automatically select a TLS client
cert for accessing a Web Server that wants TLS client certs?
Maybe not exactly "Beware of the leopard"-style, but sufficiently close.
(stuff from Apple Inc. and TLS client certs?  even worse).


-Martin