Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNMP_Exporter has trouble with passphrases that contain special chars? #493

Closed
alanrellek opened this issue Mar 26, 2020 · 5 comments
Closed

Comments

@alanrellek
Copy link

Host operating system: output of uname -a

Linux 3.10.0-1062.9.1.el7.x86_64 #1 SMP Mon Dec 2 08:31:54 EST 2019 x86_64 x86_64 x86_64 GNU/Linux

snmp_exporter version: output of snmp_exporter -version

snmp_exporter-0.16.1.linux-amd64

What device/snmpwalk OID are you using?

Linux 3.10.0-1062.9.1.el7.x86_64 #1 SMP Mon Dec 2 08:31:54 EST 2019 x86_64 x86_64 x86_64 GNU/Linux

If this is a new device, please link to the MIB(s).

No MIBs involved, snmpv3 authentication problem

What did you do that produced an error?

Used following config lines containing a password with special chars

module_1:
    walk:
       - 1.3.6.1.2.1.1.5 #sysName snmp default
       - 1.3.6.1.2.1.1.1 #sysDescr snmp default
       - 1.3.6.1.2.1.1.3 # sysUptime snmp default
    version: 3
    max_repetitions: 5
    retries: 1
    timeout: 1s
    auth:
      security_level: authPriv
      username: exporter
      password: "MXqg2&PhGRRo&acUU3co9*bGp"
      auth_protocol: SHA
      priv_protocol: AES
      priv_password: "9UdkvE$k&UmDZc5boLUAe4jKE"

What did you expect to see?

Authentication on network device succeeds. Data is being polled.

What did you see instead?

No data being polled.
Raised Loglevel for net-snmp on network device.
Logs showed some sort of usmUnknownEngineID error.

What did I try to verify claim:

Created multiple snmpv3 users with different passwords.
All user passwords which did NOT contain any special characters (only alphanumeric characters) worked fine.
All user passwords which contained special characters would fail to authenticate.

We excluded the possibility of the error originating from the syntax from the YAML file because we did every test with and without quotation marks.

The following example works perfectly fine:

  module_2:
    walk:
       - 1.3.6.1.2.1.1.5 #sysName snmp default
       - 1.3.6.1.2.1.1.1 #sysDescr snmp default
       - 1.3.6.1.2.1.1.3 #sysUptime snmp default
    version: 3
    max_repetitions: 5
    retries: 1
    timeout: 1s
    auth:
      security_level: authPriv
      username: exporter
      password: Q2otF8LjGkqzNuYVEY6xSZYzs
      auth_protocol: SHA
      priv_protocol: AES
      priv_password: U88qFW9a2dFYiwvqcyLjNyKLp
@brian-brazil
Copy link
Contributor

Hmm, if it's not due to YAML then it's likely an issue with the upstream library - though it might also be the device. Can you check with tcpdump?

@SuperQ
Copy link
Member

SuperQ commented Mar 26, 2020

I tested the example special character v3 config against my Netgear GS310TP. No issues.

@alanrellek
Copy link
Author

Hey Brian
The Issue is not very urgent nor important (to us) because we can still use passphrases with an entropy high enough to fit our standards.
I am currently very busy but I will provide the output of the tcpdump we did asap.
Cheers

Hmm, if it's not due to YAML then it's likely an issue with the upstream library - though it might also be the device. Can you check with tcpdump?

@alanrellek alanrellek changed the title SNMP_Exporter has trouble with passphrases that contain special chars SNMP_Exporter has trouble with passphrases that contain special chars? Mar 29, 2020
@brian-brazil
Copy link
Contributor

The evidence indicates that this is an issue with your device rather than with the exporter or our upstream.

@brian-brazil
Copy link
Contributor

Closing per above, this appears to be a local configuration issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants