Skip to content

feat: superuser management - #1949

Open
Tbaile wants to merge 66 commits into
mainfrom
superuser-management
Open

Tbaile wants to merge 66 commits into
mainfrom
superuser-management

Conversation

@Tbaile

@Tbaile Tbaile commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Added the superuser concept: other admins can no longer change SSH settings, manage administrators, handle backups and a few more system-level actions

  • Replaced the old SSH management with a proper ns.ssh API
  • Added ns.account get-info so the UI can hide or disable what the logged user can't use
  • Better cleanup when deleting or demoting a user, their sessions and 2FA secret are removed too

Closes: #1721

@Tbaile
Tbaile marked this pull request as ready for review October 21, 2026 10:14
Tbaile and others added 28 commits November 19, 2026 14:24
Add a setup menu entry to open or close access to the web UI
port 9090 from the WAN zone.

Assisted-by: Claude Code:claude-sonnet-5-5
New images no longer expose the web UI port 9090 on WAN.
Existing installations keep their current rule.

Assisted-by: Claude Code:claude-sonnet-5-5
The menu was redrawn right after passwd, hiding its output. Show a
dialog telling whether the password was changed.

Assisted-by: Claude Code:claude-sonnet-5-5
Make the result of the password change and remote access toggle
clear at a glance.

Assisted-by: Claude Code:claude-opus-5-5
When a feed download failed, adblock logged the full feed URL to
syslog. Nethesis DNS feeds configured by ns-threat_shield embed the
subscription credentials as https://<system_id>:<secret>@bl.nethesis.it,
so the secret ended up in /var/log/messages and in VictoriaLogs.

Strip the user:password@ part before logging, keeping the host and
path for debugging. Other URL outputs (etag debug line, JSON report,
fetch parameters) do not include the feed URL.

Assisted-by: Claude Code:claude-opus-5-5
gsanchietti and others added 29 commits November 19, 2026 14:24
The threat_shield inventory fact reports the number of enabled
custom allowlist URLs and custom blocklists.

Refs #2005

Assisted-by: Claude Code:claude-opus-5-5
ns.threatshield manages remote allowlist URLs and custom blocklists,
and lists the Nethesis global allowlist as a read-only built-in row,
enabled only with a subscription. Edits replace the whole entry.
Custom list names can't clash with builtin feeds, and a custom list
is always listed as custom. Threat Shield IP status no longer depends
on the Nethesis allowlist URL.

Refs #2005

Assisted-by: Claude Code:claude-opus-5-5
ts-ip rebuilds ban_allowurl and banip.custom.feeds from the
ns_allowurl and ns_blockfeed sections. Legacy ban_allowurl entries
are moved once to ns_allowurl sections, also on upgrade. The
post-commit hook runs ts-ip and drops the banIP backups of lists
whose URL changed; ts-fail2ban runs once per commit. On upgrade
the feed copy is refreshed without starting fail2ban.

Refs #2005

Assisted-by: Claude Code:claude-opus-5-5
A non-empty banip.custom.feeds holds a copy of banip.feeds and banIP
reads only that file, so rerun ts-ip after a banip upgrade to pick
up new or changed upstream feeds.

Refs #2005

Assisted-by: Claude Code:claude-opus-5-5
The Threat Shield IP page had nothing to show when fail2ban banned
nobody, even while banIP lists dropped traffic all the time.

New method list-blocklist-bans: the addresses dropped by banIP lists
in the last hour, read from VictoriaLogs, one row per address, list
and direction, most hits first, at most 500 rows. It returns an
empty list when VictoriaLogs can't be reached.

Assisted-by: Claude Code:Opus 5.5
Build the UI from the head of the nethsecurity-ui release-8.9.0
branch, which has the Threat Shield custom lists pages. Replace it
with the tagged UI release later.

Assisted-by: Claude Code:Opus 5.5
@Tbaile
Tbaile force-pushed the superuser-management branch from 6f76fff to d19cd0c Compare November 20, 2026 15:09

This branch has not been deployed

No deployments
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.

Improve administrative account governance

4 participants