Subject: [Idr] draft-ietf-idr-segment-routing-te-policy Policy Name Sub-TLV considerations

From: Jeffrey Haas <[email-masked]>
Date: Wed, 12 Feb 2020 18:17:12 -0500

Authors,

In draft-ietf-idr-segment-routing-te-policy-08, Section 2.4.6 we have a TLV
for Policy Name.  Its text is:

: 2.4.6.  Policy Name Sub-TLV
: 
:    An operator MAY set the Policy Name sub-TLV to attach a symbolic name
:    to the SR Policy candidate path.
: 
:    Usage of Policy Name sub-TLV is described in section 2 in
:    [I-D.ietf-spring-segment-routing-policy].
: 
:    The Policy Name sub-TLV may exceed 255 bytes length due to long
:    policy name.  Therefore a 2-octet length is required.  According to
:    [I-D.ietf-idr-tunnel-encaps], the first bit of the sub-TLV codepoint
:    defines the size of the length field.  Therefore, for the Policy Name
:    sub-TLV a code point of 128 or higher is used.
: 
:    The Policy Name sub-TLV is optional and it MUST NOT appear more than
:    once in the SR Policy TLV.
: 
:    The Policy Name sub-TLV has following format:
: 
:    0                   1                   2                   3
:     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
:    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
:    |     Type      |   Length                      |   RESERVED    |
:    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
:    //                        Policy Name                          //
:    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
: 
:    Where:
: 
:       Type: 129.
: 
:       Length: Variable.
: 
:       RESERVED: 1 octet of reserved bits.  SHOULD be set to zero on
:       transmission and MUST be ignored on receipt.
: 
:       Policy Name: Symbolic name for the policy.  It SHOULD be a string
:       of printable ASCII characters, without a NULL terminator.

draft-ietf-spring-segment-routing-policy-06, Section 2.1 discusses this
Sub-TLV:

:    An implementation MAY allow assignment of a symbolic name comprising
:    of printable ASCII characters to an SR Policy to serve as a user-
:    friendly attribute for debug and troubleshooting purposes.  Such
:    symbolic names may identify an SR Policy when the naming scheme
:    ensures uniqueness.

There are two observations I'd like to make:
1. A 65K length isn't very likely in BGP. :-)  I suggest that greater
guidance for shorter names should be offered. For example, perhaps limit the
length to 1K.  Alternatively, offer advice such as: "Implementations may
choose to truncate long Policy Names".

2. The guidance about "printable ASCII" is rather old-style and likely to
run askance of IESG review for internationalization considerations.  I'd
suggest that the field be encoded in UTF-8 and make reference to
print-safety similar to RFC 8203 (BGP Administrative Shutdown) in its
Security Considerations.

-- Jeff

---

From: "Ketan Talaulikar (ketant)" <[email-masked]>
Date: Thu, 13 Feb 2020 18:08:18 +0000

Hi Jeff,

I agree with you about the limits on the policy name size. 

I am not aware of any IETF standard that mandates the use of UTF-8 for encoding of string for names. The similar object in PCEP is encoded in ASCII - https://tools.ietf.org/html/rfc8231#section-7.3.2 

Thanks,
Ketan

-----Original Message-----
From: Jeffrey Haas <[email-masked]> 
Sent: 12 February 2020 15:17
To: [email-masked]; [email-masked]
Subject: draft-ietf-idr-segment-routing-te-policy Policy Name Sub-TLV considerations

Authors,

In draft-ietf-idr-segment-routing-te-policy-08, Section 2.4.6 we have a TLV for Policy Name.  Its text is:

There are two observations I'd like to make:
1. A 65K length isn't very likely in BGP. :-)  I suggest that greater guidance for shorter names should be offered. For example, perhaps limit the length to 1K.  Alternatively, offer advice such as: "Implementations may choose to truncate long Policy Names".

2. The guidance about "printable ASCII" is rather old-style and likely to run askance of IESG review for internationalization considerations.  I'd suggest that the field be encoded in UTF-8 and make reference to print-safety similar to RFC 8203 (BGP Administrative Shutdown) in its Security Considerations.

-- Jeff