Skip to content

fix: Correct issues with Yubikeys#153

Draft
KyleGospo wants to merge 5 commits intomainfrom
yubikey-fixes
Draft

fix: Correct issues with Yubikeys#153
KyleGospo wants to merge 5 commits intomainfrom
yubikey-fixes

Conversation

@KyleGospo
Copy link
Copy Markdown
Member

Applies plugdev group to the user inside the container, and fixes an issue with the polkit we previously installed that would cause it to never be considered.

Fixes #146

KyleGospo and others added 5 commits May 4, 2026 12:29
Reads the container user's groups via 'id -nG' inside the running
container's mount namespace and runs 'usermod -aG' for any missing
required group. Returns the list of added groups for the caller to
log. Idempotent — repeated calls are no-ops once groups are present.

Used by 'intuneme start' to self-heal containers provisioned before
plugdev was in baseGroups.

Refs #146

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Calls provision.EnsureUserGroups after the sudoers reinstall and
before YubiKey forwarding. Existing containers that pre-date the
plugdev addition self-heal on the next start, with no manual user
action needed. Failures are warned-and-continued, matching the
sudoers and Nvidia self-heal patterns in this file.

Also clarifies EnsureUserGroups' partial-success contract in its
docstring: on error, callers should still log any groups that were
added before the failure — the wiring here does so by ranging over
added unconditionally before checking err.

Refs #146

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per CLAUDE.md's yeti/ guidance: future agents reading this
codebase need to know why 50-pcscd.rules omits subject.active
(forward-defense against a 'tighten this' PR) and that the start
flow now includes a group-membership reconciliation step.

Refs #146

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

YubiKey CBA sign-in requires pcscd polkit workaround

1 participant