The users are created from external application.
The dyncfg doesn’t have option to add users dynamically to confd when created externally and have them assigned to a group. (I couldn’t see option to add user in runtime in dyncfg, maybe i am wrong or missed something)
Basically i would like to create users as and when i wish and assign them to a group. All this in runtime.
In the standard standard authentication setup, “create a user” means adding a user entry here and its username to corresponding instances of /nacm/groups/group/user-name. You can read more details in the chapter “The AAA infrastructure” in the user guide.
Hi,
Thanks.
I have included both tailf-aaa and ietf-netconf-acm
So every time we add an user entry and add user entry to the group, shouldn’t we restart confD or will confD take care of itself to reflect the user entry and group association(/nacm/groups/group/user-name) in run time?
Will authorization(rule-lists) work dynamically or should we restart ConfD to reflect the changes?
There is definitely no need to restart ConfD, and in the standard setup there is no need to do anything else - your application changes AAA and/or NACM configuration, commits, and ConfD immediately starts using that for new user sessions.
I tried the below rule list for user ‘abc’ to allow CLI but restrict NETCONF. But this doesn’t seem to work.
I shouldn’t be able to connect to netconf but I could with the below rule-list.
From the ConfD UG chapter “Command Authorization” and the tailf-acm.yang model:
Command rules control access to CLI commands and Web UI functions.
I.e. command rules does not work with NETCONF, only with CLI and JSON-RPC (WebUI).
See ConfD UG chapter “Rpc, notification, and data authorization” and the RFC has some additional examples for different types of rules RFC 8341: Network Configuration Access Control Model.
NACM handles authorization, not authentication. You would need to write some code to handle your use case. See the confd_dp_lib(3) section “AUTHENTICATION CALLBACK”. The protocol information is located in the struct confd_user_info *uinfo.
So whenever i tried to read or write, i get the below error
29-Apr-2023::15:33:43.830 saber2 confd[<0.11748.0>]: devel-aaa User: Admin[ADMIN] rejected data access path /nacm:nacm op write due to no rule matched and node has nacm:default-deny-all
When i perform get-config on nacm or aaa, i get empty results. And if i do edit-config on nacm, it throws above error.
Kindly let know if i am missing something here. I would like to create users and groups in run time.
I believe the above configuration was not set, or all users would have been allowed to do read, write, exec since there are no deny rules in your NACM configuration.