Skip to content

feat(snmp): poll shiva over SNMPv3 authPriv (#85) - #581

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

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

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Sep 20, 2026

Copy link
Copy Markdown
Owner

The first of the two device moves ADR-0036 decided, and the first pass of runbook §4 against a real device. Refs #85 — mjolnir follows on its own PR, and the issue closes with it.

Device first

The prometheus user exists on shiva (SHA, AES) as of today, with SNMPv1 Request still enabled: the community is the rollback credential until the v3 poll is live from the stack. From this branch, before the exporter changed anything:

Current community
  PASS shiva      10.0.30.10   "Integrated Lights-Out 4 2.82 Feb 06 2023"
Unauthenticated PDUs (junk community must be refused)
  PASS shiva      10.0.30.10   refuses a junk community over GET and GETBULK, short and long
Stock communities (must be refused)
  PASS shiva      10.0.30.10   refuses public private
all SNMP targets verified

That PASS went over SNMPv3 — --dry-run shows shiva … v3 SNMP_AUTHPASS_ILO SNMP_PRIVPASS_ILO.

Then the repository

  • auth_ilo is the authPriv block; snmp.yaml regenerated from it (1787 → 1787 metrics, five placeholders survive).
  • render-config.sh's REQUIRED array and the example secrets file carry the two passphrase keys in place of the community; the sops file does the same in its own commit.
  • Docs: the iLO is polled over v3 from 2026-09-20 (roadmap, security.md, hardware.md). The SNMPv1 switch-off is not claimed yet — that is §4.5, after make render && make reload from the main checkout, and it is proved with --old and recorded on Move the iLO and the UPS card to SNMPv3 authPriv (ADR-0036) #85.
  • The switch half of Move the iLO and the UPS card to SNMPv3 authPriv (ADR-0036) #85 is dropped from the roadmap bullet: ADR-0041 commissions the CRS326 with a v3 user by the same runbook, so the MokerLink's UI is not checked for one.

What the first real pass found

#431 dry-ran the v3 block shape with every device still on v2c, so it could not see this: the generator fills every unset auth field from its defaults, and its default community is the stock string. A v3 block with no community line comes out of make snmp-generate carrying that string beside the USM user — and gitleaks' community rule, correctly, failed make validate on the generated file. An explicit empty string is marshalled with omitempty and the line is dropped. So:

  • snmp-targets.sh --check now requires community: "" in a v3 block and refuses anything else (negative-tested against a copy of the generator with the line removed).
  • The generator header, runbook §4.3 and the add-a-device runbook show the line and say why.
  • The same rule matches the generator file's comments, so the header describes the default in words rather than spelling the line out.

Verified

  • Control regeneration on the unedited generator reproduced snmp.yaml byte for byte.
  • scripts/snmp-targets.sh --check, --dry-run, yamllint on the generator, gitleaks (pinned image, working tree) clean.
  • scripts/validate.sh green except the gitleaks finding above, which the rewording removed.
  • Live snmp-verify.sh --device shiva as pasted.

After merge

From the main checkout: make render && make reload; up{job="snmp",instance="10.0.30.10"} back to 1. Then §4.5 on the iLO and --old, by hand.

🤖 Generated with Claude Code

Gerrrt and others added 2 commits September 20, 2026 22:18
The repository half of the iLO's move, per ADR-0036 and runbook §4:
auth_ilo becomes the authPriv block (SHA, AES, user `prometheus`),
snmp.yaml is regenerated from it, and the two plaintext copies of the
key list — render-config.sh's REQUIRED array and the example secrets
file — carry SNMP_AUTHPASS_ILO and SNMP_PRIVPASS_ILO in place of the
community. The sops change is its own commit.

One thing the dry run of #431 could not see, because every block was
still v2c: the generator fills every unset auth field from its defaults,
and its default community is the stock string, so a v3 block with no
community line comes out of `make snmp-generate` carrying that string
beside the USM user — and gitleaks' community rule, correctly, fails
validate on the generated file. An explicit empty string is marshalled
with omitempty and the line is dropped. `snmp-targets.sh --check` now
requires that empty string in a v3 block and refuses anything else, and
the three documented copies of the v3 shape show it.

Docs record the iLO as polled over v3 from 2026-09-20 and leave the
SNMPv1 switch-off to the issue until it is proved with `--old`. The
switch half of #85 is gone: ADR-0041 commissions the CRS326 with a v3
user by the same runbook, so the MokerLink's UI is not checked for one.

Refs #85

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
SNMP_COMMUNITY_ILO out, SNMP_AUTHPASS_ILO and SNMP_PRIVPASS_ILO in. The
user was created on the iLO first, and `snmp-verify.sh --device shiva`
passed over SNMPv3 from this branch before this commit.

Refs #85

Co-Authored-By: Claude Fable 5.1 <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