Skip to content

Fix bootstrap token check and secure token status guard logic#244

Merged
CKunze-MSFT merged 1 commit intomasterfrom
fix-bootstrap-token-guards
Apr 1, 2026
Merged

Fix bootstrap token check and secure token status guard logic#244
CKunze-MSFT merged 1 commit intomasterfrom
fix-bootstrap-token-guards

Conversation

@theneiljohnson
Copy link
Copy Markdown
Collaborator

Fixes bugs identified in #240:

  1. Bootstrap token escrow check was a no-opecho "profiles status -type bootstraptoken" echoed a literal string instead of executing the command. Fixed to pipe actual command output through grep.

  2. $SECURE_TOKEN_STATUS was never populated — The disabled/unknown-user guards were dead code. Added sysadminctl -secureTokenStatus call to populate the variable.

This preserves the existing guard logic (unlike #240 which removed it) while making it actually functional.

Tested all 6 code paths via dry-run stubbing — all pass correctly.

- Fix bootstrap token escrow check to actually execute the command instead of echoing a literal string
- Populate SECURE_TOKEN_STATUS variable so disabled/unknown user guards work correctly
@CKunze-MSFT CKunze-MSFT merged commit eef2d8a into master Apr 1, 2026
3 checks passed
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.

2 participants