Repository navigation
Conversation
WEBUI_HOME names the users that get a page of their own, but the image is built before the users exist. An operator account added in the field is not in the list and lands on the regular pages. Take @group=/path as well, for all members of a NACM group, so the factory configuration can ship the group and its rules: WEBUI_HOME=operator=/panel/ @guest=/stats/ A user entry wins over a group, and of several groups the first in the list. A group never applies to an admin, who could otherwise not get back to the regular pages to leave it. Only an admin may read the NACM data over RESTCONF, so the groups are read with sysrepocfg at login and the home is kept in the session. A login is refused when they cannot be read. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The developer's guide left out two things a fresh machine needs for the tests. make test runs Infamy in a container and needs Docker or podman for that, and the test specification generator imports the Python yaml module. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Only an admin can read the NACM configuration, so nobody else, and no
application acting for them, can tell what groups a user is in.
POST /restconf/operations/infix-system:whoami
returns the name of the calling user and its groups, nothing about
other users. The factory rules deny guests all RPCs, so permit this
one ahead of that rule, and add the same rule to existing
configurations on upgrade.
The rpc_output() helper in Infamy now returns a leaf-list as a list.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The groups behind a @group entry in WEBUI_HOME were read with sysrepocfg, as root. That goes around NACM and stops working the day the WebUI runs as an unprivileged user. Ask for them over RESTCONF as the user logging in, like everything else. The NACM rules must permit the members of a listed group to call whoami, as the factory rules do for guest. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
mattiaswal
requested changes
Nov 23, 2026
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
WEBUI_HOME names the users that get a page of their own, but the image is built before the users exist. An operator account added in the field is not in the list and lands on the regular pages.
Take @group=/path as well, for all members of a NACM group, so the factory configuration can ship the group and its rules:
A user entry wins over a group, and of several groups the first in the list. A group never applies to an admin, who could otherwise not get back to the regular pages to leave it.
Only an admin may read the NACM data over RESTCONF, so the groups are read with sysrepocfg at login and the home is kept in the session. A login is refused when they cannot be read.
Checklist
Tick relevant boxes, this PR is-a or has-a: