Subject: [Ace] WGLC for draft-ietf-ace-oscore-profile

From: Jim Schaad <[email-masked]>
Date: Mon, 8 Oct 2018 14:34:36 -0700

The chairs believe that the set of documents dealing with the OAuth
framework for constrained environments is nearing the point that we should
be able to advance it to the IESG for publication.   We therefore want to
have a full list of issues that need to be dealt with at the Bangkok
meeting.	

This starts a 2 week WGLC for draft-ietf-ace-oscore-profile

We know that the following issues are outstanding:

draft-ietf-ace-oscore-profile:
*  No current known issues

Jim & Roman

---

From: Jim Schaad <[email-masked]>
Date: Mon, 22 Oct 2018 12:08:53 -0700

* Section 1 - I understand the reasoning behind having the server send back
a nonce, although it would be good to have a description someplace about why
this is being done.  (I would also make it optional as not all RS need to do
this.)  I do not understand the reasoning behind having the client send a
nonce to the server.

* Section 3.1 - This is more general than the section, but you should not
use the URI path in the text, instead you should be using the name that is
in the authz document.

* Section 3.2 - Does it really make sense to use 'COSE_Key' to transport the
key data?  Would a different field name be better?

* Section 3.2 - Please provide a justification for the requirement that the
ids must be unique over the set of all clients and RS.   I can see that the
client ids need to be unique on a single RS and RS ids need to be unique for
any given client but not the broader statement.

* Please add an explicit section on when a RS and a client should discard
the security context.

* Section 6 - Ok I'll bite  - how does not echoing the nonce allow for a
man-in-the-middle attack given that the salt and shared secret are still
going to be known only to the C and RS and not to the MITM.  I can see a DOS
attack being made, but that can be done even without this just by causing
the response to never be delivered.

* Appendix - I am not sure that I think that the EDHOC profile should be in
this document as oppose to being in it's own document.  The fact that we
have not even tried to get this to work in any of the interop tests means
that I am less sure that it is well baked.

Jim

> -----Original Message-----
> From: Ace <[email-masked]> On Behalf Of Jim Schaad
> Sent: Monday, October 8, 2018 2:35 PM
> To: [email-masked]
> Subject: [Ace] WGLC for draft-ietf-ace-oscore-profile
> 
> _______________________________________________
> Ace mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/ace

---

From: Francesca Palombini <[email-masked]>
Date: Thu, 25 Oct 2018 11:46:39 +0000

Hi Jim,

Thank you for your review comments. We agree with all your points, and have opened issues: https://github.com/ace-wg/ace-oscore-profile/issues to get this fixed.

Inline some detailed answer.

Thanks,
Francesca

On 22/10/2018, 21:09, "Jim Schaad" <[email-masked]> wrote:

FP: The motivation for the nonce construction was in the security considerations, but I agree that having it in the Protocol Overview makes sense, so I opened an issue to fix that. The reason behind having the client create a nonce is that we are protecting against an attacker replaying an old RS message (containing an old nonce), which would provoke the creation of an old security context on the Client, and reuse of keys and nonces for a different (new) message.

FP: Agreed, issue opened to fix this.

FP: This was brought up several times, so we will make this change now.

FP: You are right, this requirement is too wide. We will replace with your suggestion.

FP: Ok we will add this. As mentioned in the issue, I have now only this 3 cases in mind: Partial IV space ends (either C or RS); the kid context on the RS side does not match with N1 (RS); C receives a number of Unauthorized (C), although that is a consideration/recommendations, details would be application specific. Do you see any other case relevant for this section?

FP: Ok so our mistake here is to use the term MitM, so to solve this we will replace with "on-path attacker". The following sentence should be correct with that fix "Moreover, the client echoes the nonce created by the RS, which verifies it before deriving the Security Context, and this protects against an adversary acting as an on path attacker and substituting the nonce in transit from client to RS to provoke the creation of different Security Contexts in the client and RS." Yes this is a DOS, but could also lead to reuse of keys and nonces, as mentioned before.

FP: Agreed, we will remove this from this document and move it to its own document
    
    Jim

---

From: Jim Schaad <[email-masked]>
Date: Thu, 25 Oct 2018 14:24:59 -0700

> From: Francesca Palombini <[email-masked]>
> Sent: Thursday, October 25, 2018 4:47 AM
> To: Jim Schaad <[email-masked]>; draft-ietf-ace-oscore-
> [email-masked]
> Cc: [email-masked]
> Subject: Re: [Ace] WGLC for draft-ietf-ace-oscore-profile
> 
> Hi Jim,
> 
> Thank you for your review comments. We agree with all your points, and
> have opened issues: https://github.com/ace-wg/ace-oscore-profile/issues to
> get this fixed.
> 
> FP: The motivation for the nonce construction was in the security
> considerations, but I agree that having it in the Protocol Overview makes
> sense, so I opened an issue to fix that. The reason behind having the client
> create a nonce is that we are protecting against an attacker replaying an old
> RS message (containing an old nonce), which would provoke the creation of
> an old security context on the Client, and reuse of keys and nonces for a
> different (new) message.

So what you are looking at is a client which is going to "forget" the current security context that it possesses for an RS but not the token, re-posting the token to the RS because it apparently thinks that the RS has forgotten the token and context without and then accepting the replay as being valid.  

I think that a client which has forgotten the security context is also going to forget the token and thus need a new one.
I think that a client which is going to remember the security context is also going to remember the nonce from the server and thus not rebuild the context if the same nonce comes back.

If this needs to be explicit - then it should be made so.

> FP: Ok we will add this. As mentioned in the issue, I have now only this 3
> cases in mind: Partial IV space ends (either C or RS); the kid context on the RS
> side does not match with N1 (RS); C receives a number of Unauthorized (C),
> although that is a consideration/recommendations, details would be
> application specific. Do you see any other case relevant for this section?

Well - there are thing like expiration of the token which would make sense as well.    If you re-register the token because of an unauthorized and get back a different nonce value.

> FP: Ok so our mistake here is to use the term MitM, so to solve this we will
> replace with "on-path attacker". The following sentence should be correct
> with that fix "Moreover, the client echoes the nonce created by the RS,
> which verifies it before deriving the Security Context, and this protects
> against an adversary acting as an on path attacker and substituting the nonce
> in transit from client to RS to provoke the creation of different Security
> Contexts in the client and RS." Yes this is a DOS, but could also lead to reuse
> of keys and nonces, as mentioned before.

See my above comment.  But there are no problems here with the server doing anything interesting as it would presumably not have generated the same nonce value as the last time.  This means that the client would generate new keys only if the previous comment was wrong.

I just don't see this as being a problem.  Merits discussion in Bangkok

Jim

---

From: Francesca Palombini <[email-masked]>
Date: Fri, 26 Oct 2018 12:46:01 +0000

Hi Jim,

It sounds like you are assuming that the Client would have to remember only one security context, but it is possible that the client has several (old) security contexts associated with one access token, for example if the RS has rebooted several times. It would be unreasonable to require the client to store and check all of those when deriving a new one (even if it is just the nonces). 

Also, it is not required that the AS provides a new access token to the Client, as it may be pre-generated and not expired. So in that case, if the client does not keep track of access tokens and security contexts it has used, it might end up with reused keys and nonces.

For both these reasons, we think that the client generated nonce is needed. If you agree with that, we can discuss where to transport these nonces, for example we can avoid echoing N1 if we use it as salt. Also, as you suggested, it seems like a good idea to make this mechanism optional. We prepare for discussion about this in Bangkok.

Thanks,
Francesca

On 25/10/2018, 23:25, "Jim Schaad" <[email-masked]> wrote:

    

    

    

    Jim