extra-trusted-users being ignored #1183

Open
opened 2026-04-15 12:47:28 +00:00 by ma27 · 4 comments
Member

Describe the bug

Granting a user privileged access to the Lix daemon doesn't work via extra-trusted-users in nix.conf, but trusted-users only.

Steps To Reproduce

  1. Set allowed-users to root in nix.conf
  2. Create an unprivileged user
  3. Add unprivileged user to extra-trusted-users in nix.conf
  4. Open a shell as unprivileged user, run nix store ping. Access to the daemon is rejected
    5/. Adding the unprivileged user to trusted-users instead of extra-trusted-users gives access

Expected behavior

Expected the unprivileged user to have access in step 4.

nix --version output

Observed on Lix version 2.95.1 & nix (Lix, like Nix) 2.96.0-devpre20260314_c452341.

Additional context

none.

## Describe the bug Granting a user privileged access to the Lix daemon doesn't work via `extra-trusted-users` in `nix.conf`, but `trusted-users` only. ## Steps To Reproduce 1. Set `allowed-users` to `root` in `nix.conf` 2. Create an unprivileged user 3. Add unprivileged user to `extra-trusted-users` in `nix.conf` 4. Open a shell as unprivileged user, run `nix store ping`. Access to the daemon is rejected 5/. Adding the unprivileged user to `trusted-users` instead of `extra-trusted-users` gives access ## Expected behavior Expected the unprivileged user to have access in step 4. ## `nix --version` output Observed on Lix version 2.95.1 & `nix (Lix, like Nix) 2.96.0-devpre20260314_c452341`. ## Additional context none.
Owner

what does the file actually look like? order matters! >,<

what does the file actually look like? order matters! >,<
Author
Member

To copy the shell session I saved yesterday:

[root@cache01:~]# cat /etc/nix/nix.conf|grep hydra
trusted-users = root root hydra hydra-www @wheel
extra-trusted-users = hydra hydra-queue-runner hydra-www

[root@cache01:~]# sudo -iu hydra-www nix store ping
Store URL: daemon
Version: 2.95.1
Trusted: 1

[root@cache01:~]# sudo -iu hydra-queue-runner nix store ping
Store URL: daemon
error: cannot open connection to remote store 'daemon': error: read failed: Connection reset by peer
To copy the shell session I saved yesterday: [root@cache01:~]# cat /etc/nix/nix.conf|grep hydra trusted-users = root root hydra hydra-www @wheel extra-trusted-users = hydra hydra-queue-runner hydra-www [root@cache01:~]# sudo -iu hydra-www nix store ping Store URL: daemon Version: 2.95.1 Trusted: 1 [root@cache01:~]# sudo -iu hydra-queue-runner nix store ping Store URL: daemon error: cannot open connection to remote store 'daemon': error: read failed: Connection reset by peer
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/5672 ("tests: Add regression test for daemonAuthorizationSettings")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/5672", "number": 5672, "kind": "commit message"}], "cl_meta": {"5672": {"change_title": "tests: Add regression test for daemonAuthorizationSettings"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/5672](https://gerrit.lix.systems/c/lix/+/5672) ("tests: Add regression test for daemonAuthorizationSettings")

I have (coincidentally) tracked this down to a regression caused by the changes in 63b0a01d751689b310251c6b5a8c65f40630573a.

An attempt was made at fixing it in https://gerrit.lix.systems/c/lix/+/5671. It may or may not be the correct fix, but this was verified to handle the issue with the integration tests in Hydra.

nix build .#hydraJobs.tests.gitea.x86_64-linux --override-input lix ~/git/nix/fix-1183-config-regression/

Note that there was a workaround merged recently, so either revert it or run against 4b5012cbf455dc08fefeca56a42508653a75a89b, which is the commit I used to validate.

The expected behaviour is that the test succeeds relatively quickly (assuming all other deps are built), and failure will timeout the test in 15 minutes. But any long~ish time for the test met with many repeats of the following log lines should be a good indication that it will time out. (It shouldn't take much time to run the test once Hydra and Gitea are up and running.)

machine # test: invalid integer ‘null’
I have (coincidentally) tracked this down to a regression caused by [the changes in `63b0a01d751689b310251c6b5a8c65f40630573a`](https://git.lix.systems/lix-project/lix/commit/63b0a01d751689b310251c6b5a8c65f40630573a). An attempt was made at fixing it in https://gerrit.lix.systems/c/lix/+/5671. It may or may not be the correct fix, but this was verified to handle the issue with the integration tests in Hydra. ``` nix build .#hydraJobs.tests.gitea.x86_64-linux --override-input lix ~/git/nix/fix-1183-config-regression/ ``` Note that there was a workaround merged recently, so either revert it or run against `4b5012cbf455dc08fefeca56a42508653a75a89b`, which is the commit I used to validate. The expected behaviour is that the test succeeds relatively quickly (assuming all other deps are built), and failure will timeout the test in 15 minutes. But any long~ish time for the test met with many repeats of the following log lines should be a good indication that it will time out. (It shouldn't take much time to run the test once Hydra and Gitea are up and running.) ``` machine # test: invalid integer ‘null’ ```
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/lix#1183
No description provided.