-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RPC edit-config payloads are not fully validated #337
Comments
Added checks of top-level objects at edit-config time. |
Looks right to me. |
Verified, thanks ^ |
It has been observed that if a load file operation (eg cli_load_syntax_file()) loads an invalid XML file (invalid from a YANG perspective), the RPC edit-config operation forwards the invalid XML to the backend, the backend does not check the sanity of the invalid XML, resulting in errors in the datastore.
Example: openconfig-network-instance. If a file contains:
where the top-level container "network-instances" are invalid. Only a single container is allowed.
This results in an edit-config with two containers which are not discarded by the backend.
The backend needs to validate the incoming payload
For RFC reference, see RFC 7950 Section 8.3:
The text was updated successfully, but these errors were encountered: