netconf-wg / restconf

9 stars 4 forks source link

sec 3.5.1: keys mandatory in URI encoding #51

Closed abierman closed 8 years ago

abierman commented 8 years ago

The URI encoding rules includes this text:

o All the components in the "key" statement MUST be encoded. Partial instance identifiers are not supported.

GET /restconf/data/interfaces/interface !!! not allowed !!!

This rule is too restrictive:

This is allowed via fields, so why is it forbidden without fields?

Here, key values are not even allowed.

The MUST in 3.5.1 needs to be changed. It should be

If any keys are entered, then all keys MUST be entered. If the list node is not the last segment in the URI, then all key values MUST be present.

abierman commented 8 years ago

It should be noted that there is no way to retrieve just 1 entry in a config=false list with no keys defined. All entries are always returned.

This can produce an invalid XML response message-body

mbj4668 commented 8 years ago

I think the MUST is correct. All keys are needed to identify the resource. There is no resource defined for "all entries in a list". The "collection" resource was supposed to handle this case, but it is TDB later.

The fields param is just a way to ask for a subset of a given resource.

abierman commented 8 years ago

test about authorization is correct; do not mean authentication

abierman commented 8 years ago

I will add a sentence that these encoding rules only apply to data resources.

abierman commented 8 years ago

closed in draft-10