fix(inputs.snmp_trap): Enable SHA ciphers (#14665)
This commit is contained in:
parent
120167501b
commit
f9f2adf3ae
|
|
@ -65,13 +65,13 @@ details.
|
||||||
## Deprecated in 1.20.0; no longer running snmptranslate
|
## Deprecated in 1.20.0; no longer running snmptranslate
|
||||||
## Timeout running snmptranslate command
|
## Timeout running snmptranslate command
|
||||||
# timeout = "5s"
|
# timeout = "5s"
|
||||||
## Snmp version
|
## Snmp version; one of "1", "2c" or "3".
|
||||||
# version = "2c"
|
# version = "2c"
|
||||||
## SNMPv3 authentication and encryption options.
|
## SNMPv3 authentication and encryption options.
|
||||||
##
|
##
|
||||||
## Security Name.
|
## Security Name.
|
||||||
# sec_name = "myuser"
|
# sec_name = "myuser"
|
||||||
## Authentication protocol; one of "MD5", "SHA" or "".
|
## Authentication protocol; one of "MD5", "SHA", "SHA224", "SHA256", "SHA384", "SHA512" or "".
|
||||||
# auth_protocol = "MD5"
|
# auth_protocol = "MD5"
|
||||||
## Authentication password.
|
## Authentication password.
|
||||||
# auth_password = "pass"
|
# auth_password = "pass"
|
||||||
|
|
|
||||||
|
|
@ -17,13 +17,13 @@
|
||||||
## Deprecated in 1.20.0; no longer running snmptranslate
|
## Deprecated in 1.20.0; no longer running snmptranslate
|
||||||
## Timeout running snmptranslate command
|
## Timeout running snmptranslate command
|
||||||
# timeout = "5s"
|
# timeout = "5s"
|
||||||
## Snmp version
|
## Snmp version; one of "1", "2c" or "3".
|
||||||
# version = "2c"
|
# version = "2c"
|
||||||
## SNMPv3 authentication and encryption options.
|
## SNMPv3 authentication and encryption options.
|
||||||
##
|
##
|
||||||
## Security Name.
|
## Security Name.
|
||||||
# sec_name = "myuser"
|
# sec_name = "myuser"
|
||||||
## Authentication protocol; one of "MD5", "SHA" or "".
|
## Authentication protocol; one of "MD5", "SHA", "SHA224", "SHA256", "SHA384", "SHA512" or "".
|
||||||
# auth_protocol = "MD5"
|
# auth_protocol = "MD5"
|
||||||
## Authentication password.
|
## Authentication password.
|
||||||
# auth_password = "pass"
|
# auth_password = "pass"
|
||||||
|
|
|
||||||
|
|
@ -156,14 +156,14 @@ func (s *SnmpTrap) Start(acc telegraf.Accumulator) error {
|
||||||
authenticationProtocol = gosnmp.MD5
|
authenticationProtocol = gosnmp.MD5
|
||||||
case "sha":
|
case "sha":
|
||||||
authenticationProtocol = gosnmp.SHA
|
authenticationProtocol = gosnmp.SHA
|
||||||
//case "sha224":
|
case "sha224":
|
||||||
// authenticationProtocol = gosnmp.SHA224
|
authenticationProtocol = gosnmp.SHA224
|
||||||
//case "sha256":
|
case "sha256":
|
||||||
// authenticationProtocol = gosnmp.SHA256
|
authenticationProtocol = gosnmp.SHA256
|
||||||
//case "sha384":
|
case "sha384":
|
||||||
// authenticationProtocol = gosnmp.SHA384
|
authenticationProtocol = gosnmp.SHA384
|
||||||
//case "sha512":
|
case "sha512":
|
||||||
// authenticationProtocol = gosnmp.SHA512
|
authenticationProtocol = gosnmp.SHA512
|
||||||
case "":
|
case "":
|
||||||
authenticationProtocol = gosnmp.NoAuth
|
authenticationProtocol = gosnmp.NoAuth
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -61,14 +61,14 @@ func newUsmSecurityParametersForV3(authProto string, privProto string, username
|
||||||
authenticationProtocol = gosnmp.MD5
|
authenticationProtocol = gosnmp.MD5
|
||||||
case "sha":
|
case "sha":
|
||||||
authenticationProtocol = gosnmp.SHA
|
authenticationProtocol = gosnmp.SHA
|
||||||
//case "sha224":
|
case "sha224":
|
||||||
// authenticationProtocol = gosnmp.SHA224
|
authenticationProtocol = gosnmp.SHA224
|
||||||
//case "sha256":
|
case "sha256":
|
||||||
// authenticationProtocol = gosnmp.SHA256
|
authenticationProtocol = gosnmp.SHA256
|
||||||
//case "sha384":
|
case "sha384":
|
||||||
// authenticationProtocol = gosnmp.SHA384
|
authenticationProtocol = gosnmp.SHA384
|
||||||
//case "sha512":
|
case "sha512":
|
||||||
// authenticationProtocol = gosnmp.SHA512
|
authenticationProtocol = gosnmp.SHA512
|
||||||
case "":
|
case "":
|
||||||
authenticationProtocol = gosnmp.NoAuth
|
authenticationProtocol = gosnmp.NoAuth
|
||||||
default:
|
default:
|
||||||
|
|
@ -501,7 +501,6 @@ func TestReceiveTrap(t *testing.T) {
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
/*
|
|
||||||
//ordinary v3 coldstart trap SHA224 auth and no priv
|
//ordinary v3 coldstart trap SHA224 auth and no priv
|
||||||
{
|
{
|
||||||
name: "v3 coldStart authShaNoPriv",
|
name: "v3 coldStart authShaNoPriv",
|
||||||
|
|
@ -749,7 +748,7 @@ func TestReceiveTrap(t *testing.T) {
|
||||||
fakeTime,
|
fakeTime,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
},*/
|
},
|
||||||
//ordinary v3 coldstart trap SHA auth and no priv
|
//ordinary v3 coldstart trap SHA auth and no priv
|
||||||
{
|
{
|
||||||
name: "v3 coldStart authShaNoPriv",
|
name: "v3 coldStart authShaNoPriv",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue