CESNET / netopeer2

NETCONF toolset
BSD 3-Clause "New" or "Revised" License
300 stars 188 forks source link

For filtering RW/config data for get-config from client #1359

Closed chendrashekarp closed 1 year ago

chendrashekarp commented 1 year ago

Hi @michalvasko , is there a way to apply custom filters at server for sending the response for get-config on an xpath?

michalvasko commented 1 year ago

What "filters" are you talking about exactly? XPath filter for get-config works as it should and according to the spec.

chendrashekarp commented 1 year ago

Hi @michalvasko , i want to add filters at server such that particular netconf-client user only can read the data from a list with key (i will have the mapping between user-name & key)

chendrashekarp commented 1 year ago

Hi @michalvasko, please find the snap-shot & attaching the yang too image processing_elements.txt Need your inputs on this

michalvasko commented 1 year ago

It seems this would match creating a NACM entry for this list with the USER XPath variable. Unfortunately, it is not currently supported but once I have some spare time, I will try to look at it.

chendrashekarp commented 1 year ago

Hi @michalvasko , this is bit urgent , is there any expected date for this ? Please

michalvasko commented 1 year ago

Well, I may get to it fairly soon (a day or two later) but I have no idea how long it would take to implement. There is a reason it is not supported, it may be quite challenging.

chendrashekarp commented 1 year ago

Okay @michalvasko , Thank you

michalvasko commented 1 year ago

Should be supported in the latest sysrepo, you can now use $USER instead of a key value in a path node in NACM and it will be replaced by the current user.