-
Notifications
You must be signed in to change notification settings - Fork 158
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
[Unprivileged] Windows enablement #4264
Merged
Merged
Changes from 45 commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
a74cf31
Work on creating user/group on windows.
blakerouse 5b59d62
Allow install on Windows.
blakerouse cd0de99
Set correct permissions on install.
blakerouse a72e02a
Remove the FreeSID causing crash.
blakerouse 322c363
Return correct errors for FindGID and FindUID.
blakerouse 5523eff
Add SeRestorePrivilege.
blakerouse da71060
Set the password for the service.
blakerouse 685f3d3
Un-comment the uninstall on error.
blakerouse 6dd742b
Set the local security policy for the created user.
blakerouse f65da0d
Fix set password to use a specific struct.
blakerouse 4aab797
Fix vault and listener permissions.
blakerouse 6ec63f2
Update notice.
blakerouse 94cf61f
Merge branch 'main' into unprivileged-windows
blakerouse c57d4fa
Fix deps.
blakerouse df4e2fb
Merge branch 'main' into unprivileged-windows
blakerouse 6aaebc3
Fix lint.
blakerouse b4c3e6d
Fix windows lint.
blakerouse 8c7ed65
Fix windows lint.
blakerouse 733c443
Adjust integration tests for allowing unprivileged on Windows.
blakerouse 0840e4c
Adjust more tests.
blakerouse c3943e2
Merge branch 'main' into unprivileged-windows
blakerouse 83af91c
Fix test.
blakerouse 909d48a
Fix user create.
blakerouse de92fb7
More work on Windows.
blakerouse c619711
Merge branch 'main' into unprivileged-windows
blakerouse 7f21ab0
Fix test.
blakerouse 8fec77a
More permission adjustments.
blakerouse 263af6a
skip takeOwnership when not root.
blakerouse 5ac6368
Impove comments.
blakerouse 0285399
Fix RunningUnderSupervisor to work running as unprivileged service.
blakerouse a7ee861
Adjust RunningUnderSupervisor.
blakerouse fbf7285
Fix re-exec on Windows with unprivileged.
blakerouse cbefd7e
Set DACL correctly on service.
blakerouse 1916b3a
Fix enrollment during install on Windows with unprivileged.
blakerouse 17ac3d1
Merge branch 'main' into unprivileged-windows
blakerouse 2ad71d4
Fix issues from merge.
blakerouse 5b6d11c
Fix lint.
blakerouse 9312f5c
Fix windows lint.
blakerouse 46fb164
Fix reexec_windows subcommand.
blakerouse 38f5a5f
Fix install test.
blakerouse ade3f50
Merge remote-tracking branch 'upstream/main' into unprivileged-windows
blakerouse 94bff9a
Fix metrics monitoring test.
blakerouse bb8f2b9
Merge remote-tracking branch 'upstream/main' into unprivileged-windows
blakerouse 131b24f
Switch from privileged to unprivileged in control protocol.
blakerouse 60a9835
Merge branch 'main' into unprivileged-windows
blakerouse 39bcb29
Improve logging on start.
blakerouse bb665a7
Merge branch 'main' into unprivileged-windows
blakerouse f9e69d5
Fix TestMetricsMonitoringCorrectBinaries.
blakerouse ee6a4ab
Fix more issues and test.
blakerouse f989d44
Some code cleanup.
blakerouse a5ad1e8
Fix logging of context cancelled.
blakerouse d05c552
Fix restart delay.
blakerouse 12f7b16
Add comment for windows.Token(0), and more context.
blakerouse 9e30596
Merge remote-tracking branch 'upstream/main' into unprivileged-windows
blakerouse af2cbe7
Switch to crypto/rand.
blakerouse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a comment on why the switch to Token(0) ? We have had so many issues with detecting "admin" I'd just like to be sure we have this documented if things pop up later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
windows.Token(0)
is used because its passed intocheckTokenMembership
that when the token is zero that check uses the current process token. It is a simpler way of saying this processes current token, without the need to grab a handle that needs to be closed for the current process.What do you want documented here? That
windows.Token(0)
means the current process token?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a few links to MSDN documentation, and just a comment that
windows.Token(0)
is current process. I'm just thinking in 3 years if we have a bug around this code in some new Azure environment it is nice to know what we were thinking and hopefully pointers to full documentation which might give clues if it has been deprecated etc.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some more comments and a link for the
windows.Token(0)
.