-
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
Open
bbockelm
wants to merge
3
commits into
PelicanPlatform:main
Choose a base branch
from
bbockelm:drop_privs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
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.
@@ -57,7 +57,7 @@ RUN yum -y update \ | |||
#### | |||
FROM dependency-build AS xrootd-plugin-builder | |||
# Install necessary build dependencies | |||
RUN yum install -y --enablerepo=osg-testing xrootd-devel xrootd-server-devel xrootd-client-devel curl-devel openssl-devel git cmake3 gcc-c++ sqlite-devel | |||
RUN yum install -y --enablerepo=osg-testing xrootd-devel xrootd-server-devel xrootd-client-devel xrootd-private-devel curl-devel openssl-devel git cmake3 gcc-c++ sqlite-devel |
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.
Not a big fan of depending on a private API. If we absolutely need that class, we should get the developers to make it public, otherwise this is going to break when we least expect it.
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.