Repository navigation
Conversation
d32c280 to
9db4c9f
Compare
There was a problem hiding this comment.
Minor fixes
... well mostly, read-only show commands now need exec
Several read-only lookups are YANG actions, and the rpc tool sets the NACM user, so they are now denied for operators, guests and users in no group:
show bridge fdbruns the bridgeget-forwarding-databaseaction.show hardware <radio>scan and survey run the radio scan and channel-survey actions. The WebUI buttons for these do the same.Theactive-routeaction in ietf-routing
A guest is documented as read-only but gets an error from show bridge fdb. Add these to the * permit rule-list next to get-schema.
Should fix
- The guest deny lost exec. It had to go because
guest-aclprecedes the*permit list, so a guest exec deny would also blockget-schema. Move the permit list up to right after admin-acl and keep exec in the guest deny. Then the doc sentence "guests stay read-only even if the defaults are changed" holds, which matters since the doc now shows permit-by-default as a pattern - Operators cannot save over NETCONF:
copy-configis not permitted. Sysrepo still runs the NACM write check on the resulting diff, so permitting it is safe. The CLI and WebUI copy as a data write and are not affected - Operators can write the DHCP server and firewall subtrees but not their actions: statistics clear, address-set add/remove/flush. Decide whether that is intended and say so in the docs.
- default-permit-read permits exec, not read. Name it for what it does.
Nits
- ChangeLog bullet: one line runs past 72 columns and "but no longer the rest of the system" is awkward. Same overlong line in the operator bullet in
doc/system.md doc/nacm.mdintro: "lets everyone read ... but nobody change anything" needs "lets nobody change"- Permissions table lists operator exec as "Reboot, shutdown" but the rule also covers setting the time
- Trailer Resolves: #1658. The tree mostly uses Fixes #NNN
9db4c9f to
5fe8aaf
Compare
5fe8aaf to
5312a58
Compare
Thank you for Review @troglobit . now all the comments have been adressed. Exception being active-route, but we spoke about that one offline. |
|
This still fails in system upgrade test on two test systems. Postponing for v26.11 release. Quite possibly not cause by the changes on this branch, but I cannot tell for sure. |
5312a58 to
6ea1a89
Compare
With write and exec denied by default, the operator group only has permit rules for parts of the tree. show nacm listed it as denied, and admin too. Count permit rules as access, and let permit-all override the defaults. Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
Same as in the CLI, count permit rules as access so the operator group is not shown as denied. Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
Deny write and exec by default. Operators may still change the network setup, hostname, contact, location and time zone, and reboot. Guests stay read-only. Everyone may call get-schema and the actions that only read, like the bridge FDB, so NETCONF clients and show commands still work. Existing systems keep the NACM settings in their startup config. Fixes #1658 Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
Describe the new factory rules and what each user level can do. Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
Same NACM rules as the generated factory config, see #1658. Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
6ea1a89 to
072f7d3
Compare
|
Putting this one as draft until offline meeting FYI: @wkz @troglobit |
|
We've had some AFK discussions about this and the consensus so far is clear -- we should split this work into two parts (we can still use this PR and the issue):
We need to discuss how this affects an operator's (and guest users) abilities to read: interface counters, routes, etc. that with recent changes have become hidden behind new RPCs: Keep the test as it is. It now reads the factory NACM from the target instead of carrying its own copy, which is the right direction for the rest too. |
|
Don't forget to adapt the test that validates all custom factory-config.cfg. Unsure how, but we will be intrested if the resulting config still maps to the models. |
|
CCB: closing to split into 2 PRs. |
Description
Deny write and exec by default in the factory NACM config. Users in no
group could change almost everything before.
Existing systems keep their saved NACM settings.
Checklist
Tick relevant boxes, this PR is-a or has-a: