Skip to content

fix: Avoid needless user escalation during auto-enroll#47676

Merged
codingllama merged 1 commit intomasterfrom
codingllama/autoenroll-notpm
Oct 18, 2024
Merged

fix: Avoid needless user escalation during auto-enroll#47676
codingllama merged 1 commit intomasterfrom
codingllama/autoenroll-notpm

Conversation

@codingllama
Copy link
Copy Markdown
Contributor

Auto-enroll was generating sudo prompts on machines without a TPM, which is pointless because without a TPM the ceremony cannot succeed.

The root cause is that auto-enroll was trying to gather device data (which needs sudo) before checking for a TPM (which does not need sudo). Changing the order of the operations (which is how EnrollDeviceInit is coded) resolves the issue. Other device trust operations are already careful to do that, so the problem is exclusive to auto-enroll. It's also arguably worse for auto-enroll, as it is an unprompted ceremony if the corresponding setting is enabled.

Changelog: Avoid tsh auto-enroll escalation in machines without a TPM

@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from mvbrock October 17, 2024 21:39
@codingllama codingllama added this pull request to the merge queue Oct 18, 2024
@codingllama
Copy link
Copy Markdown
Contributor Author

Thanks, everyone!

Merged via the queue into master with commit 0b75171 Oct 18, 2024
@codingllama codingllama deleted the codingllama/autoenroll-notpm branch October 18, 2024 13:43
@public-teleport-github-review-bot
Copy link
Copy Markdown

@codingllama See the table below for backport results.

Branch Result
branch/v14 Failed
branch/v15 Create PR
branch/v16 Create PR

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants