summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2018-06-30 22:16:23 +0200
committerChristian Poessinger <christian@poessinger.com>2018-06-30 22:16:25 +0200
commit7217b2f9eae89f22aef35717417f261d8a681447 (patch)
treed4a6db22d8512c6bc9fb8461e64d3839b0438e27 /src/conf_mode
parent76e97115e46d992eab77120967db9d0fb83c6a38 (diff)
downloadvyos-1x-7217b2f9eae89f22aef35717417f261d8a681447.tar.gz
vyos-1x-7217b2f9eae89f22aef35717417f261d8a681447.zip
T714: SNMP: make user auth type mandatory
... if seclevel for group is auth or priv where the user belongs to
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/snmp.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/conf_mode/snmp.py b/src/conf_mode/snmp.py
index cbec20731..1590e5de4 100755
--- a/src/conf_mode/snmp.py
+++ b/src/conf_mode/snmp.py
@@ -651,6 +651,9 @@ def verify(snmp):
if user['authPassword'] == '' and user['authMasterKey'] == '':
raise ConfigError('Must specify encrypted-key or plaintext-key for user auth')
+ if user['authProtocol'] == '':
+ raise ConfigError('Must specify auth type')
+
# seclevel 'priv' is more restrictive
if seclevel is 'priv':
if user['privPassword'] and user['privMasterKey']: