Skip to content

Fix validation in PIV PIN and PUK form in Connect, increase new PIN timeout#55401

Merged
ravicious merged 3 commits intomasterfrom
r7s/piv-fixes
Jun 5, 2025
Merged

Fix validation in PIV PIN and PUK form in Connect, increase new PIN timeout#55401
ravicious merged 3 commits intomasterfrom
r7s/piv-fixes

Conversation

@ravicious
Copy link
Copy Markdown
Member

@ravicious ravicious commented Jun 3, 2025

Closes #55354.

The form in Connect incorrectly required 4–6 digits whereas tsh accepted 6–8. It's been a problem ever since #47652 added hardware key support to Connect.

Since the old form required 4-6 digits and the new one requires 6–8, I was worried what was going to happen if someone set a 4–5 digit PIN or PUK through the old form. It turns out this never worked anyway since tsh has always enforced 6–8 digits despite what Connect's UI said.

The client-side validation can be tested through the story. The whole flow can be tested in an enterprise cluster with require_session_mfa: hardware_key_touch_and_pin, then resetting PIV in YubiKey Manager (Applications → PIV → Reset PIV).

changelog: Fixed updating the default PIN and PUK for hardware key support in Teleport Connect

@ravicious ravicious enabled auto-merge June 4, 2025 12:41
@ravicious ravicious added this pull request to the merge queue Jun 5, 2025
Merged via the queue into master with commit dfd21d4 Jun 5, 2025
57 checks passed
@ravicious ravicious deleted the r7s/piv-fixes branch June 5, 2025 22:58
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@ravicious See the table below for backport results.

Branch Result
branch/v16 Create PR
branch/v17 Create PR
branch/v18 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connect: Incorrect validation and length requirements in PIV PIN and PUK form

3 participants