Skip to content

feat(snmp): poll mjolnir over SNMPv3 authPriv (#85) - #592

Merged
Gerrrt merged 7 commits into
mainfrom
gerrrt/snmpv3-ilo-ups-authpriv-76f804
Sep 21, 2026
Merged

Gerrrt merged 7 commits into
mainfrom
gerrrt/snmpv3-ilo-ups-authpriv-76f804

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

The second and last device ADR-0036 names, after shiva in #581. Refs #85 — the issue closes once SNMPv1 is off on the card and --old proves it, the same way the iLO's did in #585.

Device first

A user profile on the NMC (prometheus, SHA, AES) with an Access Control entry for 10.0.99.20 and access Read, created 2026-09-20 with SNMPv1 left enabled. From this branch, against the live card, before the exporter changed anything:

Current community
  PASS mjolnir    10.0.99.10   "APC Web/SNMP Management Card (MB:v4.2.9 PF:v2.0.0.6 PN:apc_
Unauthenticated PDUs (junk community must be refused)
  PASS mjolnir    10.0.99.10   refuses a junk community over GET and GETBULK, short and long
Stock communities (must be refused)
  PASS mjolnir    10.0.99.10   refuses public private
all SNMP targets verified

That PASS went over SNMPv3 — --dry-run shows mjolnir … v3 SNMP_AUTHPASS_APC SNMP_PRIVPASS_APC. It was re-run after the secrets file was rewritten, so the keys in SOPS are known to match the card rather than assumed to.

Then the repository

  • auth_apc is the authPriv block, with the explicit empty community feat(snmp): poll shiva over SNMPv3 authPriv (#85) #581 established is required; snmp.yaml regenerated (1787 → 1787 metrics, six placeholders survive).
  • render-config.sh's REQUIRED array and the example secrets file carry the two passphrase keys; the SOPS change is its own commit.
  • docs/security.md and the roadmap record the move. SNMPv1 on the card is not claimed — that is §4.5, proved with --old afterwards.

Two of the four polls are encrypted after this. The two that stay on v2c — the firewall, for the pf MIB, and the switch until #444 replaces it — both ride on Winterfell, where a sniffer is already on the segment holding the firewall's UI and the monitoring host.

What moving the card broke elsewhere, and this fixes

shut-down-on-the-ups.md landed while the card was still on v2c, so it carried a conditional — the community until ADR-0036 moves the card, the v3 pair after — and named those keys SNMP_AUTHPASS_MJOLNIR / SNMP_PRIVPASS_MJOLNIR. Those names have never existed. Every tool derives them from the auth label, auth_apc, not from the device name; that is the whole design of snmp-auth.sh. Someone building the NUT server would have searched SOPS for a key that is not there. The conditional is resolved and the names corrected.

§4.5 of the rotation runbook also gains the check the shutdown decision asked it for: anything else holding the device's community moves before v1 goes off, because a second consumer left on v2c is what keeps v2c enabled — and that breaks silently, since the exporter stays green throughout. For this card that consumer is the NUT driver, which does not exist yet (the package is installed and unconfigured), so there was nothing to move today. That check is why this PR looked at the question at all.

The decision is named rather than linked, because it was ADR-0048 when this was written and #591 has since renumbered it to 0049.

Verified

  • scripts/snmp-targets.sh --check and --dry-run clean; live verify as pasted.
  • scripts/validate.sh clean after merging current main. An earlier run reported 14 document-versus-config disagreements; a pristine origin/main worktree was checked against the same script to confirm every one of them was the ADR-0048 collision and stale counts that fix(adr): main carries two ADR-0048s, so the UPS one becomes 0049 and the stale counts move with it #591 fixes, not this branch.
  • One lab: promtool check config failure on a stack this PR does not touch — the known local flake; the rerun passed.

After merge

make render && make reload from the main checkout, then up{job="snmp",instance="10.0.99.10"} back to 1, then §4.5 on the card and --old, by hand.

🤖 Generated with Claude Code

Gerrrt and others added 7 commits September 20, 2026 23:20
The repository half of the UPS card's move, the second and last device
ADR-0036 names. Same shape as the iLO in #581: auth_apc becomes the
authPriv block with an explicit empty community, snmp.yaml is
regenerated from it, and render-config.sh's REQUIRED array and the
example secrets file carry SNMP_AUTHPASS_APC and SNMP_PRIVPASS_APC in
place of the community.

The profile exists on the NMC with an access-control entry for
10.0.99.20, and snmp-verify.sh passed against the live card over
SNMPv3 before this commit. SNMPv1 is still enabled on the card — that
is §4.5, and the documents claim the v3 poll and nothing more until
`--old` proves it.

This commit does NOT carry the secrets change. It must not be merged
before secrets/observability.sops.yaml holds the two passphrase keys,
or `make render` fails on the live stack for want of them.

Refs #85

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…es (#85)

SNMP_COMMUNITY_APC out, SNMP_AUTHPASS_APC and SNMP_PRIVPASS_APC in.
The profile was created on the NMC first, and `snmp-verify.sh --device
mjolnir` passed over SNMPv3 from this branch before the keys were
written.

Committed the moment the edit landed: this file is the only copy of a
credential the device will not read back, and an unstaged sops file is
one `git reset --hard` from gone, with no blob and no reflog. That
happened once during this pass and cost a second trip to the card's UI.

Refs #85

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…dates

The profile was created on the NMC on 2026-09-20, beside the iLO's; the
exporter starts polling it over v3 on 2026-09-21, when this merges and
the stack is rendered. Three passages said or implied the second date
was the first.

Refs #85

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…s waiting for

That runbook was written while `mjolnir` was still on v2c, so it carried a
conditional — the community until ADR-0036 moves the card, the v3 pair
after — and named the v3 keys `SNMP_AUTHPASS_MJOLNIR` /
`SNMP_PRIVPASS_MJOLNIR`. The card moved today, so the conditional is
resolved, and those two key names never existed: every tool derives them
from the auth label, which is `auth_apc`, not from the device name. A
future operator would have gone looking in SOPS for a key that is not
there.

§4.5 of the rotation runbook also gains the check that decision asked for:
anything else holding the device's community moves before v1 goes off,
because a second consumer left on v2c is what keeps v2c enabled — and it
breaks silently, since the exporter stays green. For this card that
consumer is the NUT driver, which does not exist yet, so there was nothing
to move today.

The decision is named rather than linked: it was ADR-0048 when this was
written and #591 has since renumbered it to 0049.

Refs #85

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…-authpriv-76f804

# Conflicts:
#	docs/roadmap.md
@Gerrrt
Gerrrt merged commit ecda6db into main Sep 21, 2026
3 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/snmpv3-ilo-ups-authpriv-76f804 branch September 21, 2026 05:20
Gerrrt added a commit that referenced this pull request Sep 21, 2026
#592 added a 2026-09-21 changelog section for mjolnir's move to SNMPv3, and
this branch had added one of its own above 2026-09-20 for the tunnel. Both are
insertions at the top of a newest-first file, so both are kept: the
placeholder-dated section stays above main's, because the build date it is
standing in for is today or later. Main's section is byte-identical to its own
copy, checked rather than eyeballed.

Filling in the date is what decides the final position — if the build lands on
a day that already has a section, this entry folds into it rather than keeping
a heading of its own.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

1 participant