summaryrefslogtreecommitdiff
path: root/interface-definitions/snmp.xml.in
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-07-11 17:55:21 +0200
committerChristian Poessinger <christian@poessinger.com>2020-07-11 17:55:21 +0200
commitd9c7dfb1e7a8ad4a44b571e3d4b8d87ff3898678 (patch)
treebd9a273b36de1357178cf6c2e13f482c981aac1d /interface-definitions/snmp.xml.in
parent8eb65fa66974e2b409fb367fe9fb2c5d65fc8332 (diff)
downloadvyos-1x-d9c7dfb1e7a8ad4a44b571e3d4b8d87ff3898678.tar.gz
vyos-1x-d9c7dfb1e7a8ad4a44b571e3d4b8d87ff3898678.zip
snmp: T2687: precalculate snmpv3 encrypted keys
As of now when adding new credentials for any SNMPv3 user we submit the credential either plaintext or encrypted. A plaintext credential will be hashed by SNMPd in the background and then passed back into the CLI so it's not stored in cleartext. This feels like the wrong way in changing the CLI content with data produced by a 3rd party daemon which implements the service. It feels like the tail wiggles the entire dog. This should be changed in the following way: - After retrieving the plaintext password from CLI, use Python to hash the key in advance - Re-populate the encrypted key into the CLI and drop the plaintext one - Generate service configuration and continue startup of SNMPd This also fixes a race condition when SNMPd started up but not properly provided the hasehd keys in the configuration resulting in a ConfigurationError. Now as we also support binding SNMPd to a VRF this fixes a deadlock situation on bootup as we can only bind late to the VRF and require up to 5 restarts of the service - but the service will never start.
Diffstat (limited to 'interface-definitions/snmp.xml.in')
-rw-r--r--interface-definitions/snmp.xml.in28
1 files changed, 14 insertions, 14 deletions
diff --git a/interface-definitions/snmp.xml.in b/interface-definitions/snmp.xml.in
index 4894d0ce8..2fe8ce583 100644
--- a/interface-definitions/snmp.xml.in
+++ b/interface-definitions/snmp.xml.in
@@ -197,9 +197,9 @@
<children>
<leafNode name="engineid">
<properties>
- <help>Specifies the EngineID that uniquely identify an agent (e.g. 0xff42)</help>
+ <help>Specifies the EngineID that uniquely identify an agent (e.g. 000000000000000000000002)</help>
<constraint>
- <regex>(0x){0,1}([0-9a-f][0-9a-f]){1,18}$</regex>
+ <regex>^([0-9a-f][0-9a-f]){1,18}$</regex>
</constraint>
<constraintErrorMessage>ID must contain an even number (from 2 to 36) of hex digits</constraintErrorMessage>
</properties>
@@ -284,16 +284,16 @@
<help>Defines the privacy</help>
</properties>
<children>
- <leafNode name="encrypted-key">
+ <leafNode name="encrypted-password">
<properties>
<help>Defines the encrypted key for authentication</help>
<constraint>
- <regex>0x[0-9a-f]*$</regex>
+ <regex>^[0-9a-f]*$</regex>
</constraint>
<constraintErrorMessage>Encrypted key must only contain hex digits</constraintErrorMessage>
</properties>
</leafNode>
- <leafNode name="plaintext-key">
+ <leafNode name="plaintext-password">
<properties>
<help>Defines the clear text key for authentication</help>
<constraint>
@@ -341,16 +341,16 @@
<help>Defines the privacy</help>
</properties>
<children>
- <leafNode name="encrypted-key">
+ <leafNode name="encrypted-password">
<properties>
<help>Defines the encrypted key for privacy protocol</help>
<constraint>
- <regex>0x[0-9a-f]*$</regex>
+ <regex>^[0-9a-f]*$</regex>
</constraint>
<constraintErrorMessage>Encrypted key must only contain hex digits</constraintErrorMessage>
</properties>
</leafNode>
- <leafNode name="plaintext-key">
+ <leafNode name="plaintext-password">
<properties>
<help>Defines the clear text key for privacy protocol</help>
<constraint>
@@ -442,16 +442,16 @@
<help>Specifies the auth</help>
</properties>
<children>
- <leafNode name="encrypted-key">
+ <leafNode name="encrypted-password">
<properties>
<help>Defines the encrypted key for authentication</help>
<constraint>
- <regex>0x[0-9a-f]*$</regex>
+ <regex>^[0-9a-f]*$</regex>
</constraint>
<constraintErrorMessage>Encrypted key must only contain hex digits</constraintErrorMessage>
</properties>
</leafNode>
- <leafNode name="plaintext-key">
+ <leafNode name="plaintext-password">
<properties>
<help>Defines the clear text key for authentication</help>
<constraint>
@@ -514,16 +514,16 @@
<help>Defines the privacy</help>
</properties>
<children>
- <leafNode name="encrypted-key">
+ <leafNode name="encrypted-password">
<properties>
<help>Defines the encrypted key for privacy protocol</help>
<constraint>
- <regex>0x[0-9a-f]*$</regex>
+ <regex>^[0-9a-f]*$</regex>
</constraint>
<constraintErrorMessage>Encrypted key must only contain hex digits</constraintErrorMessage>
</properties>
</leafNode>
- <leafNode name="plaintext-key">
+ <leafNode name="plaintext-password">
<properties>
<help>Defines the clear text key for privacy protocol</help>
<constraint>