You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to implement secure candidate configuration checking in merge requests from our CI using ansible.
I found that there is no way to only grant a user with netconf access rights to run commit check only, and not commit.
Regardless of the permissions/allow-commands, a user with permissions to run commit check and use netconf can commit the configuration using a hidden command:
Due to the way allow-commands works, it's not possible to exclusively authorise internal-invoke junoscript-operation commit-configuration check on its own which would also fix the problem.
To allow an unprivileged CI user to verify merge request changes, I'd like to extend the ansible collection to support running the validate RPC - this requires PyEZ support first though.
I've cobbled together support in Ansible using the RPC module - it's a bit fragile but it works (I needed to fix a few bugs in ansible-junos-stdlib for this to work):
Is it possible to get support added for the 'validate' RPC?
https://www.juniper.net/documentation/us/en/software/junos/netconf/topics/task/netconf-configuration-verifying.html
Use case / background
I'm trying to implement secure candidate configuration checking in merge requests from our CI using ansible.
I found that there is no way to only grant a user with netconf access rights to run
commit check
only, and notcommit
.Regardless of the permissions/allow-commands, a user with permissions to run
commit check
and use netconf can commit the configuration using a hidden command:Due to the way allow-commands works, it's not possible to exclusively authorise
internal-invoke junoscript-operation commit-configuration check
on its own which would also fix the problem.To allow an unprivileged CI user to verify merge request changes, I'd like to extend the ansible collection to support running the
validate
RPC - this requires PyEZ support first though.I've cobbled together support in Ansible using the RPC module - it's a bit fragile but it works (I needed to fix a few bugs in ansible-junos-stdlib for this to work):
Adding support in PyEz would mean all of that ^ could just become this:
The text was updated successfully, but these errors were encountered: