8 Commits
Author SHA1 Message Date
dualfroz f87cd64c00 Describe this repository 2026-10-22 21:06:06 +02:00
dualfroz 96d1c6ff89 fix #6889: ldap sync: use the description of groups as comment
Synced users get their comment from the 'comment' attribute, but synced
groups never get one, as only the name and the members of a group are
queried. With FreeIPA for example, groups are described with the
'description' attribute, which is then not visible in Proxmox VE.

Set the comment of a synced group to its description, if it has one.
Like for the attributes of users, an existing comment is overwritten
by the synced one, and kept if the group has no description, unless
'properties' is part of 'remove-vanished'.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 02:10:21 +02:00
dualfroz f2a9258451 Notes added by 'git notes add' 2026-10-02 16:51:26 +02:00
dualfroz 3805ae44e9 Notes added by 'git notes add' 2026-10-02 16:51:16 +02:00
dualfroz 72650150d0 fix #5368: pam: say that a failed password change is about the host user
Users of the PAM realm are users of the host system, and setting their
password runs usermod on the node handling the request. If the user
only got added to the PAM realm, but does not exist on the host, this
failed with:

  change password failed: user 'jdoe' does not exist

which is confusing, as the user is shown in the user list of the web UI
and the message does not say that the user on the host is meant.

Mention the PAM user and the host system in the error message, so that
it reads:

  changing the password of the PAM user 'jdoe' on the host system
  failed: user 'jdoe' does not exist

The output of usermod is still added at the end, so this helps with its
other errors too.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-02 16:51:26 +02:00
dualfroz a2a3d2acff Notes added by 'git notes add' 2026-10-02 16:47:52 +02:00
dualfroz 3230be1bc0 fix #6429: openid: use the updated user config for the login permissions
When the OpenID login creates a user, or adds a user to groups from the
groups claim, it writes these changes to user.cfg. The permissions it
returns for the web UI however got computed with the copy of user.cfg
the RPC environment loaded at the start of the request, which does not
know about the new user or group memberships yet.

So a user logging in for the first time got no permissions from the
ACLs of its groups in this session, and buttons like "Create VM" stayed
disabled, until the next login. The same happened to existing users on
the login that added them to a new group.

Add a helper to reload the user config of the RPC environment, and use
it after the login changed user.cfg, before computing the permissions,
as suggested in the bug.

Add a test for both cases, which mocks the OpenID provider and keeps
user.cfg in memory.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-02 16:47:52 +02:00
dualfroz 7676330a5c fix #8053: auth: accept "0" as password for pam and pve realms
Both plugins rejected the password with a plain boolean check, and in
Perl the string "0" is false. So a user whose password is "0" could
never log in, getting a generic authentication failure.

Only reject undefined or empty passwords.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-09-25 10:05:55 +02:00