Skip to content

Fix pcscd polkit auth failure in HSM container#2630

Merged
tashian merged 2 commits intomasterfrom
fix-pcscd-polkit-2607
Apr 3, 2026
Merged

Fix pcscd polkit auth failure in HSM container#2630
tashian merged 2 commits intomasterfrom
fix-pcscd-polkit-2607

Conversation

@tashian
Copy link
Copy Markdown
Contributor

@tashian tashian commented Mar 31, 2026

Summary

  • Start pcscd with --disable-polkit in the Docker entrypoint to fix HSM container startup failure after the bookworm → trixie base image upgrade
  • The newer pcscd in Debian trixie enforces polkit authorization by default, which isn't available in containers
  • Adds a conditional to allow the host to run pcscd and volume mount the runtime directory into the container.
  • Only affects the HSM image (Dockerfile.hsm); the standard image doesn't install pcscd

Fixes #2607

🤖 Generated with Claude Code

@github-actions github-actions Bot added the needs triage Waiting for discussion / prioritization by team label Mar 31, 2026
The upgrade from Debian bookworm to trixie introduced a newer pcscd
that enforces polkit authorization by default. Since polkit is not
available inside containers, pcscd rejects connections with "access
was denied because of a security violation". Adding --disable-polkit
restores the previous behavior. Container-level isolation already
provides the security boundary that polkit would otherwise enforce.

Fixes #2607

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
hslatman
hslatman previously approved these changes Mar 31, 2026
@hslatman hslatman added this to the v0.30.3 milestone Apr 2, 2026
If /var/run/pcscd/pcscd.comm exists (from a host bind-mount),
the entrypoint now skips starting pcscd inside the container,
supporting the recommended pattern of running pcscd on the host.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lareeth
Copy link
Copy Markdown

lareeth commented Apr 2, 2026

I just tested this with a Nitokey HSM and a pcscd socket being passed in, and it works, with no errors!

@tashian tashian merged commit 74b225c into master Apr 3, 2026
16 checks passed
@tashian tashian deleted the fix-pcscd-polkit-2607 branch April 3, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs triage Waiting for discussion / prioritization by team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Step CA 0.30.1-hsm fails to start: "connecting to pcsc: access was denied because of a security violation"

4 participants