Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

codingllama
Copy link
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

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.

3 participants