From a70a4001fe0b3a91a7d86191ff32dcc7205d2eae Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 27 Dec 2021 19:22:46 +0100 Subject: snmp: T4093: add missing verify() step for required group per snmp v3 user --- src/conf_mode/snmp.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/conf_mode/snmp.py b/src/conf_mode/snmp.py index e1852f2ce..8475e6808 100755 --- a/src/conf_mode/snmp.py +++ b/src/conf_mode/snmp.py @@ -489,6 +489,10 @@ def verify(snmp): # Group must exist prior to mapping it into a group # seclevel will be extracted from group # + if 'group' not in user or user['group'] == '': + username = user['name'] + raise ConfigError(f'Group membership required for user "{username}"!') + if user['group']: error = True if 'v3_groups' in snmp.keys(): -- cgit v1.2.3