Subject: [Netconf] uri syntax in restconf

From: Martin Bjorklund <[email-masked]>
Date: Wed, 10 Dec 2014 10:08:03 +0100 (CET)

Hi,

RESTCONF can expose YANG instance data in URIs.  For example, the
resource for user 'bob' is:

/restconf/data/ietf-system:system/authentication/user=bob

What happens if the user name contains unicode characters outside the
ascii range?  For example, 'tomáš'?  RFC 3986, section 2.4 says:

   When a new URI scheme defines a component that represents textual
   data consisting of characters from the Universal Character Set [UCS],
   the data should first be encoded as octets according to the UTF-8
   character encoding [STD63]; then only those octets that do not
   correspond to characters in the unreserved set should be percent-
   encoded.

So tomáš would be encoded as tom%0x%e1%x1%61.

RESTCONF uses the https scheme.  Does this scheme use this translation
of UTF-8 characters?  If so, were is this specified?  RFC 3986 talks
about "new URI scheme".  What exactly does that mean?

/martin

---

From: Ladislav Lhotka <[email-masked]>
Date: Wed, 10 Dec 2014 10:25:08 +0100

> On 10 Dec 2014, at 10:08, Martin Bjorklund <[email-masked]> wrote:
> 
> Hi,
> 

RFC 7230?

Lada

> 
> 
> /martin
> 
> _______________________________________________
> Netconf mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netconf

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C

---

From: Martin Bjorklund <[email-masked]>
Date: Wed, 10 Dec 2014 10:49:18 +0100 (CET)

> > about "new URI scheme".  What exactly does that mean?

But originally, https was defined in 2817.  Are you saying that b/c
RFC 7230 is published after RFC 3986, the https scheme is
implicitly re-classified as a "new" scheme and thus the quoted
paragraph applies?  Does this mean that before 7230 was published,
https did NOT allow this UTF-8 transformation?

/martin

---

From: Ladislav Lhotka <[email-masked]>
Date: Wed, 10 Dec 2014 11:28:39 +0100

> On 10 Dec 2014, at 10:49, Martin Bjorklund <[email-masked]> wrote:
> 

I don’t think the adjective “new” has any special meaning, perhaps the text was just meant as instructions for URI scheme designers and implementors.

> https did NOT allow this UTF-8 transformation?

It sure did, the percent encoding is part of URI generic syntax as defined in RFC 3986 (and 2396 before that). RFC 7230 only explicitly says “http” and “https” conform to the URI generic syntax.

So I think there is no doubt about what a RESTCONF client is expected to do when encoding non-ASCII data in Request-URI.

Lada

---

From: t.petch <[email-masked]>
Date: Wed, 10 Dec 2014 12:10:42 +0000

----- Original Message -----
From: "Martin Bjorklund" <[email-masked]>
To: <[email-masked]>
Sent: Wednesday, December 10, 2014 9:08 AM

Hi,

<tp>

I am unclear which component this is part of but, in general, once you
are into
%xA0-D7FF
then you are into IRIs and RFC3987, which explains how to encode.

Tom Petch

/martin