Repository navigation
Read settings from the 64-bit registry only, and keep credential headers where users cannot read them - #59
Merged
Conversation
…ers where users cannot read them Settings: the CLI and the GUI read HKLM\SOFTWARE\BootstrapMate\Settings and the policy key from the 64-bit view only. A stale 32-bit copy of the settings key (WOW6432Node) used to outrank what the GUI and the MSI write; the MSI removes it through a 32-bit component, and the CLI removes it once and logs the value names it removed. The policy key is shared between the two views, so it is never touched. Credentials: AuthorizationHeader and ReportingHeader now live in HKLM\SOFTWARE\BootstrapMate\Secrets, whose ACL admits only SYSTEM and Administrators. A header found in the policy key (under any alias) or the settings key is moved there by an elevated run and the readable copy blanked; the policy value is emptied rather than deleted so it still shows as managed. The GUI saves headers there and no longer passes one on the command line. Command lines are redacted before they reach the log or session.json.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
64-bit view only
HKLM\SOFTWARE\BootstrapMate\Settingsand the policy key from the 64-bit view only. A staleWOW6432Nodecopy of the settings key used to outrank what the GUI and the MSI write.SOFTWARE\Policiesis shared between the views. Its "32-bit path" is the live policy key, so it is never removed, and a test guards that.Credential headers
AuthorizationHeaderandReportingHeaderlive inHKLM\SOFTWARE\BootstrapMate\Secrets. The key's protected ACL admits SYSTEM and Administrators only, and the MSI sets the same ACL.--headers <redacted>) in the log andsession.json.Tested on a test PC (signed MSI)
--headers <redacted>.dotnet test: 122 pass.