doc: change AES192C and AES256C to AES192-C and AES256-C
Some checks failed
CI / 🤖 Check dependabot status (push) Has been cancelled
CI / ⚖️ Check licenses (push) Has been cancelled
CI / 🐧 Build and test on Linux (push) Has been cancelled
CI / 🍏 Build and test on macOS (push) Has been cancelled
CI / 🔍 Upload code coverage (push) Has been cancelled
CI / 🔭 Build Go backend (1.23) (push) Has been cancelled
CI / 🔭 Build Go backend (1.24) (push) Has been cancelled
CI / 🔭 Build JS frontend (18) (push) Has been cancelled
CI / 🔭 Build JS frontend (20) (push) Has been cancelled
CI / 🔭 Build JS frontend (22) (push) Has been cancelled
CI / 🐋 Build Docker images (push) Has been cancelled
CI / 🚀 Publish release (push) Has been cancelled

Also add a test to avoid a future regression.

Fix #1686
This commit is contained in:
Vincent Bernat
2025-03-05 21:26:50 +01:00
parent 5f5539fe7a
commit 7fecfe83ee
2 changed files with 28 additions and 1 deletions

View File

@@ -389,7 +389,7 @@ The `snmp` provider accepts the following configuration keys:
`user-name`, `authentication-protocol` (`none`, `MD5`, `SHA`, `SHA224`,
`SHA256`, `SHA384`, and `SHA512` are accepted), `authentication-passphrase`
(if the previous value was set), `privacy-protocol` (`none`, `DES`, `AES`,
`AES192`, `AES256`, `AES192C`, and `AES256C` are accepted, the later being
`AES192`, `AES256`, `AES192-C`, and `AES256-C` are accepted, the later being
Cisco-variant), `privacy-passphrase` (if the previous value was set), and
`context-name`.
- `ports` is a map from exporter subnets to the SNMP port to use to poll

View File

@@ -196,6 +196,33 @@ func TestConfigurationUnmarshallerHook(t *testing.T) {
},
}),
},
}, {
Description: "SNMP security parameters with AES256C",
Initial: func() interface{} { return Configuration{} },
Configuration: func() interface{} {
return gin.H{
"poller-timeout": "200ms",
"security-parameters": gin.H{
"user-name": "alfred",
"authentication-protocol": "sha",
"authentication-passphrase": "hello",
"privacy-protocol": "aes256-c",
"privacy-passphrase": "bye",
},
}
},
Expected: Configuration{
PollerTimeout: 200 * time.Millisecond,
Credentials: helpers.MustNewSubnetMap(map[string]Credentials{
"::/0": {
UserName: "alfred",
AuthenticationProtocol: AuthProtocolSHA,
AuthenticationPassphrase: "hello",
PrivacyProtocol: PrivProtocolAES256C,
PrivacyPassphrase: "bye",
},
}),
},
}, {
Description: "SNMP security parameters without privacy protocol",
Initial: func() interface{} { return Configuration{} },