Skip to content

Introduce NUT "authconf" file support [#3329]#3435

Open
jimklimov wants to merge 71 commits into
networkupstools:masterfrom
jimklimov:issue-3329
Open

Introduce NUT "authconf" file support [#3329]#3435
jimklimov wants to merge 71 commits into
networkupstools:masterfrom
jimklimov:issue-3329

Conversation

@jimklimov
Copy link
Copy Markdown
Member

@jimklimov jimklimov commented May 11, 2026

Starting with a PoC from AI, slightly modified (20%?) in review, following the spec requested in the GitHub issue #3329, as a stepping stone for further work.

Let CI loose on this iteration that passes locally...

TODO:

  • Stacking of config files as proposed in Feature request: more NUT clients should be SSL-capable with proper certificate trust and all #3329
  • Revise what data points we do want populated in upscli_authconf_t => added CERTHOST to the originally posted mix
  • libupsclient API (upscli_init variant?) to use upscli_authconf_t struct instances directly. Refactor older methods as wrappers to this one?
    • Consider a method that parses our collection from upscli_get_authconf_list() to upscli_add_host_cert() and set up the one most applicable set of client identity data for that [user@host:port] combo.
  • Add config-file permissions check for sensitive data, like in other cases (upsd.users etc.)
  • Add a conf/... sample and docs/man/... page for nutauth.conf concept

UPDATE: During work on this, it was found that NSS CERTHOST support was actually broken, and only worked for certificates whose nicknames matched the host name, not the "My nut server" nickname as the example claimed for years. Fixed now.

@jimklimov jimklimov added this to the 2.8.6 milestone May 11, 2026
@jimklimov jimklimov added enhancement SSL/NSS Issues and PRs about SSL, TLS and other crypto-related matters AI For good or bad, machine tools are upon us. Humans are still the responsible ones. labels May 11, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 11, 2026

A ZIP file with standard source tarball and another tarball with pre-built docs for commit 42dbf8d is temporarily available: NUT-tarballs-PR-3435.zip.

@AppVeyorBot
Copy link
Copy Markdown

Build nut 2.8.5.4693-master completed (commit 049a4d4c36 by @jimklimov)

@AppVeyorBot
Copy link
Copy Markdown

@AppVeyorBot
Copy link
Copy Markdown

Build nut 2.8.5.4694-master completed (commit c8f40b4384 by @jimklimov)

@AppVeyorBot
Copy link
Copy Markdown

Build nut 2.8.5.4696-master completed (commit 25660e3752 by @jimklimov)

@AppVeyorBot
Copy link
Copy Markdown

@AppVeyorBot
Copy link
Copy Markdown

Build nut 2.8.5.4697-master completed (commit 9be8443368 by @jimklimov)

Comment thread clients/authconf.c Fixed
Comment thread clients/authconf.c Fixed
Comment thread tests/test_authconf.c Dismissed
Comment thread tests/test_authconf.c Dismissed
Comment thread tests/test_authconf.c Fixed
@AppVeyorBot
Copy link
Copy Markdown

@AppVeyorBot
Copy link
Copy Markdown

@AppVeyorBot
Copy link
Copy Markdown

Comment thread clients/authconf.c Dismissed
Comment thread clients/authconf.c Fixed
Comment thread clients/authconf.c Fixed
@jimklimov jimklimov force-pushed the issue-3329 branch 2 times, most recently from 73a7249 to ed6f549 Compare May 12, 2026 14:05
@AppVeyorBot
Copy link
Copy Markdown

Build nut 2.8.5.4700-master completed (commit 8a8a16fc63 by @jimklimov)

@AppVeyorBot
Copy link
Copy Markdown

@AppVeyorBot
Copy link
Copy Markdown

Build nut 2.8.5.4701-master completed (commit 40e1ff94b4 by @jimklimov)

@AppVeyorBot
Copy link
Copy Markdown

@AppVeyorBot
Copy link
Copy Markdown

Comment thread clients/authconf.c Fixed
jimklimov added 5 commits May 19, 2026 04:21
…S server certname validation [networkupstools#3331]

It is NOT about just host name (URL) matching per our spec.

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ration attempts [networkupstools#1711]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…upstools#3329, networkupstools#1711]

Depending on context, whether "none" or a real path may be useful
or toxic to custom developer test works.

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot
Copy link
Copy Markdown

@AppVeyorBot
Copy link
Copy Markdown

@AppVeyorBot
Copy link
Copy Markdown

jimklimov added 3 commits May 19, 2026 15:35
…authconf_val(): support USERNAME as alias of USER [networkupstools#3329]

Follow the NUT Networked Protocol keywords a bit more closely.

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… avoid "s_host" varname which confuses WIN32, illumos and other builds [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…rom drivers/libusb0.c to be a bit more shared [networkupstools#3329]

Follows up from commits b91e34e and f951dce

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot
Copy link
Copy Markdown

jimklimov added 2 commits May 19, 2026 17:55
…li_find_host_port_cert() with a "verbose" option, and extend upscli_add_host_port_cert() with check for existing entries [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…() [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot
Copy link
Copy Markdown

@AppVeyorBot
Copy link
Copy Markdown

Comment thread clients/upslog.c Dismissed
@AppVeyorBot
Copy link
Copy Markdown

Build nut 2.8.5.4749-master completed (commit ffbf626064 by @jimklimov)

@AppVeyorBot
Copy link
Copy Markdown

Comment thread clients/upsstats.c Dismissed
@AppVeyorBot
Copy link
Copy Markdown

Build nut 2.8.5.4750-master completed (commit 59a24d5766 by @jimklimov)

jimklimov added 2 commits May 20, 2026 14:58
…txt: add support for nutauth.conf [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…n debug/failure printouts

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot
Copy link
Copy Markdown

Build nut 2.8.5.4751-master completed (commit cbae147ae0 by @jimklimov)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI For good or bad, machine tools are upon us. Humans are still the responsible ones. enhancement SSL/NSS Issues and PRs about SSL, TLS and other crypto-related matters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants