Mask SNMP credentials on Settings page with visibility toggle

Hi all,

On Settings → Poller → SNMP, the credential fields are currently
rendered as plain text inputs. In our case we share an office floor
where people walk past each other’s screens all day — and every time
someone opens the SNMP settings, the community strings and SNMPv3
authpass / cryptopass are right there in cleartext on the screen.
No exploit needed, just walking by.

I’d like to propose rendering these fields as masked password inputs
with a visibility toggle (eye / eye-slash icon), so admins can still
reveal the value when they need to, but the default state is hidden.

I’ve already built it

Working implementation on my homelab running 26.4.1-dev. All three
field types are covered:

  • SNMPv3 auth + crypto passwords
  • Community strings (which is an array, so needed a dedicated
    component for per-item toggling and drag-and-drop ordering)

Screenshots

:

What would change

  • SettingPassword.vue gets an eye toggle (existing password fields
    like influxdb.password, auth_ldap_binduser get it for free).
  • SNMPv3 authpass and cryptopass render via SettingPassword
    instead of plain text inputs.
  • New SettingPasswordArray component for array-of-secrets fields.
  • New type password-array in the schema, small validator extension,
    one translation key.

No database migration, no breaking changes — only the render layer
changes.

Questions before I open a PR

  1. Is the general approach acceptable?
  2. Type name — I used password-array, but happy to rename if there’s
    a preferred convention (array-password, secret-array, …).
  3. Scope — SNMP only, or also extend to other array-of-secrets fields
    in the codebase (alert transport tokens, API keys, etc.)?

What do you think of it?

Thanks!
Greetings

Palermo

1 Like

Hello, I need exactly this change. We should also remove it from the alert notification details, as everything is displayed in plain text and that’s not necessarily very secure.

Hi,

I have already submitted a sec. incident for the detail page. This is known, and I assume it is being addressed. I have already implemented a temporary solution myself. However, that will be overwritten with a new update.

If there are more people who are up for this, I will create a PR.

Best submitting a pull request.

1 Like

Update: opened the PR — SNMP Settings: mask credentials with visibility toggle by Palerm0 · Pull Request #19542 · librenms/librenms · GitHub

Feedback welcome there.

Thanks!
Palermo