Re: [Pce] Genart last call review of draft-ietf-pce-pceps-14

Dhruv Dhody <dhruv.dhody@huawei.com> Mon, 31 July 2017 13:36 UTC

Return-Path: <dhruv.dhody@huawei.com>
X-Original-To: pce@ietfa.amsl.com
Delivered-To: pce@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0C55313229E; Mon, 31 Jul 2017 06:36:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.819
X-Spam-Level:
X-Spam-Status: No, score=-2.819 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_COMMENT_SAVED_URL=1.391, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, T_HTML_ATTACH=0.01, 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 Fw_ogWTNCuSg; Mon, 31 Jul 2017 06:36:14 -0700 (PDT)
Received: from lhrrgout.huawei.com (lhrrgout.huawei.com [194.213.3.17]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 23BF312EA95; Mon, 31 Jul 2017 06:36:12 -0700 (PDT)
Received: from 172.18.7.190 (EHLO lhreml701-cah.china.huawei.com) ([172.18.7.190]) by lhrrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DSK43203; Mon, 31 Jul 2017 13:36:09 +0000 (GMT)
Received: from BLREML703-CAH.china.huawei.com (10.20.4.172) by lhreml701-cah.china.huawei.com (10.201.108.42) with Microsoft SMTP Server (TLS) id 14.3.301.0; Mon, 31 Jul 2017 14:36:03 +0100
Received: from BLREML501-MBB.china.huawei.com ([10.20.5.200]) by blreml703-cah.china.huawei.com ([::1]) with mapi id 14.03.0301.000; Mon, 31 Jul 2017 19:05:51 +0530
From: Dhruv Dhody <dhruv.dhody@huawei.com>
To: "'Dale R. Worley'" <worley@ariadne.com>
CC: "gen-art@ietf.org" <gen-art@ietf.org>, "draft-ietf-pce-pceps.all@ietf.org" <draft-ietf-pce-pceps.all@ietf.org>, "pce@ietf.org" <pce@ietf.org>, "ietf@ietf.org" <ietf@ietf.org>, "dhruv.ietf@gmail.com" <dhruv.ietf@gmail.com>
Thread-Topic: [Pce] Genart last call review of draft-ietf-pce-pceps-14
Thread-Index: AQHTCZfWzqPRSDFqSU+m/UcLVejzmaJtQ7rA
Date: Mon, 31 Jul 2017 13:35:50 +0000
Message-ID: <23CE718903A838468A8B325B80962F9B8CB962D9@blreml501-mbb>
References: <23CE718903A838468A8B325B80962F9B8CB95DF7@blreml501-mbb> (dhruv.dhody@huawei.com) <87379de85h.fsf@hobgoblin.ariadne.com>
In-Reply-To: <87379de85h.fsf@hobgoblin.ariadne.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-originating-ip: [10.18.77.55]
Content-Type: multipart/mixed; boundary="_003_23CE718903A838468A8B325B80962F9B8CB962D9blreml501mbb_"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.597F324A.00F1, ss=1, re=0.000, recu=0.000, reip=0.000, vtr=str, vl=0, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32
X-Mirapoint-Loop-Id: 97a2993c040c166ea2819edd2dfdf4b1
Archived-At: <https://mailarchive.ietf.org/arch/msg/pce/lfT4BU5YsDD4-BCYcDRgHf8qY7E>
Subject: Re: [Pce] Genart last call review of draft-ietf-pce-pceps-14
X-BeenThere: pce@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Path Computation Element <pce.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/pce>, <mailto:pce-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/pce/>
List-Post: <mailto:pce@ietf.org>
List-Help: <mailto:pce-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/pce>, <mailto:pce-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 31 Jul 2017 13:36:20 -0000

Hi Dale,

Thanks for your further comments, please see inline..

> -----Original Message-----
> From: Dale R. Worley [mailto:worley@ariadne.com]
> Sent: 31 July 2017 06:26
> To: Dhruv Dhody <dhruv.dhody@huawei.com>
> Cc: gen-art@ietf.org; draft-ietf-pce-pceps.all@ietf.org; pce@ietf.org;
> ietf@ietf.org; dhruv.ietf@gmail.com
> Subject: Re: [Pce] Genart last call review of draft-ietf-pce-pceps-14
> 
> Dhruv Dhody <dhruv.dhody@huawei.com> writes:
> 
> The bulk of these items I either agree with completely or am willing to
> defer to your judgment.  The items that seem to merit further discussion
> are below.  Most of these items are consolidations of several remarks I
> made that seem to be the same fundamental question.
> 
> >> section 3.2: whether error TBA2/2 is distinct from error 1/1
> 
> > [[Dhruv Dhody]] The context of these error are different, one is
> > before TLS establishment (startTLS) and another is during PCEP session
> > establishment (which is after TLS has been established). IMHO it is
> > better to keep them distinct.
> 
> It's more complicated than that:  If a PCE does not like the first message
> it receives, if it implements PCEPS, it replies TBA2/2.  But if it does
> not implement PCEPS, it replies 1/1.  Similarly, a PCC may reject an
> initial message with either of these error codes, depending on the
> situation.  If the other endpoint does not implement PCEPS, it might be
> surprised by receiving TBA2/2, which it has no way of understanding in
> detail (although it will probably simply disconnect, which is what it
> would do in reaction to a 1/1).
> 
[[Dhruv Dhody]] You are right about this case, which I have clarified now -  

   If the PCEP speaker that only supports PCEPS connection (as a local
   policy), receives an Open message, it MUST treat it as an unexpected
   message and reply with a PCErr message with Error-Type set to 1 (PCEP
   session establishment failure) and Error-value set to 1 (reception of
   an invalid Open message or a non Open message).

In your description you mentioned the error TBA2/2, but the description of TBA2/2 is  - 

   A PCEP
   speaker receiving any other message apart from StartTLS, Open, or
   PCErr as the first message, MUST treat it as an unexpected message
   and reply with a PCErr message with Error-Type set to [TBA2 by IANA]
   (PCEP StartTLS failure) and Error-value set to 2 (reception of any
   other message apart from StartTLS, Open, or PCErr message), and MUST
   close the TCP connection.

So receiving of open message would not trigger this error. The new text above would take care of that. 

> A non-implementing endpoint rejects an initial message only with 1/1.
> 
> OTOH, once TLS has been established, then both endpoints can only object
> to the first encrypted message with 1/1.
> 
> There's nothing intrinsically incorrect about this, but it is rather
> complicated, particularly in the upward-compatibility case where the PCC
> is willing to accept either PCEPS-implementing or non-PCEPS-implementing
> connections.
> 
[[Dhruv Dhody]] I have created a table that describe all the cases as part the updated text.  
See https://github.com/dhruvdhody-huawei/ietf/raw/master/Compare.pdf 

> >> section 3.3: the distinction between StartTLSWait and OpenWait
> 
> > [[Dhruv Dhody]] Both timers are wait timers but they wait for
> > different messages and used in different context. Also the values can
> > be set differently based on the deployment.
> 
> There's a complication if a PCE allows both PCEPS and PCEP connections.
> In that case, it does not send its initial message until it receives a
> message from the PCC.  If the message is StartTLS, the PCC wants to
> connect using PCEPS and the PCE sends StartTLS; if the message is Open,
> the PCC wants to connect using PCEP and the PCE sends Open.
> 
> The question is, what timeout does the PCE use while waiting for the
> initial message?  If the connection *will be* PCEPS, it should use
> StartTLSWait (per draft-ietf-pce-pceps), if the connection *will be* PCEP,
> it should use OpenWait (per RFC 5440).  But it does not have the
> information to choose the timer.  The difficulty is that initially, the
> PCE is simulating both a PCEP and a PCEPS device, and using the message it
> receives from the PCC to disambiguate its situation.  But the timeout
> values prescribed for the two situations are different.
> 
> My feeling is that the two situations -- waiting for Open and waiting for
> StartTLS -- are not sufficiently distinguishable to allow prescribing two
> different timers.  Of course, this could be cured by proper configuration
> -- giving the same value to StartTLSWait and OpenWait.
> 
> OTOH, once TLS has been established and the Open messages are awaited,
> both endpoints use OpenWait.  However, this situation is not really the
> same as when the TCP connection has been just been established.  And yet,
> a PCE may be obligated to use the same timer for both situations.
> 
[[Dhruv Dhody]] You have noted something important, thanks for that. 

I would like to fix this by making sure that a PCEP speaker that supports PCEPS does not start OpenWait timer immediately after TCP session, it uses StartTLSWait timer instead. 
I would clarify that the OpenWait timer should be started after TLS establishment only. 

So a PCE that supports connection with TLS only or with/without TLS, it would use StartTLSWait timer initially, the OpenWait timer is started once the TLS is established. 
I also state the StartTLSWait should never be set less than OpenWait timer. 

Please see the diff, I hope these changes should solve the issue.  

> >> 3.2.  Initiating the TLS Procedures
> ...
> > Do you feel strongly about changing this?
> 
> Of course, I'm only a reviewer, you needn't defer to my opinion about
> anything.
> 
> >> Is there a well-defined way for a participant in a TLS connection
> >> start to receive *either* a PCErr message in the clear *or* whatever
> >> comes next in TLS setup -- and know which case has happened?  Is
> >> there a way to use popular modular TLS libraries and have the
> >> application above the library receive such a PCErr message?  I don't
> >> understand TLS nearly well enough to know the answer to this, but it
> >> would probably help implementors if answers were given to these
> questions.
> >
> > [[Dhruv Dhody]] If the TLS handshake is successful, both local and
> > remote parties are aware of this. Same is the case for TLS failure. So
> > receiving an error message in clear will not be a surprise.
> >
> > Also, I checked some of the other documents that describe the use of
> > TLS, but did not find any such handling.
> 
> OK, I think I understand now; my previous comment was based on a
> misunderstanding.  The correct sequence of operations for PCEPS setup is:
> Both endpoints send a StartTLS to each other.  After that, the initiator
> starts the TLS setup.  Alternatively, the PCC sends StartTLS and the non-
> PCEPS-implementing PCE sends a PCErr.  In either case, the PCC sends a
> StartTLS and then listens for a PCEP message in response.
> In any case, neither endpoint is ever in a situation where it could
> receive either a PCEP message or a TLS setup message.
> 
> >> 5.  Backward Compatibility
> ...
> > [[Dhruv Dhody]] Updated.
> >
> >    If a PCEP implementation that does not support PCEPS receives a
> >    StartTLS message, ...
> 
> I think this is a significant improvement, as you can never be too careful
> about upward-compatibility issues, especially when security is involved.
> 
> --
> 
> Concerning the figures:
> 
>                   +-+-+                 +-+-+
>                   |PCC|                 |PCE|
>                   +-+-+                 +-+-+
>                     |                     | Does not send
>                     |      StartTLS       | StartTLS as
>                     |-------------------->| cannot establish
>                     |                     | TLS
>                     |                     |
>                     |<--------------------| Send Error
>                     |      PCErr          | Error-Value 3/4
>                     |                     |
> 
> 
>    Figure 2: Both PCEP Speaker supports PCEPS, But cannot establish TLS
> 
> 
>                   +-+-+                 +-+-+
>                   |PCC|                 |PCE|
>                   +-+-+                 +-+-+
>                     |                     |  Does not support
>                     | StartTLS            |  PCEPS and thus
>                     | msg                 |  sends Open
>                     |-------              |
>                     |       \   Open      |
>                     |        \  msg       |
>                     |         \  ---------|
>                     |          \/         |
>                     |          /\         |
>                     |         /  -------->|
>                     |        /            |
>                     |<------              |
>                     |                     |
>                     |<--------------------| Send Error
>                     |       PCErr         | (non-Open message
>                     |                     |  received)
> 
> 
>              Figure 3: One PCEP Speaker does not support PCEPS
> 
> IIUC, in Figure 2 the error has error-value 3/4 and is "Not supported
> object" ... is that right?  I'd think it would be TBA2/4, "Failure,
> connection without TLS possible" (or TBA2/3, depending on circumstances).
> And in Figure 3, the error is 1/1.  It seems like it would be clearer if
> both the number and the text were shown for the error messages in both the
> figures.
> 
[[Dhruv Dhody]] Error-Value 3/4 meant Error TBA2/3 and Error TBA2/4 as I was focusing only on the error-values and not on error-type, but I agree this could be confusing and I have updated the figures. Also I have added some more figures. 

> Is there also this flow?
> 
>                   +-+-+                 +-+-+
>                   |PCC|                 |PCE|
>                   +-+-+                 +-+-+
>                     |                     |  Does not support
>                     | StartTLS            |  PCEPS and thus
>                     | msg                 |  sends Open
>                     |-------              |
>                     |       \   Open      |
>                     |        \  msg       |
>                     |         \  ---------|
>                     |          \/         |
>                     |          /\         |
>                     |         /  -------->|
>                     |        /            |
>                     |<------              |
>                     |                     |
>                     |-------------------->|
>                     |       PCErr         |
>                     |                     |
> 
> Where the error indicates "Expecting a StartTLS but received an Open"?
> Or is this situation always signaled by the receiver (as in Figure 3)
> rather than the initiator?

 [[Dhruv Dhody]] The text has been added which is generic and works for both PCC/PCE.  

I don't think we need a figure for that :)

Thanks again for your reviews. 

The diff between the last update and this is attached. 

Working copy, Diff: https://github.com/dhruvdhody-huawei/ietf

Regards,
Dhruv 
  
> 
> Dale