-
Notifications
You must be signed in to change notification settings - Fork 27
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
Drop privileges to user pelican
if requested
#1850
Merged
Merged
Conversation
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
h2zh
reviewed
Jan 16, 2025
Update: the following action was not a suitable approach. The content of that PR was converted to a commit in this |
7 tasks
7b50e31
to
b7f0e8f
Compare
28f39fb
to
5bc8526
Compare
This introduces new parameters for dropping to a lower-privileged `pelican` user when running as root and the first round of directory ownership changes. The goal is that, when run as root and drop-priv is enabled, all Pelican directories and config files are owned by the pelican user. Otherwise, they'll continue to be owned as root.
The plugin provides a means for an unprivileged process (namely, `pelican`) to request xrootd send itself a signal via a Unix socket and to copy the host cert via a sent file descriptor. This refactors the launcher kill logic so the plugin can be used instead of the traditional signal-based approach.
a4af670
to
4c2e766
Compare
Saartank
reviewed
Feb 17, 2025
Saartank
approved these changes
Feb 18, 2025
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.
This drafts out an approach to having the pelican server process run unprivileged after initial startup. Components:
Server.DropPrivileges
and currently defaults to false.pelican
). This represents the target daemon user the process will be run as once the permissions are dropped.pelican
user.pelican
user after launch is almost complete.TODO items:
pelican
and the new xrootd plugin. I'm simply showing this as the draft of the approach so it can be handed off to @h2zh. I expect this is going to need bugfixes.