Re: [Ace] Fwd: New Version Notification for draft-ietf-ace-oauth-authz-17.txt and draft-ietf-ace-oauth-params-01.txt

Ludwig Seitz <ludwig.seitz@ri.se> Wed, 12 December 2018 09:47 UTC

Return-Path: <ludwig.seitz@ri.se>
X-Original-To: ace@ietfa.amsl.com
Delivered-To: ace@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7FB61131148 for <ace@ietfa.amsl.com>; Wed, 12 Dec 2018 01:47:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, 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 ljMAqrd7i5d1 for <ace@ietfa.amsl.com>; Wed, 12 Dec 2018 01:47:26 -0800 (PST)
Received: from smtp-out11.electric.net (smtp-out11.electric.net [185.38.181.42]) (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 BD31512777C for <ace@ietf.org>; Wed, 12 Dec 2018 01:47:25 -0800 (PST)
Received: from 1gX16u-000R7C-Vk by out11c.electric.net with emc1-ok (Exim 4.90_1) (envelope-from <ludwig.seitz@ri.se>) id 1gX16v-000RAn-UC; Wed, 12 Dec 2018 01:47:21 -0800
Received: by emcmailer; Wed, 12 Dec 2018 01:47:21 -0800
Received: from [194.218.146.197] (helo=sp-mail-2.sp.se) by out11c.electric.net with esmtps (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.90_1) (envelope-from <ludwig.seitz@ri.se>) id 1gX16u-000R7C-Vk; Wed, 12 Dec 2018 01:47:20 -0800
Received: from [192.168.0.166] (10.116.0.226) by sp-mail-2.sp.se (10.100.0.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1531.3; Wed, 12 Dec 2018 10:47:20 +0100
To: Jim Schaad <ietf@augustcellars.com>, 'Stefanie Gerdes' <gerdes@tzi.de>, ace@ietf.org
References: <154322421294.8323.8505315870685563404.idtracker@ietfa.amsl.com> <cbd083d1-cb95-0732-aa8b-7c7de3f480d1@ri.se> <a0cdd836-7fe3-339e-0c48-961503857447@tzi.de> <03b601d49191$7d1bb400$77531c00$@augustcellars.com>
From: Ludwig Seitz <ludwig.seitz@ri.se>
Message-ID: <945fbebe-659f-ac72-3ab6-8e05447e7c92@ri.se>
Date: Wed, 12 Dec 2018 10:47:20 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1
MIME-Version: 1.0
In-Reply-To: <03b601d49191$7d1bb400$77531c00$@augustcellars.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Originating-IP: [10.116.0.226]
X-ClientProxiedBy: sp-mail-1.sp.se (10.100.0.161) To sp-mail-2.sp.se (10.100.0.162)
X-Outbound-IP: 194.218.146.197
X-Env-From: ludwig.seitz@ri.se
X-Proto: esmtps
X-Revdns:
X-HELO: sp-mail-2.sp.se
X-TLS: TLSv1.2:ECDHE-RSA-AES128-SHA256:128
X-Authenticated_ID:
X-PolicySMART: 14510320
X-Virus-Status: Scanned by VirusSMART (c)
X-Virus-Status: Scanned by VirusSMART (s)
Archived-At: <https://mailarchive.ietf.org/arch/msg/ace/nt7-9XAmOaQQ5HX-bceiyRb8yX8>
Subject: Re: [Ace] Fwd: New Version Notification for draft-ietf-ace-oauth-authz-17.txt and draft-ietf-ace-oauth-params-01.txt
X-BeenThere: ace@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Authentication and Authorization for Constrained Environments \(ace\)" <ace.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ace>, <mailto:ace-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ace/>
List-Post: <mailto:ace@ietf.org>
List-Help: <mailto:ace-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ace>, <mailto:ace-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 12 Dec 2018 09:47:29 -0000

On 11/12/2018 21:38, Jim Schaad wrote:
> 
> 
>> -----Original Message-----
>> From: Ace <ace-bounces@ietf.org> On Behalf Of Stefanie Gerdes
>> Sent: Tuesday, December 11, 2018 4:11 AM
>> To: Ludwig Seitz <ludwig.seitz@ri.se>; ace@ietf.org
>> Subject: Re: [Ace] Fwd: New Version Notification for
> draft-ietf-ace-oauth-authz-
>> 17.txt and draft-ietf-ace-oauth-params-01.txt
>>
>> Hi,
>>
>> I looked through the document again. Many issues have been fixed, but I
> still
>> have some comments:
>>
>> I still think that Section 5.8.1, in particular 5.8.1.1 should point out
> that RS must
>> check the integrity of the token und validate that it stems from an
> authorized
>> AS. Checking the iss field does not help in this case and I don't see much
> value
>> in this check; cryptographic assurance such as AS' signature or MAC of the
>> token is required to ascertain the authenticity, and in this case the
> issuer, of the
>> token.
> 
> I would agree with this.  I have never been sure why the 'iss' field is
> going to be useful.  The only place that I can see this would be an AS which
> is using one key but two identities.  I would argue that this is a situation
> that is prone to configuration errors and incorrect security.
> 

The value of checking the iss field is indeed limited, but if present I 
feel it MUST be checked.

The text does say that the RS must check the integrity of the token (see 
5.8.1.1.)

"Since the cryptographic wrapper of the token (e.g. a COSE message) 
could include encryption, it needs to be verified first, based on shared 
cryptographic material with recognized AS."

This implies that the RS must check that the AS is recognized, I will 
rephrase this to clarify that "recognized" means that the AS is 
authorized to issue tokens for the RS.


>> 5.8.1. exiting -> existing
>>
Fixed.


>> Section 5.8.1. states that RS must check that the expiration time given in
> the
>> exp field is in the future. This is difficult if the RS is not time
> synchronized.

Indeed, but in those cases one wouldn't use the exp claim in the first 
place. I will add some text to the assumptions on AS knowledge about C 
and RS to the effect that the AS should know if the RS can manage 
synchronized time.


>> Option 3 in section 5.8.3 seems to suggest that this field is not always
> required.
Indeed no claim is specifically required in the framework.

>> Instead of demanding that the exp field is checked the document should
>> demand that the RS somehow validates that the token is not expired.
> Checking
>> the exp field may be one example.
The document demands that exp is checked _if present_.
I don't like to normatively require something that is not concrete such 
as "somehow validate that the token is not expired". If we define other 
ways than exp and exi, then normative requirements should be placed in 
the documents that define those.

>>
>> C may receive keying material for the communication with RS from AS.
>> Unfortunately, the AS does not inform C how long the keying material is
> valid. C
>> therefore may use outdated keying material for the communication. C cannot
>> rely on RS to reject messages that were sent with outdated keying material
>> because 1. the information in the request sent by C may be confidential
> and is
>> then compromised and 2. C cannot be sure that it is actually communicating
>> with the intended RS if the keying material is no longer valid.
> 
> Would you feel that this would be eased by requiring the expires_in field to
> be required as part of the response?  It is the expiration of the token, but
> I have never understood the difference between the expiration of the token
> and the expiration of keying material myself.  Keying material never
> expires, you just cannot use it without a valid token.
>

Well you have several cases of keying material here:

a.) A symmetric pop-key bound to one or more tokens. That will only be 
valid as long as there is a valid token.

b.) An asymmetric key belonging to either client of RS, which may be 
bound to a token, or used to authenticate (e.g. in a DTLS-RPK 
handshake). Those are valid independently of the ACE framework and need 
to be managed, updated and expired by some other mechanisms.

c.) A symmetric key shared between C-AS or RS-AS for authentication 
purposes. ACE has no mechanisms for managing and updating this kind of 
keys. Starting to look into this looks lite a rat-hole to me.

Does any of you feel we should document this in the framework? I'm 
currently leaning towards no, but could be convinced otherwise.

>>
>> I did not find any indication how the client knows how to choose the
> correct
>> req_aud for RS. The document must point out that C may communicate with
>> the wrong RS unless C and AS have a common understanding how RS is
>> identified.
> 
> Scope is also something that the client does not know how to build.

Learning the correct req_aud and scope is out of scope (no pun intended) 
for ACE. This would either be part of the configuration of a client, or 
a client could look it up in some resource directory.
I'll add the note about needing to have a common understanding about how 
RS's are identified.

/Ludwig

-- 
Ludwig Seitz, PhD
Security Lab, RISE
Phone +46(0)70-349 92 51